diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 311b3058e..507d7288d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -827,7 +827,6 @@ jobs: -DBUILD_SHARED_LIBS=ON \ -DCODE_COVERAGE=${{ env.CODE_COVERAGE }} \ -DCMAKE_INSTALL_PREFIX=$CPPINTEROP_DIR \ - -DTEST_INTEROP_CUDA=0 \ ../ fi os="${{ matrix.os }}" diff --git a/unittests/CppInterOp/CMakeLists.txt b/unittests/CppInterOp/CMakeLists.txt index 47e714da5..00e455605 100644 --- a/unittests/CppInterOp/CMakeLists.txt +++ b/unittests/CppInterOp/CMakeLists.txt @@ -2,14 +2,8 @@ set(LLVM_LINK_COMPONENTS Support ) -option(TEST_INTEROP_CUDA "Enables the CUDA Tests" ON) - -if (TEST_INTEROP_CUDA) - add_definitions(-DTEST_INTEROP_CUDA) - add_cppinterop_unittest(CppInterOpCUDATests CUDATest.cpp) -endif() - add_cppinterop_unittest(CppInterOpTests + CUDATest.cpp EnumReflectionTest.cpp FunctionReflectionTest.cpp InterpreterTest.cpp @@ -19,24 +13,15 @@ add_cppinterop_unittest(CppInterOpTests Utils.cpp VariableReflectionTest.cpp ) - target_link_libraries(CppInterOpTests PRIVATE clangCppInterOp ) -target_link_libraries(CppInterOpCUDATests - PRIVATE - clangCppInterOp - ) - set_source_files_properties(InterpreterTest.cpp PROPERTIES COMPILE_DEFINITIONS "LLVM_BINARY_DIR=\"${LLVM_BINARY_DIR}\"" ) - -export_executable_symbols(CppInterOpTests - CppInterOpCUDATests - ) +export_executable_symbols(CppInterOpTests) unset(LLVM_LINK_COMPONENTS) diff --git a/unittests/CppInterOp/CUDATest.cpp b/unittests/CppInterOp/CUDATest.cpp index aced45f94..0ab0bed9a 100644 --- a/unittests/CppInterOp/CUDATest.cpp +++ b/unittests/CppInterOp/CUDATest.cpp @@ -51,7 +51,7 @@ TEST(CUDATest, Sanity) { TEST(CUDATest, CUDAH) { if (!HasCudaSDK()) - return; + GTEST_SKIP() << "Skipping CUDA tests as CUDA SDK not found"; Cpp::CreateInterpreter({}, {"--cuda"}); bool success = !Cpp::Declare("#include "); @@ -60,7 +60,7 @@ TEST(CUDATest, CUDAH) { TEST(CUDATest, CUDARuntime) { if (!HasCudaSDK()) - return; + GTEST_SKIP() << "Skipping CUDA tests as CUDA SDK not found"; EXPECT_TRUE(HasCudaRuntime()); }