File tree 3 files changed +6
-20
lines changed
3 files changed +6
-20
lines changed Original file line number Diff line number Diff line change @@ -827,7 +827,6 @@ jobs:
827
827
-DBUILD_SHARED_LIBS=ON \
828
828
-DCODE_COVERAGE=${{ env.CODE_COVERAGE }} \
829
829
-DCMAKE_INSTALL_PREFIX=$CPPINTEROP_DIR \
830
- -DTEST_INTEROP_CUDA=0 \
831
830
../
832
831
fi
833
832
os="${{ matrix.os }}"
Original file line number Diff line number Diff line change @@ -2,14 +2,8 @@ set(LLVM_LINK_COMPONENTS
2
2
Support
3
3
)
4
4
5
- option (TEST_INTEROP_CUDA "Enables the CUDA Tests" ON )
6
-
7
- if (TEST_INTEROP_CUDA)
8
- add_definitions (-DTEST_INTEROP_CUDA)
9
- add_cppinterop_unittest(CppInterOpCUDATests CUDATest.cpp)
10
- endif ()
11
-
12
5
add_cppinterop_unittest(CppInterOpTests
6
+ CUDATest.cpp
13
7
EnumReflectionTest.cpp
14
8
FunctionReflectionTest.cpp
15
9
InterpreterTest.cpp
@@ -19,24 +13,15 @@ add_cppinterop_unittest(CppInterOpTests
19
13
Utils.cpp
20
14
VariableReflectionTest.cpp
21
15
)
22
-
23
16
target_link_libraries (CppInterOpTests
24
17
PRIVATE
25
18
clangCppInterOp
26
19
)
27
20
28
- target_link_libraries (CppInterOpCUDATests
29
- PRIVATE
30
- clangCppInterOp
31
- )
32
-
33
21
set_source_files_properties (InterpreterTest.cpp PROPERTIES COMPILE_DEFINITIONS
34
22
"LLVM_BINARY_DIR=\" ${LLVM_BINARY_DIR} \" "
35
23
)
36
-
37
- export_executable_symbols(CppInterOpTests
38
- CppInterOpCUDATests
39
- )
24
+ export_executable_symbols(CppInterOpTests)
40
25
41
26
unset (LLVM_LINK_COMPONENTS)
42
27
Original file line number Diff line number Diff line change @@ -46,12 +46,14 @@ TEST(DISABLED_CUDATest, Sanity) {
46
46
#else
47
47
TEST (CUDATest, Sanity) {
48
48
#endif // CLANG_VERSION_MAJOR < 16
49
+ if (!HasCudaSDK ())
50
+ GTEST_SKIP () << " Skipping CUDA tests as CUDA SDK not found" ;
49
51
EXPECT_TRUE (Cpp::CreateInterpreter ({}, {" --cuda" }));
50
52
}
51
53
52
54
TEST (CUDATest, CUDAH) {
53
55
if (!HasCudaSDK ())
54
- return ;
56
+ GTEST_SKIP () << " Skipping CUDA tests as CUDA SDK not found " ;
55
57
56
58
Cpp::CreateInterpreter ({}, {" --cuda" });
57
59
bool success = !Cpp::Declare (" #include <cuda.h>" );
@@ -60,7 +62,7 @@ TEST(CUDATest, CUDAH) {
60
62
61
63
TEST (CUDATest, CUDARuntime) {
62
64
if (!HasCudaSDK ())
63
- return ;
65
+ GTEST_SKIP () << " Skipping CUDA tests as CUDA SDK not found " ;
64
66
65
67
EXPECT_TRUE (HasCudaRuntime ());
66
68
}
You can’t perform that action at this time.
0 commit comments