Skip to content

Commit 2828d4e

Browse files
authored
Skip tests which fail for Emscripten static library build
1 parent dca66dc commit 2828d4e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,10 @@ else()
305305
message(FATAL_ERROR "We need either CPPINTEROP_USE_CLING or CPPINTEROP_USE_REPL")
306306
endif()
307307

308+
if (EMSCRIPTEN AND NOT BUILD_SHARED_LIBS)
309+
add_definitions(-DEMSCRIPTEN_STATIC_LIBRARY)
310+
endif()
311+
308312
include_directories(SYSTEM ${CLANG_INCLUDE_DIRS})
309313
include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
310314
separate_arguments(LLVM_DEFINITIONS_LIST NATIVE_COMMAND ${LLVM_DEFINITIONS})

unittests/CppInterOp/InterpreterTest.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ TEST(InterpreterTest, DeleteInterpreter) {
9999
}
100100

101101
TEST(InterpreterTest, ActivateInterpreter) {
102+
#ifdef EMSCRIPTEN_STATIC_LIBRARY
103+
GTEST_SKIP() << "Test fails for Emscipten static library build";
104+
#endif // EMSCRIPTEN_STATIC_LIBRARY
102105
EXPECT_FALSE(Cpp::ActivateInterpreter(nullptr));
103106
auto* Cpp14 = Cpp::CreateInterpreter({"-std=c++14"});
104107
auto* Cpp17 = Cpp::CreateInterpreter({"-std=c++17"});
@@ -122,6 +125,9 @@ TEST(InterpreterTest, ActivateInterpreter) {
122125
}
123126

124127
TEST(InterpreterTest, Process) {
128+
#ifdef EMSCRIPTEN_STATIC_LIBRARY
129+
GTEST_SKIP() << "Test fails for Emscipten static library build";
130+
#endif // EMSCRIPTEN_STATIC_LIBRARY
125131
#ifdef _WIN32
126132
GTEST_SKIP() << "Disabled on Windows. Needs fixing.";
127133
#endif

0 commit comments

Comments
 (0)