diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2019-01-15 00:53:58 -0800 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-01-15 09:53:58 +0100 |
commit | 1d941b87352dc675fdedac274ddf0b9d43c8d5c5 (patch) | |
tree | fd986f4a70b3d66befd43c8a8f96b4009da37141 /testament | |
parent | 8922063bd84e9109a5ba493188f201ebda74f66d (diff) | |
download | Nim-1d941b87352dc675fdedac274ddf0b9d43c8d5c5.tar.gz |
refs #10249 #10266; each command logged only if --verboseCommands:true (#10303)
Diffstat (limited to 'testament')
-rw-r--r-- | testament/tester.nim | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/testament/tester.nim b/testament/tester.nim index 04552b7c9..ad0d22742 100644 --- a/testament/tester.nim +++ b/testament/tester.nim @@ -18,6 +18,7 @@ var useColors = true var backendLogging = true var simulate = false var verboseMegatest = false # very verbose but can be useful +var verboseCommands = false const testsDir = "tests" & DirSep @@ -37,6 +38,7 @@ Arguments: Options: --print also print results to the console --verboseMegatest log to stdout megatetest compilation + --verboseCommands log to stdout info about commands being run --simulate see what tests would be run but don't run them (for debugging) --failing only show failing/ignored tests --targets:"c c++ js objc" run tests for specified targets (default: all) @@ -111,12 +113,14 @@ proc execCmdEx2(command: string, args: openarray[string], options: set[ProcessOp result.exitCode = peekExitCode(p) if result.exitCode != -1: break close(p) - if result.exitCode != 0: + + if verboseCommands: var command2 = command if args.len > 0: command2.add " " & args.quoteShellCommand - echo (msg: "execCmdEx2 failed", + echo (msg: "execCmdEx2", command: command2, - options: options) + options: options, + exitCode: result.exitCode) proc nimcacheDir(filename, options: string, target: TTarget): string = ## Give each test a private nimcache dir so they don't clobber each other's. @@ -540,6 +544,7 @@ proc main() = case p.key.string.normalize of "print", "verbose": optPrintResults = true of "verbosemegatest": verboseMegatest = true + of "verbosecommands": verboseCommands = true of "failing": optFailing = true of "pedantic": discard "now always enabled" of "targets": |