]> git.sur5r.net Git - u-boot/commitdiff
test/py: exit(1) if there are problems running py.test
authorStephen Warren <swarren@nvidia.com>
Wed, 3 Feb 2016 17:42:11 +0000 (10:42 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 9 Feb 2016 22:41:19 +0000 (15:41 -0700)
The test/py/test.py wrapper script catches exceptions thrown when
exec()ing py.test in order to print a helpful error message. However,
the exception handling code squashes the exception and so the script
exits with a non-zero exit code, leading callers to believe that it
passed. Fix this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
test/py/test.py

index 95671d47377685cc66741178c68ad1a0971f7db9..74e560a4d33abb9cbffaa071b8fbb50a00098d77 100755 (executable)
@@ -30,3 +30,4 @@ except:
     print >>sys.stderr, '''
 exec(py.test) failed; perhaps you are missing some dependencies?
 See test/py/README.md for the list.'''
+    sys.exit(1)