diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-09 19:04:54 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-09 19:04:54 +0800 |
commit | 585f259b63db323c87643a235fcbb9dc46d3125f (patch) | |
tree | 62e57be12f4c3a4bcc1ba6dded6d580e31a7a32d /cmd/ethtest | |
parent | c8a4c04b36d264f538f452b4540372907216b394 (diff) | |
download | dexon-585f259b63db323c87643a235fcbb9dc46d3125f.tar dexon-585f259b63db323c87643a235fcbb9dc46d3125f.tar.gz dexon-585f259b63db323c87643a235fcbb9dc46d3125f.tar.bz2 dexon-585f259b63db323c87643a235fcbb9dc46d3125f.tar.lz dexon-585f259b63db323c87643a235fcbb9dc46d3125f.tar.xz dexon-585f259b63db323c87643a235fcbb9dc46d3125f.tar.zst dexon-585f259b63db323c87643a235fcbb9dc46d3125f.zip |
Support input from args
Diffstat (limited to 'cmd/ethtest')
-rw-r--r-- | cmd/ethtest/main.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/ethtest/main.go b/cmd/ethtest/main.go index 9e9eda450..ac473d58c 100644 --- a/cmd/ethtest/main.go +++ b/cmd/ethtest/main.go @@ -28,6 +28,7 @@ import ( "io/ioutil" "log" "os" + "strings" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethutil" @@ -126,5 +127,9 @@ func RunVmTest(r io.Reader) (failed int) { func main() { helper.Logger.SetLogLevel(5) - os.Exit(RunVmTest(os.Stdin)) + if len(os.Args) > 1 { + os.Exit(RunVmTest(strings.NewReader(os.Args[1]))) + } else { + os.Exit(RunVmTest(os.Stdin)) + } } |