You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: util/testhelpers/flag/flag.go
+34-12
Original file line number
Diff line number
Diff line change
@@ -2,19 +2,41 @@ package testflag
2
2
3
3
import (
4
4
"flag"
5
+
"log"
6
+
"os"
5
7
)
6
8
7
9
var (
8
-
StateSchemeFlag=flag.String("test_state_scheme", "", "State scheme to use for tests")
9
-
RedisFlag=flag.String("test_redis", "", "Redis URL for testing")
10
-
RecordBlockInputsEnable=flag.Bool("recordBlockInputs.enable", true, "Whether to record block inputs as a json file")
11
-
RecordBlockInputsWithSlug=flag.String("recordBlockInputs.WithSlug", "", "Slug directory for validationInputsWriter")
12
-
RecordBlockInputsWithBaseDir=flag.String("recordBlockInputs.WithBaseDir", "", "Base directory for validationInputsWriter")
13
-
RecordBlockInputsWithTimestampDirEnabled=flag.Bool("recordBlockInputs.WithTimestampDirEnabled", true, "Whether to add timestamp directory while recording block inputs")
14
-
RecordBlockInputsWithBlockIdInFileNameEnabled=flag.Bool("recordBlockInputs.WithBlockIdInFileNameEnabled", true, "Whether to record block inputs using test specific block_id")
15
-
LogLevelFlag=flag.String("test_loglevel", "", "Log level for tests")
16
-
SeedFlag=flag.String("seed", "", "Seed for random number generator")
17
-
RunsFlag=flag.String("runs", "", "Number of runs for test")
CompileFlag=flag.String("test_compile", "", "[STORE|LOAD] to allow store/load in compile test")
10
+
fs=flag.NewFlagSet("test", flag.ExitOnError)
11
+
StateSchemeFlag=fs.String("test_state_scheme", "", "State scheme to use for tests")
12
+
RedisFlag=fs.String("test_redis", "", "Redis URL for testing")
13
+
RecordBlockInputsEnable=fs.Bool("recordBlockInputs.enable", true, "Whether to record block inputs as a json file")
14
+
RecordBlockInputsWithSlug=fs.String("recordBlockInputs.WithSlug", "", "Slug directory for validationInputsWriter")
15
+
RecordBlockInputsWithBaseDir=fs.String("recordBlockInputs.WithBaseDir", "", "Base directory for validationInputsWriter")
16
+
RecordBlockInputsWithTimestampDirEnabled=fs.Bool("recordBlockInputs.WithTimestampDirEnabled", true, "Whether to add timestamp directory while recording block inputs")
17
+
RecordBlockInputsWithBlockIdInFileNameEnabled=fs.Bool("recordBlockInputs.WithBlockIdInFileNameEnabled", true, "Whether to record block inputs using test specific block_id")
18
+
LogLevelFlag=fs.String("test_loglevel", "", "Log level for tests")
19
+
SeedFlag=fs.String("seed", "", "Seed for random number generator")
20
+
RunsFlag=fs.String("runs", "", "Number of runs for test")
0 commit comments