diff options
author | Yuriy Glukhov <yuriy.glukhov@gmail.com> | 2016-08-27 20:25:36 +0300 |
---|---|---|
committer | Yuriy Glukhov <yuriy.glukhov@gmail.com> | 2016-08-27 20:25:36 +0300 |
commit | cafcf1308a608ce35aa3a7abba8a28534e2b75e1 (patch) | |
tree | 19a7f2732c040582d313a649207c618fc9940f70 /tests | |
parent | e39138fe422b256c1bb08235ec2331f58c1449b6 (diff) | |
download | Nim-cafcf1308a608ce35aa3a7abba8a28534e2b75e1.tar.gz |
Treat all failure codes from nodejs as 1
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testament/tester.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/testament/tester.nim b/tests/testament/tester.nim index 83e59a6c1..74ac58927 100644 --- a/tests/testament/tester.nim +++ b/tests/testament/tester.nim @@ -334,6 +334,11 @@ proc testSpec(r: var TResults, test: TTest) = let exeCmd = (if isJsTarget: nodejs & " " else: "") & exeFile var (buf, exitCode) = execCmdEx(exeCmd, options = {poStdErrToStdOut}) + + # Treat all failure codes from nodejs as 1. Older versions of nodejs used + # to return other codes, but for us it is sufficient to know that it's not 0. + if exitCode != 0: exitCode = 1 + let bufB = if expected.sortoutput: makeDeterministic(strip(buf.string)) else: strip(buf.string) let expectedOut = strip(expected.outp) |