testsuite: Display observed exit code on failure due to bad exit code
authorBen Gamari <ben@smart-cactus.org>
Thu, 7 Mar 2019 15:13:13 +0000 (10:13 -0500)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Wed, 20 Mar 2019 22:41:32 +0000 (18:41 -0400)
testsuite/driver/testlib.py

index ed336c9..a2e7dde 100644 (file)
@@ -1402,7 +1402,7 @@ def simple_run(name, way, prog, extra_run_opts):
             print('Wrong exit code for ' + name + '(' + way + ')' + '(expected', opts.exit_code, ', actual', exit_code, ')')
             dump_stdout(name)
             dump_stderr(name)
-        return failBecause('bad exit code')
+        return failBecause('bad exit code (%d)' % exit_code)
 
     if not (opts.ignore_stderr or stderr_ok(name, way) or opts.combined_output):
         return failBecause('bad stderr')