aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordan sinclair <dj2@everburning.com>2018-12-11 11:56:20 -0500
committerGitHub <noreply@github.com>2018-12-11 11:56:20 -0500
commit402279c32c265d4f643612e279c7e08c2cf330f4 (patch)
treea40f565181827bbf9a7e6a84f2458be0d1dbd334 /tests
parent7d684cfa61363b7f1fedcef029c3e7ef4d958489 (diff)
downloadamber-402279c32c265d4f643612e279c7e08c2cf330f4.tar.gz
Output any errors produced during test runs. (#167)
This CL captures the stderr of the amber process and fails the tests if there were error messages reported. This should allow catching vulkan validation errors. Fixes #151
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run_tests.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/run_tests.py b/tests/run_tests.py
index 24faab2..578f5fd 100755
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -53,8 +53,13 @@ class TestRunner:
cmd += [tc.GetInputPath()]
try:
- subprocess.check_output(cmd)
+ err = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+ if err != "" and not tc.IsExpectedFail():
+ sys.stdout.write(err)
+ return False
+
except Exception as e:
+ print e.output
if not tc.IsExpectedFail():
print e
return False