]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
runtests.py: preserve test-execution order in skipped list
authorAndrew Tridgell <andrew@tridgell.net>
Wed, 22 Apr 2026 02:21:48 +0000 (12:21 +1000)
committerAndrew Tridgell <andrew@tridgell.net>
Wed, 22 Apr 2026 02:34:39 +0000 (12:34 +1000)
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>
runtests.py

index e63a3279f6cb2174d01708230afe58f4ff9422ed..54ca0a05b01d92d43bb8e1437571b359c579c1bd 100755 (executable)
@@ -347,6 +347,9 @@ def main():
     tests = collect_tests(suitedir, args.tests)
     full_run = len(args.tests) == 0
 
+    # Record test order for consistent skipped-list output
+    test_order = {os.path.basename(t).replace('.test', ''): i for i, t in enumerate(tests)}
+
     passed = 0
     failed = 0
     skipped = 0
@@ -442,7 +445,7 @@ def main():
     if vg_errors > 0:
         print(f'      {vg_errors} valgrind error(s) found (see logs in {scratchbase})')
 
-    skipped_str = ','.join(sorted(skipped_list))
+    skipped_str = ','.join(sorted(skipped_list, key=lambda x: test_order.get(x, 0)))
     if full_run and args.expect_skipped != 'IGNORE':
         print('----- skipped results:')
         print(f'      expected: {args.expect_skipped}')