aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-01-02 19:33:32 +0000
committerJon Turney <jon.turney@dronecode.org.uk>2018-02-15 12:51:25 +0000
commitb78a01bcedb668158c97574d6a140d63a2a108e5 (patch)
treee4a4e007e7dc5d573e9160457167fbf512d9ee8f /run_unittests.py
parent2a64ed855e6db81c3df4659e1066f777b9bacc8c (diff)
downloadmeson-b78a01bcedb668158c97574d6a140d63a2a108e5.zip
meson-b78a01bcedb668158c97574d6a140d63a2a108e5.tar.gz
meson-b78a01bcedb668158c97574d6a140d63a2a108e5.tar.bz2
Add a test case for python exception exit status
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 103847a..a520ad2 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -1933,6 +1933,16 @@ class FailureTests(BasePlatformTests):
self.assertRegex(out, r'Also couldn\'t find a fallback subproject in '
'.*subprojects.*failingsubproj.*for the dependency.*somedep')
+ def test_exception_exit_status(self):
+ '''
+ Test exit status on python exception
+ '''
+ tdir = os.path.join(self.unit_test_dir, '21 exit status')
+ with self.assertRaises(subprocess.CalledProcessError) as cm:
+ self.init(tdir, inprocess=False)
+ self.assertEqual(cm.exception.returncode, 2)
+ self.wipe()
+
class WindowsTests(BasePlatformTests):
'''