Commit 585f259b authored by obscuren's avatar obscuren

Support input from args

parent c8a4c04b
...@@ -28,6 +28,7 @@ import ( ...@@ -28,6 +28,7 @@ import (
"io/ioutil" "io/ioutil"
"log" "log"
"os" "os"
"strings"
"github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/ethutil"
...@@ -126,5 +127,9 @@ func RunVmTest(r io.Reader) (failed int) { ...@@ -126,5 +127,9 @@ func RunVmTest(r io.Reader) (failed int) {
func main() { func main() {
helper.Logger.SetLogLevel(5) helper.Logger.SetLogLevel(5)
if len(os.Args) > 1 {
os.Exit(RunVmTest(strings.NewReader(os.Args[1])))
} else {
os.Exit(RunVmTest(os.Stdin)) os.Exit(RunVmTest(os.Stdin))
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment