Skip to content

Commit 9f4486f

Browse files
[SYCL][Test E2E] Add support for device-specific conditions with %{run} (#9364)
1 parent 6eb8b43 commit 9f4486f

18 files changed

+56
-92
lines changed

sycl/test-e2e/AOT/multiple-devices.cpp

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,42 +15,31 @@
1515

1616
// CPU, GPU, FPGA
1717
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64,spir64_gen,spir64_fpga -Xsycl-target-backend=spir64_gen %gpu_aot_target_opts %t.o -o %t_all_aot.out
18-
// RUN: %CPU_RUN_PLACEHOLDER %t_all_aot.out
19-
// RUN: %GPU_RUN_PLACEHOLDER %t_all_aot.out
20-
// RUN: %ACC_RUN_PLACEHOLDER %t_all_aot.out
18+
// RUN: %{run} %t_all_aout.out
2119

2220
// CPU, GPU
2321
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64,spir64_gen -Xsycl-target-backend=spir64_gen %gpu_aot_target_opts %t.o -o %t_cpu_gpu.out
24-
// RUN: %CPU_RUN_PLACEHOLDER %t_cpu_gpu.out
25-
// RUN: %GPU_RUN_PLACEHOLDER %t_cpu_gpu.out
22+
// RUN: %if gpu || cpu %{ %{run} %t_cpu_gpu.out %}
2623

2724
// CPU, FPGA
2825
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64,spir64_fpga %t.o -o %t_cpu_fpga.out
29-
// RUN: %CPU_RUN_PLACEHOLDER %t_cpu_fpga.out
30-
// RUN: %ACC_RUN_PLACEHOLDER %t_cpu_fpga.out
26+
// RUN: %if cpu || acc %{ %{run} %t_cpu_fpga.out %}
3127

3228
// GPU, FPGA
3329
// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen,spir64_fpga -Xsycl-target-backend=spir64_gen %gpu_aot_target_opts %t.o -o %t_gpu_fpga.out
34-
// RUN: %GPU_RUN_PLACEHOLDER %t_gpu_fpga.out
35-
// RUN: %ACC_RUN_PLACEHOLDER %t_gpu_fpga.out
30+
// RUN: %if gpu || acc %{ %{run} %t_gpu_fpga.out %}
3631

3732
// No AOT-compiled image for CPU
3833
// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_gen,spir64_fpga -Xsycl-target-backend=spir64_gen %gpu_aot_target_opts %t.o -o %t_spv_gpu_fpga.out
39-
// RUN: %CPU_RUN_PLACEHOLDER %t_spv_gpu_fpga.out
4034
// Check that execution on AOT-compatible devices is unaffected
41-
// RUN: %GPU_RUN_PLACEHOLDER %t_spv_gpu_fpga.out
42-
// RUN: %ACC_RUN_PLACEHOLDER %t_spv_gpu_fpga.out
35+
// RUN: %{run} %t_spv_gpu_fpga.out
4336

4437
// No AOT-compiled image for GPU
4538
// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_x86_64,spir64_fpga %t.o -o %t_spv_cpu_fpga.out
46-
// RUN: %GPU_RUN_PLACEHOLDER %t_spv_cpu_fpga.out
4739
// Check that execution on AOT-compatible devices is unaffected
48-
// RUN: %CPU_RUN_PLACEHOLDER %t_spv_cpu_fpga.out
49-
// RUN: %ACC_RUN_PLACEHOLDER %t_spv_cpu_fpga.out
40+
// RUN: %{run} %t_spv_cpu_fpga.out
5041

5142
// No AOT-compiled image for FPGA
5243
// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_x86_64,spir64_gen -Xsycl-target-backend=spir64_gen %gpu_aot_target_opts %t.o -o %t_spv_cpu_gpu.out
53-
// RUN: %ACC_RUN_PLACEHOLDER %t_spv_cpu_gpu.out
5444
// Check that execution on AOT-compatible devices is unaffected
55-
// RUN: %CPU_RUN_PLACEHOLDER %t_spv_cpu_gpu.out
56-
// RUN: %GPU_RUN_PLACEHOLDER %t_spv_cpu_gpu.out
45+
// RUN: %{run} %t_spv_cpu_gpu.out

sycl/test-e2e/Assert/assert_in_simultaneously_multiple_tus_one_ndebug.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
// UNSUPPORTED: cuda, hip
44

55
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple -DDEFINE_NDEBUG_INFILE2 -I %S/Inputs %S/assert_in_simultaneously_multiple_tus.cpp %S/Inputs/kernels_in_file2.cpp -o %t.out %threads_lib
6-
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.cpu.txt || true
7-
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.cpu.txt
6+
// RUN: %if cpu %{ %{run} %t.out &> %t.cpu.txt ; FileCheck %s --input-file %t.cpu.txt %}
87
//
98
// Since this is a multi-threaded application enable memory tracking and
109
// deferred release feature in the Level Zero plugin to avoid releasing memory
@@ -13,11 +12,12 @@
1312
// release yet.
1413
// Suppress runtime from printing out error messages, so that the test can
1514
// match on assert message generated by the toolchains.
16-
// RUN: env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 SYCL_PI_SUPPRESS_ERROR_MESSAGE=1 %GPU_RUN_PLACEHOLDER %t.out &> %t.gpu.txt || true
17-
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.gpu.txt
15+
16+
// DEFINE: %{gpu_env} = env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 SYCL_PI_SUPPRESS_ERROR_MESSAGE=1
17+
// RUN: %if gpu %{ %{gpu_env} %{run} %t.out &> %t.gpu.txt ; FileCheck %s --input-file %t.gpu.txt %}
18+
1819
// Shouldn't fail on ACC as fallback assert isn't enqueued there
19-
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.acc.txt
20-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.acc.txt
20+
// RUN: %if acc %{ %{run} %t.out &> %t.acc.txt ; FileCheck %s --input-file %t.acc.txt %}
2121
//
2222
// CHECK: this message from file1
2323
// CHECK-NOT: this message from file2

sycl/test-e2e/BFloat16/bfloat16_example.cpp

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,34 @@
22
/// Check if bfloat16 example works using fallback libraries
33
///
44

5-
// REQUIRES: opencl-aot, ocloc, cpu, gpu-intel-gen9
5+
// REQUIRES: opencl-aot, ocloc, gpu-intel-gen9
66
// UNSUPPORTED: cuda
77
// CUDA is not compatible with SPIR.
8+
// UNSUPPORTED: accelerator
89

910
// RUN: %clangxx -fsycl %s -o %t.out
10-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
11-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
11+
// RUN: %{run} %t.out
1212

1313
// RUN: %clangxx -fsycl -fsycl-targets=spir64 %s -o %t.out
14-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
15-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
14+
// RUN: %{run} %t.out
1615

1716
// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend "-device gen9" %s -o %t.out
18-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
19-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
17+
// RUN: %{run} %t.out
2018

2119
// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend "-device *" %s -o %t.out
22-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
20+
// RUN: %if gpu %{ %{run} %t.out %}
2321

2422
// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_gen -Xsycl-target-backend=spir64_gen "-device gen9" %s -o %t.out
25-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
26-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
23+
// RUN: %{run} %t.out
2724

2825
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64,spir64_gen -Xsycl-target-backend=spir64_gen "-device gen9" %s -o %t.out
29-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
30-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
26+
// RUN: %{run} %t.out
3127

3228
// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_gen -Xsycl-target-backend=spir64_gen "-device pvc" %s -o %t.out
33-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
29+
// RUN: %if cpu %{ %{run} %t.out %}
3430

3531
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64,spir64_gen -Xsycl-target-backend=spir64_gen "-device pvc" %s -o %t.out
36-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
32+
// RUN: %if cpu %{ %{run} %t.out %}
3733

3834
#include <sycl/sycl.hpp>
3935

sycl/test-e2e/BFloat16/bfloat16_type.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// RUN: %if cuda %{%{build} -DUSE_CUDA_SM80=1 -Xsycl-target-backend --cuda-gpu-arch=sm_80 -o %t.out %}
2-
// RUN: %if cuda %{%GPU_RUN_PLACEHOLDER %t.out %}
2+
// RUN: %if ext_oneapi_cuda %{ %{run} %t.out %}
33
// RUN: %{build} -o %t.out
4+
// RUN: %{run} %t.out
5+
46
// TODO currently the feature isn't supported on FPGA.
5-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
6-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
7-
// RUNx: %ACC_RUN_PLACEHOLDER %t.out
7+
// UNSUPPORTED: accelerator
88
//
99
// Not currently supported on HIP.
1010
// UNSUPPORTED: hip

sycl/test-e2e/Basic/alloc_pinned_host_memory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// REQUIRES: level_zero || cuda
22

33
// RUN: %{build} -o %t2.out
4-
// RUN: env SYCL_PI_TRACE=2 ZE_DEBUG=1 %GPU_RUN_PLACEHOLDER %t2.out 2>&1 %GPU_L0_CHECK_PLACEHOLDER
4+
// RUN: env SYCL_PI_TRACE=2 ZE_DEBUG=1 %{run} %t2.out %if ext_oneapi_level_zero %{ 2>&1 | FileCheck %s %}
55
// RUN: %{run} %t2.out
66

77
#include <sycl/sycl.hpp>

sycl/test-e2e/Basic/stream/auto_flush.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// RUN: %{build} -o %t.out
2-
// TODO: Enable on host when commands cleanup will be implemented in scheduler
3-
// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
4-
// RUN: %GPU_RUN_ON_LINUX_PLACEHOLDER %t.out %GPU_CHECK_ON_LINUX_PLACEHOLDER
5-
// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER
2+
// RUN: %{run} %t.out %if !gpu || linux %{ | FileCheck %s %}
63
//
74
// XFAIL: hip_nvidia
85
//==-------------- copy.cpp - SYCL stream obect auto flushing test ---------==//

sycl/test-e2e/Basic/stream/stream.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// RUN: %{build} -fsycl-device-code-split=per_kernel -o %t.out
2-
// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
3-
// RUN: %GPU_RUN_ON_LINUX_PLACEHOLDER %t.out %GPU_CHECK_ON_LINUX_PLACEHOLDER
4-
// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER
2+
// RUN: %{run} %t.out %if !gpu || linux %{ | FileCheck %s %}
53

64
//==------------------ stream.cpp - SYCL stream basic test -----------------==//
75
//

sycl/test-e2e/Basic/stream/stream_copies_buffer_sync.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// RUN: %{build} -o %t.out
2-
// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
3-
// RUN: %GPU_RUN_ON_LINUX_PLACEHOLDER %t.out %GPU_CHECK_ON_LINUX_PLACEHOLDER
4-
// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER
2+
// RUN: %{run} %t.out %if !gpu || linux %{ | FileCheck %s %}
53

64
#include <sycl/sycl.hpp>
75

sycl/test-e2e/Basic/stream/stream_max_stmt_exceed.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// RUN: %{build} -o %t.out
2-
// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
3-
// RUN: %GPU_RUN_ON_LINUX_PLACEHOLDER %t.out %GPU_CHECK_ON_LINUX_PLACEHOLDER
4-
// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER
2+
// RUN: %{run} %t.out %if !gpu || linux %{ | FileCheck %s %}
53

64
#include <iostream>
75
#include <sycl/sycl.hpp>

sycl/test-e2e/Config/env_vars.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
//
44
// RUN: %{build} -O0 -o %t.out
55
//
6-
// RUN: env SYCL_PROGRAM_COMPILE_OPTIONS="-g" %CPU_RUN_PLACEHOLDER %t.out
7-
// RUN: env SYCL_PROGRAM_COMPILE_OPTIONS="-g" %GPU_RUN_PLACEHOLDER %t.out
6+
// RUN: env SYCL_PROGRAM_COMPILE_OPTIONS="-g" %{run} %t.out
87
//
98
// Now test for invalid options to make sure they are really passed to
109
// a device compiler. Intel GPU runtime doesn't give an error for
1110
// invalid options, so we don't test it here.
1211
//
13-
// RUN: env SYCL_PROGRAM_COMPILE_OPTIONS="-enable-link-options -cl-denorms-are-zero" SHOULD_CRASH=1 %CPU_RUN_PLACEHOLDER %t.out
12+
// RUN: %if cpu %{ env SYCL_PROGRAM_COMPILE_OPTIONS="-enable-link-options -cl-denorms-are-zero" SHOULD_CRASH=1 %{run} %t.out %}
1413

1514
#include <cassert>
1615
#include <memory>

sycl/test-e2e/DeviceLib/cmath_test.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22

33
// UNSUPPORTED: hip
44
// RUN: %{build} -fno-builtin %{mathflags} -o %t.out
5-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
6-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
7-
// RUN: %ACC_RUN_PLACEHOLDER %t.out
5+
// RUN: %{run} %t.out
86

97
// RUN: %{build} -fno-builtin -fsycl-device-lib-jit-link %{mathflags} -o %t.out
10-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
11-
// RUN: %ACC_RUN_PLACEHOLDER %t.out
8+
// RUN: %if !gpu %{ %{run} %t.out %}
129

1310
#include "math_utils.hpp"
1411
#include <cmath>

sycl/test-e2e/DeviceLib/math_fp64_test.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
// REQUIRES: aspect-fp64
22
// UNSUPPORTED: hip
33
// RUN: %{build} -o %t.out
4-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
5-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
6-
// RUN: %ACC_RUN_PLACEHOLDER %t.out
4+
// RUN: %{run} %t.out
75

86
// RUN: %clangxx -fsycl -fsycl-device-lib-jit-link %s -o %t.out
9-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
10-
// RUN: %ACC_RUN_PLACEHOLDER %t.out
7+
// RUN: %if !gpu %{ %{run} %t.out %}
118

129
#include "math_utils.hpp"
1310
#include <cstdint>

sycl/test-e2e/DeviceLib/math_test.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
// UNSUPPORTED: hip
22
// RUN: %{build} -o %t.out
3-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
4-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
5-
// RUN: %ACC_RUN_PLACEHOLDER %t.out
3+
// RUN: %{run} %t.out
64

75
// RUN: %{build} -fsycl-device-lib-jit-link -o %t.out
8-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
9-
// RUN: %ACC_RUN_PLACEHOLDER %t.out
6+
// RUN: %if !gpu %{ %{run} %t.out %}
107

118
#include "math_utils.hpp"
129
#include <cstdint>

sycl/test-e2e/DeviceLib/string_test.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
// UNSUPPORTED: hip
22
// RUN: %{build} -fno-builtin -o %t.out
3-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
4-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
5-
// RUN: %ACC_RUN_PLACEHOLDER %t.out
3+
// RUN: %{run} %t.out
64

75
// RUN: %{build} -fno-builtin -fsycl-device-lib-jit-link -o %t.out
8-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
9-
// RUN: %ACC_RUN_PLACEHOLDER %t.out
6+
// RUN: %if !gpu %{ %{run} %t.out %}
107

118
#include <cassert>
129
#include <cstdint>

sycl/test-e2e/KernelAndProgram/build-log.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33

44
// RUN: %{build} -DGPU -o %t_gpu.out
55
// RUN: %{build} -o %t.out
6-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
7-
// RUN: %GPU_RUN_PLACEHOLDER %t_gpu.out
8-
// RUN: %ACC_RUN_PLACEHOLDER %t.out
6+
// RUN: %{run} %if gpu %{ %t_gpu.out %} %else %{ %t.out %}
97
//
108
//==--- build-log.cpp - Test log message from faild build ----------==//
119
//

sycl/test-e2e/KernelAndProgram/cache-build-result.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33

44
// RUN: %{build} -DSYCL_DISABLE_FALLBACK_ASSERT=1 -o %t.out
55
// RUN: %{build} -DSYCL_DISABLE_FALLBACK_ASSERT=1 -DGPU -o %t_gpu.out
6-
// RUN: env SYCL_CACHE_PERSISTENT=1 %CPU_RUN_PLACEHOLDER %t.out
7-
// RUN: env SYCL_CACHE_PERSISTENT=1 %GPU_RUN_PLACEHOLDER %t_gpu.out
8-
// RUN: env SYCL_CACHE_PERSISTENT=1 %ACC_RUN_PLACEHOLDER %t.out
6+
// RUN: env SYCL_CACHE_PERSISTENT=1 %{run} %if gpu %{ %t_gpu.out %} %else %{ %t.out %}
97

108
#include <sycl/sycl.hpp>
119

sycl/test-e2e/Regression/barrier_with_work.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
// RUN: %{build} -o %t.event_list.out
2-
// RUN: %CPU_RUN_PLACEHOLDER %t.event_list.out
3-
// RUN: env SYCL_PI_LEVEL_ZERO_USE_MULTIPLE_COMMANDLIST_BARRIERS=1 %GPU_RUN_PLACEHOLDER %t.event_list.out
4-
// RUN: %ACC_RUN_PLACEHOLDER %t.event_list.out
2+
// RUN: %if gpu %{ env SYCL_PI_LEVEL_ZERO_USE_MULTIPLE_COMMANDLIST_BARRIERS=1 %} %{run} %t.event_list.out
53
// RUN: %{build} -DUSE_QUEUE_WIDE_BARRIER -o %t.queue_wide.out
6-
// RUN: %CPU_RUN_PLACEHOLDER %t.queue_wide.out
7-
// RUN: env SYCL_PI_LEVEL_ZERO_USE_MULTIPLE_COMMANDLIST_BARRIERS=1 %GPU_RUN_PLACEHOLDER %t.queue_wide.out
8-
// RUN: %ACC_RUN_PLACEHOLDER %t.queue_wide.out
4+
// RUN: %if gpu %{ env SYCL_PI_LEVEL_ZERO_USE_MULTIPLE_COMMANDLIST_BARRIERS=1 %} %{run} %t.queue_wide.out
95
//
106
// Tests that barriers block all following execution on queues with active work.
117
// For L0 we currently need to set

sycl/test-e2e/format.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,22 @@ def execute(self, test, litConfig):
3232
cmd = directive.command.replace(
3333
'%{run}',
3434
'env ONEAPI_DEVICE_SELECTOR={} {}'.format(sycl_device, test.config.run_launcher))
35+
# Expand device-specific condtions (%if ... %{ ... %}).
36+
tmp_script = [ cmd ]
37+
conditions = {x: True for x in sycl_device.split(':')}
38+
for os in ['linux', 'windows']:
39+
if os in test.config.available_features:
40+
conditions[os] = True
41+
42+
tmp_script = lit.TestRunner.applySubstitutions(
43+
tmp_script, [], conditions, recursion_limit=test.config.recursiveExpansionLimit)
3544

3645
new_script.append(
3746
lit.TestRunner.CommandDirective(
3847
directive.start_line_number,
3948
directive.end_line_number,
4049
directive.keyword,
41-
cmd))
50+
tmp_script[0]))
4251
script = new_script
4352

4453
conditions = { feature: True for feature in test.config.available_features }

0 commit comments

Comments
 (0)