aboutsummaryrefslogtreecommitdiffstats
path: root/tests/block_test_util.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-06-19 17:38:23 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-06-19 17:38:23 +0800
commit0743243dce05c38c1f4949e44467d20a22a1f743 (patch)
treefdb2b2dd419da47bb314f230957f79a9d01353d6 /tests/block_test_util.go
parenta9659e6dcf1f1584e155825d4422eb005ff38c21 (diff)
downloadgo-tangerine-0743243dce05c38c1f4949e44467d20a22a1f743.tar.gz
go-tangerine-0743243dce05c38c1f4949e44467d20a22a1f743.tar.zst
go-tangerine-0743243dce05c38c1f4949e44467d20a22a1f743.zip
Add --skip option to CLI
Disassociates hardcoded tests to skip when running via CLI. Tests still skipped when running `go test`
Diffstat (limited to 'tests/block_test_util.go')
-rw-r--r--tests/block_test_util.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/block_test_util.go b/tests/block_test_util.go
index 5222b214b..5fdc6402e 100644
--- a/tests/block_test_util.go
+++ b/tests/block_test_util.go
@@ -86,7 +86,7 @@ type btTransaction struct {
Value string
}
-func RunBlockTestWithReader(r io.Reader) error {
+func RunBlockTestWithReader(r io.Reader, skipTests []string) error {
btjs := make(map[string]*btJSON)
if err := readJson(r, &btjs); err != nil {
return err
@@ -97,13 +97,13 @@ func RunBlockTestWithReader(r io.Reader) error {
return err
}
- if err := runBlockTests(bt); err != nil {
+ if err := runBlockTests(bt, skipTests); err != nil {
return err
}
return nil
}
-func RunBlockTest(file string) error {
+func RunBlockTest(file string, skipTests []string) error {
btjs := make(map[string]*btJSON)
if err := readJsonFile(file, &btjs); err != nil {
return err
@@ -113,15 +113,15 @@ func RunBlockTest(file string) error {
if err != nil {
return err
}
- if err := runBlockTests(bt); err != nil {
+ if err := runBlockTests(bt, skipTests); err != nil {
return err
}
return nil
}
-func runBlockTests(bt map[string]*BlockTest) error {
- skipTest := make(map[string]bool, len(BlockSkipTests))
- for _, name := range BlockSkipTests {
+func runBlockTests(bt map[string]*BlockTest, skipTests []string) error {
+ skipTest := make(map[string]bool, len(skipTests))
+ for _, name := range skipTests {
skipTest[name] = true
}