From 585f259b63db323c87643a235fcbb9dc46d3125f Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 9 Jan 2015 12:04:54 +0100 Subject: [PATCH] Support input from args --- cmd/ethtest/main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/ethtest/main.go b/cmd/ethtest/main.go index 9e9eda4502..ac473d58c0 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)) + } }