Skip to content

Commit 1cba3bb

Browse files
[SYCL][E2E] Reduce number of FileCheck uses (#18848)
LIT is perfectly capable of checking the exit code and there is no need to deal with any extra output parsing and I/O.
1 parent d829db7 commit 1cba3bb

File tree

6 files changed

+11
-25
lines changed

6 files changed

+11
-25
lines changed

sycl/test-e2e/Adapters/level_zero/track_indirect_access_memory.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// REQUIRES: level_zero, level_zero_dev_kit
22
// RUN: %{build} %level_zero_options %threads_lib -o %t.out
3-
// RUN: env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 %{run} %t.out 2>&1 | FileCheck %s
4-
//
5-
// CHECK: pass
3+
// RUN: env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 %{run} %t.out 2>&1
64
//
75
// Test checks memory tracking and deferred release functionality which is
86
// enabled by SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY env variable.
@@ -120,6 +118,5 @@ int main() {
120118
update_d3_data(q);
121119
}
122120

123-
std::cout << "pass" << std::endl;
124121
return 0;
125122
}

sycl/test-e2e/Adapters/level_zero/uuid.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
// REQUIRES: gpu, level_zero, level_zero_dev_kit
33

44
// RUN: %{build} %level_zero_options -o %t.out
5-
// RUN: %{run} %t.out 2>&1 | FileCheck %s
5+
// RUN: %{run} %t.out 2>&1
66

77
// Test that the UUID is read correctly from Level Zero.
88

9-
// CHECK: PASSED
109
#include <iomanip>
1110
#include <iostream>
1211
#include <level_zero/ze_api.h>
@@ -36,6 +35,6 @@ int main() {
3635
std::cout << "FAILED" << std::endl;
3736
return -1;
3837
}
39-
std::cout << "PASSED" << std::endl;
38+
4039
return 0;
4140
}

sycl/test-e2e/Config/kernel_from_file.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
// >> ---- translate to SPIR-V
1515
// RUN: llvm-spirv -o %t.spv %t_app.bc
1616
// RUN: %clangxx -Wno-error=ignored-attributes %sycl_include -DSYCL_DISABLE_FALLBACK_ASSERT %cxx_std_optionc++17 %include_option %t.h %s -o %t.out %sycl_options -Xclang -verify-ignore-unexpected=note,warning %if preview-mode %{-Wno-unused-command-line-argument%}
17-
// RUN: env SYCL_USE_KERNEL_SPV=%t.spv %{run} %t.out | FileCheck %s
18-
// CHECK: Passed
17+
// RUN: env SYCL_USE_KERNEL_SPV=%t.spv %{run} %t.out
1918

2019
#include <iostream>
2120
#include <sycl/detail/core.hpp>
@@ -45,11 +44,10 @@ int main(int argc, char **argv) {
4544
return 1;
4645
}
4746

48-
if (data == 6) {
49-
std::cout << "Passed\n";
50-
return 0;
51-
} else {
52-
std::cout << "Failed: " << data << "!= 6(gold)\n";
47+
if (data != 6) {
48+
std::cerr << "Failed: " << data << "!= 6(gold)\n";
5349
return 1;
5450
}
51+
52+
return 0;
5553
}

sycl/test-e2e/ESIMD/spec_const/spec_const_redefine.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,11 @@ int main(int argc, char **argv) {
8787
passed = false;
8888
}
8989
}
90-
std::cout << (passed ? "passed\n" : "FAILED\n");
90+
if (!passed)
91+
std::cout << "FAILED\n";
9192
return passed ? 0 : 1;
9293
}
9394

9495
// --- Check that only two JIT compilation happened:
9596
// CHECK-COUNT-2: <--- urProgramBuildExp
9697
// CHECK-NOT: <--- urProgramBuildExp
97-
// --- Check that the test completed with expected results:
98-
// CHECK: passed

sycl/test-e2e/Regression/implicit_kernel_bundle_image_filtering.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,9 @@ int main() {
3838
[&](sycl::handler &CGH) { CGH.single_task<class Kernel2>([=]() {}); });
3939
Q.wait_and_throw();
4040
}
41-
std::cout << "passed" << std::endl;
4241
return 0;
4342
}
4443

4544
// --- Check that only a single program is built:
4645
// CHECK: <--- urProgramBuildExp
4746
// CHECK-NOT: <--- urProgramBuildExp
48-
// --- Check that the test completed with expected results:
49-
// CHECK: passed

sycl/test-e2e/SeparateCompile/test.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@
5151
//
5252
// >> ---- link the full hetero app
5353
// RUN: %clangxx wrapper.o a.o b.o -Wno-unused-command-line-argument -o app.exe %sycl_options
54-
// RUN: %{run} ./app.exe | FileCheck %s
55-
// CHECK: pass
54+
// RUN: %{run} ./app.exe
5655

5756
//==----------- test.cpp - Tests SYCL separate compilation -----------------==//
5857
//
@@ -125,9 +124,6 @@ int main(int argc, char **argv) {
125124
pass = false;
126125
}
127126

128-
if (pass) {
129-
std::cout << "pass\n";
130-
}
131127
return pass ? 0 : 1;
132128
}
133129
#endif // !B_CPP

0 commit comments

Comments
 (0)