Skip to content

Commit e5d06de

Browse files
aaronj0mcbarton
andcommitted
[test] disable failing tests on Win32 ARM for Cling
Co-authored-by: mcbarton <[email protected]>
1 parent aff9136 commit e5d06de

5 files changed

+38
-1
lines changed

unittests/CppInterOp/DynamicLibraryManagerTest.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ TEST(DynamicLibraryManagerTest, Sanity) {
2222
#ifdef EMSCRIPTEN
2323
GTEST_SKIP() << "Test fails for Emscipten builds";
2424
#endif
25+
26+
#if CLANG_VERSION_MAJOR == 18 && defined(CPPINTEROP_USE_CLING) && \
27+
defined(_WIN32)
28+
GTEST_SKIP() << "Test fails with Cling on Windows";
29+
#endif
30+
2531
EXPECT_TRUE(Cpp::CreateInterpreter());
2632
EXPECT_FALSE(Cpp::GetFunctionAddress("ret_zero"));
2733

unittests/CppInterOp/FunctionReflectionTest.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,10 @@ TEST(FunctionReflectionTest, ExistsFunctionTemplate) {
637637
}
638638

639639
TEST(FunctionReflectionTest, InstantiateTemplateFunctionFromString) {
640+
#if CLANG_VERSION_MAJOR == 18 && defined(CPPINTEROP_USE_CLING) && \
641+
defined(_WIN32) && (defined(_M_ARM) || defined(_M_ARM64))
642+
GTEST_SKIP() << "Test fails with Cling on Windows on ARM";
643+
#endif
640644
if (llvm::sys::RunningOnValgrind())
641645
GTEST_SKIP() << "XFAIL due to Valgrind report";
642646
std::vector<const char*> interpreter_args = { "-include", "new" };

unittests/CppInterOp/ScopeReflectionTest.cpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "clang-c/CXCppInterOp.h"
55

66
#include "clang/AST/ASTContext.h"
7-
#include "clang/Interpreter/CppInterOp.h"
7+
#include "clang/Basic/Version.h"
88
#include "clang/Frontend/CompilerInstance.h"
99
#include "clang/Sema/Sema.h"
1010

@@ -163,6 +163,11 @@ TEST(ScopeReflectionTest, SizeOf) {
163163

164164

165165
TEST(ScopeReflectionTest, IsBuiltin) {
166+
#if CLANG_VERSION_MAJOR == 18 && defined(CPPINTEROP_USE_CLING) && \
167+
defined(_WIN32) && (defined(_M_ARM) || defined(_M_ARM64))
168+
GTEST_SKIP() << "Test fails with Cling on Windows on ARM";
169+
#endif
170+
166171
// static std::set<std::string> g_builtins =
167172
// {"bool", "char", "signed char", "unsigned char", "wchar_t", "short", "unsigned short",
168173
// "int", "unsigned int", "long", "unsigned long", "long long", "unsigned long long",
@@ -495,6 +500,10 @@ TEST(ScopeReflectionTest, GetScopefromCompleteName) {
495500
}
496501

497502
TEST(ScopeReflectionTest, GetNamed) {
503+
#if CLANG_VERSION_MAJOR == 18 && defined(CPPINTEROP_USE_CLING) && \
504+
defined(_WIN32) && (defined(_M_ARM) || defined(_M_ARM64))
505+
GTEST_SKIP() << "Test fails with Cling on Windows on ARM";
506+
#endif
498507
std::string code = R"(namespace N1 {
499508
namespace N2 {
500509
class C {
@@ -883,6 +892,10 @@ template<typename T> T TrivialFnTemplate() { return T(); }
883892
}
884893

885894
TEST(ScopeReflectionTest, InstantiateTemplateFunctionFromString) {
895+
#if CLANG_VERSION_MAJOR == 18 && defined(CPPINTEROP_USE_CLING) && \
896+
defined(_WIN32) && (defined(_M_ARM) || defined(_M_ARM64))
897+
GTEST_SKIP() << "Test fails with Cling on Windows on ARM";
898+
#endif
886899
if (llvm::sys::RunningOnValgrind())
887900
GTEST_SKIP() << "XFAIL due to Valgrind report";
888901
std::vector<const char*> interpreter_args = {"-include", "new"};
@@ -1024,6 +1037,10 @@ TEST(ScopeReflectionTest, GetClassTemplateInstantiationArgs) {
10241037

10251038

10261039
TEST(ScopeReflectionTest, IncludeVector) {
1040+
#if CLANG_VERSION_MAJOR == 18 && defined(CPPINTEROP_USE_CLING) && \
1041+
defined(_WIN32) && (defined(_M_ARM) || defined(_M_ARM64))
1042+
GTEST_SKIP() << "Test fails with Cling on Windows on ARM";
1043+
#endif
10271044
if (llvm::sys::RunningOnValgrind())
10281045
GTEST_SKIP() << "XFAIL due to Valgrind report";
10291046
std::string code = R"(

unittests/CppInterOp/TypeReflectionTest.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "Utils.h"
22

33
#include "clang/AST/ASTContext.h"
4+
#include "clang/Basic/Version.h"
45
#include "clang/Interpreter/CppInterOp.h"
56
#include "clang/Frontend/CompilerInstance.h"
67
#include "clang/Sema/Sema.h"
@@ -548,6 +549,10 @@ TEST(TypeReflectionTest, IsPODType) {
548549
}
549550

550551
TEST(TypeReflectionTest, IsSmartPtrType) {
552+
#if CLANG_VERSION_MAJOR == 18 && defined(CPPINTEROP_USE_CLING) && \
553+
defined(_WIN32) && (defined(_M_ARM) || defined(_M_ARM64))
554+
GTEST_SKIP() << "Test fails with Cling on Windows on ARM";
555+
#endif
551556
if (llvm::sys::RunningOnValgrind())
552557
GTEST_SKIP() << "XFAIL due to Valgrind report";
553558

unittests/CppInterOp/VariableReflectionTest.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "Utils.h"
22

33
#include "clang/AST/ASTContext.h"
4+
#include "clang/Basic/Version.h"
45
#include "clang/Interpreter/CppInterOp.h"
56
#include "clang/Frontend/CompilerInstance.h"
67
#include "clang/Sema/Sema.h"
@@ -333,6 +334,10 @@ TEST(VariableReflectionTest, GetVariableOffset) {
333334
CODE
334335

335336
TEST(VariableReflectionTest, VariableOffsetsWithInheritance) {
337+
#if CLANG_VERSION_MAJOR == 18 && defined(CPPINTEROP_USE_CLING) && \
338+
defined(_WIN32) && (defined(_M_ARM) || defined(_M_ARM64))
339+
GTEST_SKIP() << "Test fails with Cling on Windows on ARM";
340+
#endif
336341
if (llvm::sys::RunningOnValgrind())
337342
GTEST_SKIP() << "XFAIL due to Valgrind report";
338343

0 commit comments

Comments
 (0)