[U-Boot] [PATCH] test/py: exit(1) if there are problems running py.test

From: Stephen Warren swarren@nvidia.com
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 | 1 + 1 file changed, 1 insertion(+)
diff --git a/test/py/test.py b/test/py/test.py index 95671d473776..74e560a4d33a 100755 --- a/test/py/test.py +++ b/test/py/test.py @@ -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)

On 3 February 2016 at 10:42, Stephen Warren swarren@wwwdotorg.org wrote:
From: Stephen Warren swarren@nvidia.com
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 | 1 + 1 file changed, 1 insertion(+)
Acked-by: Simon Glass sjg@chromium.org

On 6 February 2016 at 13:29, Simon Glass sjg@chromium.org wrote:
On 3 February 2016 at 10:42, Stephen Warren swarren@wwwdotorg.org wrote:
From: Stephen Warren swarren@nvidia.com
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 | 1 + 1 file changed, 1 insertion(+)
Acked-by: Simon Glass sjg@chromium.org
Applied to u-boot-dm, thanks!
participants (2)
-
Simon Glass
-
Stephen Warren