From 0743243dce05c38c1f4949e44467d20a22a1f743 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Fri, 19 Jun 2015 11:38:23 +0200 Subject: Add --skip option to CLI Disassociates hardcoded tests to skip when running via CLI. Tests still skipped when running `go test` --- tests/vm_test_util.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests/vm_test_util.go') diff --git a/tests/vm_test_util.go b/tests/vm_test_util.go index afeedda2a..286991764 100644 --- a/tests/vm_test_util.go +++ b/tests/vm_test_util.go @@ -14,7 +14,7 @@ import ( "github.com/ethereum/go-ethereum/logger/glog" ) -func RunVmTestWithReader(r io.Reader) error { +func RunVmTestWithReader(r io.Reader, skipTests []string) error { tests := make(map[string]VmTest) err := readJson(r, &tests) if err != nil { @@ -25,14 +25,14 @@ func RunVmTestWithReader(r io.Reader) error { return err } - if err := runVmTests(tests); err != nil { + if err := runVmTests(tests, skipTests); err != nil { return err } return nil } -func RunVmTest(p string) error { +func RunVmTest(p string, skipTests []string) error { tests := make(map[string]VmTest) err := readJsonFile(p, &tests) @@ -40,16 +40,16 @@ func RunVmTest(p string) error { return err } - if err := runVmTests(tests); err != nil { + if err := runVmTests(tests, skipTests); err != nil { return err } return nil } -func runVmTests(tests map[string]VmTest) error { - skipTest := make(map[string]bool, len(VmSkipTests)) - for _, name := range VmSkipTests { +func runVmTests(tests map[string]VmTest, skipTests []string) error { + skipTest := make(map[string]bool, len(skipTests)) + for _, name := range skipTests { skipTest[name] = true } -- cgit