From 00469cc8fa291d262a1c9c48052543b635e57323 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Thu, 23 Mar 2023 15:01:55 +0700 Subject: [PATCH 1/6] fix test --- accounts/abi/bind/bind_test.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/accounts/abi/bind/bind_test.go b/accounts/abi/bind/bind_test.go index 39032d6e945..0df9b7038ec 100644 --- a/accounts/abi/bind/bind_test.go +++ b/accounts/abi/bind/bind_test.go @@ -28,6 +28,7 @@ import ( "testing" "github.com/ledgerwatch/erigon-lib/common/dir" + "github.com/ledgerwatch/log/v3" ) var bindTests = []struct { @@ -1797,7 +1798,7 @@ func TestGolangBindings(t *testing.T) { t.Skip("go sdk not found for testing") } // Create a temporary workspace for the test suite - ws := t.TempDir() + ws := "" //t.TempDir() pkg := filepath.Join(ws, "bindtest") if err := os.MkdirAll(pkg, 0700); err != nil { @@ -1843,6 +1844,14 @@ func TestGolangBindings(t *testing.T) { t.Fatalf("failed to convert binding test to modules: %v\n%s", err, out) } pwd, _ := os.Getwd() + replacer2 := exec.Command(gocmd, "version") + replacer2.Dir = pkg + if out, err := replacer2.CombinedOutput(); err != nil { + t.Fatalf("failed to replace binding test dependency to current source tree: %v\n%s", err, out) + } else { + log.Warn("go version", "v", out, "gocmd", gocmd) + } + replacer := exec.Command(gocmd, "mod", "edit", "-replace", "github.com/ledgerwatch/erigon="+filepath.Join(pwd, "..", "..", "..")) // Repo root replacer.Dir = pkg if out, err := replacer.CombinedOutput(); err != nil { @@ -1859,8 +1868,8 @@ func TestGolangBindings(t *testing.T) { if out, err := tidier.CombinedOutput(); err != nil { t.Fatalf("failed to tidy Go module file: %v\n%s", err, out) } - // Test the entire package and report any failures - cmd := exec.Command(gocmd, "test", "-v", "-count", "1", "-tags", "mdbx") + //Test the entire package and report any failures + cmd := exec.Command(gocmd, "test", "-v", "-count", "1") cmd.Dir = pkg if out, err := cmd.CombinedOutput(); err != nil { t.Fatalf("failed to run binding test: %v\n%s", err, out) From 42316f55d863e7e2495998a841378310777ee776 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Thu, 23 Mar 2023 15:53:14 +0700 Subject: [PATCH 2/6] save --- .github/workflows/ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96eaf8be722..5c3d4962121 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,6 @@ jobs: steps: - uses: actions/checkout@v3 - - run: git submodule update --init --recursive --force - uses: actions/setup-go@v4 with: go-version: '1.19' @@ -60,9 +59,6 @@ jobs: - name: Test run: make test - # - name: Test HistoryV3 - # run: make test3 - tests-windows: if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} strategy: @@ -72,7 +68,6 @@ jobs: steps: - uses: actions/checkout@v3 - - run: git submodule update --init --recursive --force - uses: actions/setup-go@v4 with: go-version: '1.19' From 2cff54dc0d88279508a4d63404fa5563e6639999 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Thu, 23 Mar 2023 15:55:02 +0700 Subject: [PATCH 3/6] save --- .github/workflows/coverage.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index bad1a707948..474d71e6126 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -10,8 +10,6 @@ jobs: steps: - uses: actions/checkout@v3 - - run: git submodule update --init --recursive --force - - uses: actions/setup-go@v4 with: go-version: '1.19' From 7a8e83385044e3d367b62b94d08499fbef55b30d Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Thu, 23 Mar 2023 15:59:14 +0700 Subject: [PATCH 4/6] save --- accounts/abi/bind/bind_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/accounts/abi/bind/bind_test.go b/accounts/abi/bind/bind_test.go index 0df9b7038ec..27b7a7e1fca 100644 --- a/accounts/abi/bind/bind_test.go +++ b/accounts/abi/bind/bind_test.go @@ -23,7 +23,6 @@ import ( "os" "os/exec" "path/filepath" - "runtime" "strings" "testing" @@ -1793,7 +1792,7 @@ var bindTests = []struct { // the requested tester run against it. func TestGolangBindings(t *testing.T) { // Skip the test if no Go command can be found - gocmd := runtime.GOROOT() + "/bin/go" + gocmd := "go" if !dir.FileExist(gocmd) { t.Skip("go sdk not found for testing") } From a38e3d56b59c3d3b4263ca92c1b37f26c4205b8d Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Thu, 23 Mar 2023 15:59:31 +0700 Subject: [PATCH 5/6] save --- accounts/abi/bind/bind_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounts/abi/bind/bind_test.go b/accounts/abi/bind/bind_test.go index 27b7a7e1fca..3726d1796c0 100644 --- a/accounts/abi/bind/bind_test.go +++ b/accounts/abi/bind/bind_test.go @@ -1848,7 +1848,7 @@ func TestGolangBindings(t *testing.T) { if out, err := replacer2.CombinedOutput(); err != nil { t.Fatalf("failed to replace binding test dependency to current source tree: %v\n%s", err, out) } else { - log.Warn("go version", "v", out, "gocmd", gocmd) + log.Warn("go version", "v", string(out), "gocmd", gocmd) } replacer := exec.Command(gocmd, "mod", "edit", "-replace", "github.com/ledgerwatch/erigon="+filepath.Join(pwd, "..", "..", "..")) // Repo root From 79f3b08673a94334edbf5e528a079e746cbc525d Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Thu, 23 Mar 2023 16:22:50 +0700 Subject: [PATCH 6/6] save --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4e215d5f05d..4ee6b8cc217 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/ledgerwatch/erigon go 1.19 require ( - github.com/ledgerwatch/erigon-lib v0.0.0-20230323051917-d7b01ea68f75 + github.com/ledgerwatch/erigon-lib v0.0.0-20230323062604-e15093d30e18 github.com/ledgerwatch/erigon-snapshot v1.1.1-0.20230306083105-1391330d62a3 github.com/ledgerwatch/log/v3 v3.7.0 github.com/ledgerwatch/secp256k1 v1.0.0 diff --git a/go.sum b/go.sum index d7cb1706074..594175e7ba2 100644 --- a/go.sum +++ b/go.sum @@ -519,8 +519,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758 h1:0D5M2HQSGD3PYPwICLl+/9oulQauOuETfgFvhBDffs0= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/ledgerwatch/erigon-lib v0.0.0-20230323051917-d7b01ea68f75 h1:RO73OYf0mwvbrRx9N4rjtQ/2rsYfa9n6/5FRO0VBhm4= -github.com/ledgerwatch/erigon-lib v0.0.0-20230323051917-d7b01ea68f75/go.mod h1:dagOLJlpxlMcQX4a2KIdzyCBIMtk6+ccqikNQf2uDwA= +github.com/ledgerwatch/erigon-lib v0.0.0-20230323062604-e15093d30e18 h1:deIunwmAyt1KbzcFEOD5MwzThJFPO2E+2kDpaSAJDFI= +github.com/ledgerwatch/erigon-lib v0.0.0-20230323062604-e15093d30e18/go.mod h1:dagOLJlpxlMcQX4a2KIdzyCBIMtk6+ccqikNQf2uDwA= github.com/ledgerwatch/erigon-snapshot v1.1.1-0.20230306083105-1391330d62a3 h1:tfzawK1gIIgRjVZeANXOr0Ziu+kqCIBuKMe0TXfl5Aw= github.com/ledgerwatch/erigon-snapshot v1.1.1-0.20230306083105-1391330d62a3/go.mod h1:3AuPxZc85jkehh/HA9h8gabv5MSi3kb/ddtzBsTVJFo= github.com/ledgerwatch/log/v3 v3.7.0 h1:aFPEZdwZx4jzA3+/Pf8wNDN5tCI0cIolq/kfvgcM+og=