Skip to content

Commit bd2dbd2

Browse files
tridgeclaude
andcommitted
runtests.py: preserve test-execution order in skipped list
The sorted() call reordered skipped test names alphabetically, causing CI expected-skipped mismatches (e.g. acls,acls-default instead of acls-default,acls). Sort by original test order instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 350e295 commit bd2dbd2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

runtests.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,9 @@ def main():
347347
tests = collect_tests(suitedir, args.tests)
348348
full_run = len(args.tests) == 0
349349

350+
# Record test order for consistent skipped-list output
351+
test_order = {os.path.basename(t).replace('.test', ''): i for i, t in enumerate(tests)}
352+
350353
passed = 0
351354
failed = 0
352355
skipped = 0
@@ -442,7 +445,7 @@ def process_result(tr):
442445
if vg_errors > 0:
443446
print(f' {vg_errors} valgrind error(s) found (see logs in {scratchbase})')
444447

445-
skipped_str = ','.join(sorted(skipped_list))
448+
skipped_str = ','.join(sorted(skipped_list, key=lambda x: test_order.get(x, 0)))
446449
if full_run and args.expect_skipped != 'IGNORE':
447450
print('----- skipped results:')
448451
print(f' expected: {args.expect_skipped}')

0 commit comments

Comments
 (0)