Skip to content

Commit b26d7dc

Browse files
committed
added error propagation to
1 parent 0bc16da commit b26d7dc

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

run_tests.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727

2828
if utest:
2929
utestrun = unittest.main(module=None,
30-
argv=[__file__, 'discover', os.path.join(THIS_DIR, 'utest')],
31-
exit=False)
30+
argv=[__file__, 'discover', os.path.join(THIS_DIR, 'utest')],
31+
exit=False)
3232
if not utestrun.result.wasSuccessful():
3333
sys.exit(1)
3434

@@ -40,8 +40,10 @@
4040
# Adding the robotframeworkMBT folder to the python path forces the development
4141
# version to be used instead of the one installed on your system. You will also
4242
# need to add this path to your IDE options when running from there.
43-
robot.run_cli(['--outputdir', OUTPUT_ROOT,
44-
'--pythonpath', THIS_DIR]
45-
+ sys.argv[1:], exit=False)
43+
exit_code: int = robot.run_cli(['--outputdir', OUTPUT_ROOT,
44+
'--pythonpath', THIS_DIR]
45+
+ sys.argv[1:], exit=False)
4646
if utest:
4747
print(f"Also ran {utestrun.result.testsRun} unit tests")
48+
49+
sys.exit(exit_code)

0 commit comments

Comments
 (0)