diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-08-11 17:53:02 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-08-11 17:53:02 +0800 |
commit | c32d6fdf744af52ddc2f5a1c045df4461c70046a (patch) | |
tree | 8217459ca029b4d0f84c4a083b794d95c229668f | |
parent | 2fcf7f1241648dc2c0ed90a122c5945f25b3ce1a (diff) | |
parent | 67c8ccc309733b0664e287a5b29f1cc62d22a78d (diff) | |
download | dexon-c32d6fdf744af52ddc2f5a1c045df4461c70046a.tar dexon-c32d6fdf744af52ddc2f5a1c045df4461c70046a.tar.gz dexon-c32d6fdf744af52ddc2f5a1c045df4461c70046a.tar.bz2 dexon-c32d6fdf744af52ddc2f5a1c045df4461c70046a.tar.lz dexon-c32d6fdf744af52ddc2f5a1c045df4461c70046a.tar.xz dexon-c32d6fdf744af52ddc2f5a1c045df4461c70046a.tar.zst dexon-c32d6fdf744af52ddc2f5a1c045df4461c70046a.zip |
Merge pull request #1640 from obscuren/trace-flag-ethtest
cmd/ethtest: added trace flag for debugging
-rw-r--r-- | cmd/ethtest/main.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cmd/ethtest/main.go b/cmd/ethtest/main.go index 5429cab31..67b965396 100644 --- a/cmd/ethtest/main.go +++ b/cmd/ethtest/main.go @@ -26,6 +26,7 @@ import ( "strings" "github.com/codegangsta/cli" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/tests" ) @@ -62,6 +63,10 @@ var ( Name: "skip", Usage: "Tests names to skip", } + TraceFlag = cli.BoolFlag{ + Name: "trace", + Usage: "Enable VM tracing", + } ) func runTestWithReader(test string, r io.Reader) error { @@ -173,7 +178,6 @@ func runSuite(test, file string) { glog.Fatalln(err) } } - } } } @@ -184,6 +188,7 @@ func setupApp(c *cli.Context) { continueOnError = c.GlobalBool(ContinueOnErrorFlag.Name) useStdIn := c.GlobalBool(ReadStdInFlag.Name) skipTests = strings.Split(c.GlobalString(SkipTestsFlag.Name), " ") + vm.Debug = c.GlobalBool(TraceFlag.Name) if !useStdIn { runSuite(flagTest, flagFile) @@ -211,6 +216,7 @@ func main() { ContinueOnErrorFlag, ReadStdInFlag, SkipTestsFlag, + TraceFlag, } if err := app.Run(os.Args); err != nil { |