summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/run-tests9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/run-tests b/tests/run-tests
index 23fc3d910..6280a5182 100755
--- a/tests/run-tests
+++ b/tests/run-tests
@@ -492,9 +492,12 @@ def main():
# we need to access feature_check's from the same directory as the
# run-tests script itself.
base_path = os.path.dirname(sys.argv[0]) or "."
- res = run_tests(pyb, tests, args, base_path)
- if pyb:
- pyb.close()
+ try:
+ res = run_tests(pyb, tests, args, base_path)
+ finally:
+ if pyb:
+ pyb.close()
+
if not res:
sys.exit(1)