Merge pull request #543 from nspcc-dev/force-neo-vm-tests-run
vm: force neo-vm tests presence
This commit is contained in:
commit
652ede03c8
2 changed files with 8 additions and 1 deletions
|
@ -54,6 +54,8 @@ jobs:
|
||||||
executor: go1_12
|
executor: go1_12
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
- run: git submodule sync
|
||||||
|
- run: git submodule update --init
|
||||||
- gomod
|
- gomod
|
||||||
- run: go test -v -race ./...
|
- run: go test -v -race ./...
|
||||||
|
|
||||||
|
@ -62,6 +64,8 @@ jobs:
|
||||||
executor: go1_13
|
executor: go1_13
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
- run: git submodule sync
|
||||||
|
- run: git submodule update --init
|
||||||
- gomod
|
- gomod
|
||||||
- run: go test -v -race ./... -coverprofile=coverage.txt -covermode=atomic
|
- run: go test -v -race ./... -coverprofile=coverage.txt -covermode=atomic
|
||||||
- codecov/upload:
|
- codecov/upload:
|
||||||
|
|
|
@ -89,20 +89,23 @@ const (
|
||||||
typeString vmUTStackItemType = "String"
|
typeString vmUTStackItemType = "String"
|
||||||
typeStruct vmUTStackItemType = "Struct"
|
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) {
|
func TestUT(t *testing.T) {
|
||||||
|
testsRan := false
|
||||||
err := filepath.Walk(testsDir, func(path string, info os.FileInfo, err error) error {
|
err := filepath.Walk(testsDir, func(path string, info os.FileInfo, err error) error {
|
||||||
if !strings.HasSuffix(path, ".json") {
|
if !strings.HasSuffix(path, ".json") {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
testFile(t, path)
|
testFile(t, path)
|
||||||
|
testsRan = true
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
require.Equal(t, true, testsRan, "neo-vm tests should be available (check submodules)")
|
||||||
}
|
}
|
||||||
|
|
||||||
func testFile(t *testing.T, filename string) {
|
func testFile(t *testing.T, filename string) {
|
||||||
|
|
Loading…
Reference in a new issue