File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
graalpython/com.oracle.graal.python.test/src Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1222,6 +1222,11 @@ def main():
1222
1222
help = "Remove tests that were not collected from tags. Useful for pruning removed tests" )
1223
1223
parser .add_argument ('--timeout-factor' , type = float , default = 1.0 ,
1224
1224
help = "Multiply all timeouts by this number" )
1225
+ parser .add_argument ('--exit-success-on-failures' , action = 'store_true' ,
1226
+ help = dedent ("""\
1227
+ Exit successfully regardless of the test results. Useful to distinguish test failures
1228
+ from runner crashes in jobs like retagger or coverage where failures are expected.
1229
+ """ ))
1225
1230
parser .add_argument (
1226
1231
'--subprocess-args' ,
1227
1232
type = shlex .split ,
@@ -1232,7 +1237,7 @@ def main():
1232
1237
] if IS_GRAALPY else [],
1233
1238
help = "Interpreter arguments to pass for subprocess invocation (when using -n)" )
1234
1239
parser .add_argument ('tests' , nargs = '+' , type = TestSpecifier .from_str ,
1235
- help = dedent ("""
1240
+ help = dedent ("""\
1236
1241
List of test specifiers. A specifier can be:
1237
1242
- A test file name. It will be looked up in our unittests or, if you pass --tagged, in tagged tests. Example: test_int
1238
1243
- A test file path. Example: graalpython/lib-python/3/test/test_int.py. Note you do not need to pass --tagged to refer to a tagged test by path
@@ -1335,7 +1340,7 @@ def main():
1335
1340
if args .retag_mode :
1336
1341
runner .generate_tags (append = (args .retag_mode == 'append' ))
1337
1342
return
1338
- if runner .tests_failed ():
1343
+ if runner .tests_failed () and not args . exit_success_on_failures :
1339
1344
sys .exit (1 )
1340
1345
1341
1346
You can’t perform that action at this time.
0 commit comments