From becd4f2333c4c50b9758e62a1a6839236c5eb0ac Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Wed, 4 Dec 2019 20:30:27 +0300 Subject: [PATCH 1/2] vm: force neo-vm tests presence We succeeded this test without running anything real which is certainly not good and I think we should always run this tests. --- pkg/vm/json_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/vm/json_test.go b/pkg/vm/json_test.go index bafbc2f41..2cc00de2b 100644 --- a/pkg/vm/json_test.go +++ b/pkg/vm/json_test.go @@ -89,20 +89,23 @@ const ( typeString vmUTStackItemType = "String" typeStruct vmUTStackItemType = "Struct" - testsDir = "neo-vm/tests/neo-vm.Tests/Tests/" + testsDir = "testdata/neo-vm/tests/neo-vm.Tests/Tests/" ) func TestUT(t *testing.T) { + testsRan := false err := filepath.Walk(testsDir, func(path string, info os.FileInfo, err error) error { if !strings.HasSuffix(path, ".json") { return nil } testFile(t, path) + testsRan = true return nil }) require.NoError(t, err) + require.Equal(t, true, testsRan, "neo-vm tests should be available (check submodules)") } func testFile(t *testing.T, filename string) { From f1e87f497bfc1a5aaa7d594d2383521455251c54 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Wed, 4 Dec 2019 20:36:51 +0300 Subject: [PATCH 2/2] circleci: get submodules on checkout, fix failing tests --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index ce20eb776..a69675b62 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -54,6 +54,8 @@ jobs: executor: go1_12 steps: - checkout + - run: git submodule sync + - run: git submodule update --init - gomod - run: go test -v -race ./... @@ -62,6 +64,8 @@ jobs: executor: go1_13 steps: - checkout + - run: git submodule sync + - run: git submodule update --init - gomod - run: go test -v -race ./... -coverprofile=coverage.txt -covermode=atomic - codecov/upload: