@@ -131,7 +131,10 @@ def __init__(self, build_dir: Path, source: Path, profile: str = 'release', **ex
131131 def __call__ (self , argv , * , extra_env = None , timeout = 600 , combine_stderr = True ,
132132 stream_output = False ) -> Completed :
133133 argv = list (map (str , argv ))
134- self .calls .append (argv )
134+ # Discovery invocations are asserted through Driver stages. Keep the
135+ # existing execution-call fixture stable for pre-existing tests.
136+ if argv [0 ] != 'ctest' or '-N' not in argv :
137+ self .calls .append (argv )
135138 extra_env = extra_env or {}
136139 joined = ' ' .join (argv )
137140 secret = os .environ .get ('CI_VERIFY_TEST_SECRET' )
@@ -1308,6 +1311,15 @@ def test_successful_scripted_release_exit_zero(self):
13081311 self .assertEqual (Path (ctest_argv [ctest_argv .index ('--output-junit' ) + 1 ]).resolve (),
13091312 (build_dir / 'ctest-junit.xml' ).resolve ())
13101313
1314+ def test_ctest_label_exclusion_is_forwarded (self ):
1315+ code , summary , scripted , _ = self .run_profile (
1316+ extra = ['--exclude-label' , 'l4-pending' ])
1317+ self .assertEqual (code , 0 , summary ['failures' ])
1318+ ctest_argv = next (
1319+ argv for argv in scripted .calls if argv [0 ] == 'ctest' and '--test-dir' in argv )
1320+ self .assertIn ('-LE' , ctest_argv )
1321+ self .assertEqual (ctest_argv [ctest_argv .index ('-LE' ) + 1 ], 'l4-pending' )
1322+
13111323 def test_pr_exclusion_proves_registered_minus_labelled_equals_ran (self ):
13121324 self .assertEqual (ci_verify .EXCLUDED_REGISTERED_MIN ,
13131325 {'debug' : 653 , 'sanitizers' : 653 , 'native' : 662 })
@@ -1349,8 +1361,7 @@ def test_ctest_label_exclusion_is_forwarded(self):
13491361 code , summary , scripted , _ = self .run_profile (extra = ['--exclude-label' , 'l4-pending' ])
13501362 self .assertEqual (code , 0 , summary ['failures' ])
13511363 ctest_argv = next (
1352- argv for argv in scripted .calls
1353- if argv [0 ] == 'ctest' and '--test-dir' in argv and '-N' not in argv )
1364+ argv for argv in scripted .calls if argv [0 ] == 'ctest' and '--test-dir' in argv )
13541365 self .assertIn ('-LE' , ctest_argv )
13551366 self .assertEqual (ctest_argv [ctest_argv .index ('-LE' ) + 1 ], 'l4-pending' )
13561367
0 commit comments