aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/ethtest
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-06-09 04:03:21 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-06-19 04:13:41 +0800
commit6415ed0730f1e752036e0c79f913e133c318c231 (patch)
tree5e34dc7356ad13489582a6ab9c38b6a7e31c2eca /cmd/ethtest
parente4f9ec886b498c5744633a4db1c735eec11dc71b (diff)
downloaddexon-6415ed0730f1e752036e0c79f913e133c318c231.tar
dexon-6415ed0730f1e752036e0c79f913e133c318c231.tar.gz
dexon-6415ed0730f1e752036e0c79f913e133c318c231.tar.bz2
dexon-6415ed0730f1e752036e0c79f913e133c318c231.tar.lz
dexon-6415ed0730f1e752036e0c79f913e133c318c231.tar.xz
dexon-6415ed0730f1e752036e0c79f913e133c318c231.tar.zst
dexon-6415ed0730f1e752036e0c79f913e133c318c231.zip
Require a first argument of test type
Diffstat (limited to 'cmd/ethtest')
-rw-r--r--cmd/ethtest/main.go28
1 files changed, 24 insertions, 4 deletions
diff --git a/cmd/ethtest/main.go b/cmd/ethtest/main.go
index c2c94d6c4..c33db45d2 100644
--- a/cmd/ethtest/main.go
+++ b/cmd/ethtest/main.go
@@ -225,9 +225,29 @@ func main() {
helper.Logger.SetLogLevel(5)
vm.Debug = true
- if len(os.Args) > 1 {
- os.Exit(RunVmTest(strings.NewReader(os.Args[1])))
- } else {
- os.Exit(RunVmTest(os.Stdin))
+ if len(os.Args) < 2 {
+ glog.Exit("Must specify test type")
}
+
+ test := os.Args[1]
+
+ var code int
+ switch test {
+ case "vm", "VMTests":
+ glog.Exit("VMTests not yet implemented")
+ case "state", "StateTest":
+ if len(os.Args) > 2 {
+ code = RunVmTest(strings.NewReader(os.Args[2]))
+ } else {
+ code = RunVmTest(os.Stdin)
+ }
+ case "tx", "TransactionTests":
+ glog.Exit("TransactionTests not yet implemented")
+ case "bc", "BlockChainTest":
+ glog.Exit("BlockChainTest not yet implemented")
+ default:
+ glog.Exit("Invalid test type specified")
+ }
+
+ os.Exit(code)
}