testsuite: Show stderr output on command failure
authorBen Gamari <bgamari.foss@gmail.com>
Tue, 11 Jul 2017 18:43:38 +0000 (14:43 -0400)
committerBen Gamari <ben@smart-cactus.org>
Tue, 11 Jul 2017 19:26:20 +0000 (15:26 -0400)
Reviewers: austin

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3716

testsuite/driver/testutil.py

index d35fb81..dcba177 100644 (file)
@@ -22,7 +22,7 @@ def getStdout(cmd_and_args):
     if r != 0:
         raise Exception("Command failed: " + str(cmd_and_args))
     if stderr:
-        raise Exception("stderr from command: " + str(cmd_and_args))
+        raise Exception("stderr from command: %s\nOutput:\n%s\n" % (cmd_and_args, stderr))
     return stdout
 
 def mkdirp(path):