File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
graalpython/com.oracle.graal.python.test/src Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1208,6 +1208,8 @@ def main():
1208
1208
help = "Show durations of N slowest tests (-1 to show all)" )
1209
1209
parser .add_argument ('--mx-report' ,
1210
1210
help = "Produce a json report file in format expected by mx_gate.make_test_report" )
1211
+ parser .add_argument ('--untag-unmatched' , action = 'store_true' ,
1212
+ help = "Remove tests that were not collected from tags. Useful for pruning removed tests" )
1211
1213
parser .add_argument (
1212
1214
'--subprocess-args' ,
1213
1215
type = shlex .split ,
@@ -1286,6 +1288,20 @@ def main():
1286
1288
if not tests :
1287
1289
sys .exit ("No tests matched\n " )
1288
1290
1291
+ if args .untag_unmatched :
1292
+ for test_suite in tests :
1293
+ test_file = test_suite .test_file
1294
+ tags = read_tags (test_file )
1295
+ if tags :
1296
+ filtered_tags = []
1297
+ for tag in tags :
1298
+ if not any (tag .test_id .test_name == test .test_id .test_name for test in test_suite .collected_tests ):
1299
+ log (f"Removing tag for { test_file } ::{ tag .test_id .test_name } " )
1300
+ else :
1301
+ filtered_tags .append (tag )
1302
+ write_tags (test_file , filtered_tags )
1303
+ return
1304
+
1289
1305
runner_args = dict (
1290
1306
failfast = args .failfast ,
1291
1307
report_durations = args .durations ,
You can’t perform that action at this time.
0 commit comments