@@ -154,14 +154,11 @@ def execute(self, test, litConfig):
154154 if isinstance (script , lit .Test .Result ):
155155 return script
156156
157- unsplit_test = False
158- if "build-and-run-mode" in test .requires :
159- unsplit_test = True
160-
161157 devices_for_test = []
162158 triples = set ()
159+ ignore_line_filtering = False
163160 if test .config .test_mode == "build-only" :
164- if unsplit_test or "true" in test .unsupported :
161+ if "build-and-run-mode" in test . requires or "true" in test .unsupported :
165162 return lit .Test .Result (
166163 lit .Test .UNSUPPORTED , "Test unsupported for this environment"
167164 )
@@ -177,6 +174,10 @@ def execute(self, test, litConfig):
177174 (backend , _ ) = sycl_device .split (":" )
178175 triples .add (get_triple (test , backend ))
179176
177+ if "build-and-run-mode" in test .requires and test .config .fallback_build_run_only :
178+ ignore_line_filtering = True
179+
180+
180181 substitutions = lit .TestRunner .getDefaultSubstitutions (test , tmpDir , tmpBase )
181182 substitutions .append (("%{sycl_triple}" , format ("," .join (triples ))))
182183 # -fsycl-targets is needed for CUDA/HIP, so just use it be default so
@@ -239,7 +240,7 @@ def get_extra_env(sycl_devices):
239240 continue
240241
241242 # Filter commands based on split-mode
242- is_run_line = ( unsplit_test and test . config . fallback_build_run_only ) or any (
243+ is_run_line = ignore_line_filtering or any (
243244 i in directive .command
244245 for i in ["%{run}" , "%{run-unfiltered-devices}" , "%if run-mode" ]
245246 )
0 commit comments