Skip to content

Commit eaea5ad

Browse files
committed
Re-enable tests and disable only the failing ones.
1 parent 330edc2 commit eaea5ad

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,6 @@ jobs:
684684
echo "CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH" >> $GITHUB_ENV
685685
686686
- name: Build and Test/Install CppInterOp on Windows systems
687-
continue-on-error: true
688687
if: ${{ runner.os == 'windows' }}
689688
run: |
690689
#FIXME: Windows CppInterOp tests expected to fail

unittests/CppInterOp/DynamicLibraryManagerTest.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ std::string GetExecutablePath(const char* Argv0) {
1717
return llvm::sys::fs::getMainExecutable(Argv0, MainAddr);
1818
}
1919

20+
#ifdef _WIN32
21+
TEST(DynamicLibraryManagerTest, DISABLED_Sanity) {
22+
#else
2023
TEST(DynamicLibraryManagerTest, Sanity) {
24+
#endif // _WIN32
2125
EXPECT_TRUE(Cpp::CreateInterpreter());
2226
EXPECT_FALSE(Cpp::GetFunctionAddress("ret_zero"));
2327

unittests/CppInterOp/FunctionReflectionTest.cpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,11 @@ TEST(FunctionReflectionTest, IsStaticMethod) {
553553
EXPECT_TRUE(Cpp::IsStaticMethod(SubDecls[2]));
554554
}
555555

556+
#ifdef _WIN32
557+
TEST(FunctionReflectionTest, DISABLED_GetFunctionAddress) {
558+
#else
556559
TEST(FunctionReflectionTest, GetFunctionAddress) {
560+
#endif // _WIN32
557561
std::vector<Decl*> Decls, SubDecls;
558562
std::string code = "int f1(int i) { return i * i; }";
559563

@@ -613,8 +617,11 @@ TEST(FunctionReflectionTest, JitCallAdvanced) {
613617
Cpp::Destruct(object, Decls[1]);
614618
}
615619

616-
620+
#ifdef _WIN32
621+
TEST(FunctionReflectionTest, DISABLED_GetFunctionCallWrapper) {
622+
#else
617623
TEST(FunctionReflectionTest, GetFunctionCallWrapper) {
624+
#endif // _WIN32
618625
std::vector<Decl*> Decls;
619626
std::string code = R"(
620627
int f1(int i) { return i * i; }
@@ -777,7 +784,11 @@ TEST(FunctionReflectionTest, GetFunctionArgDefault) {
777784
EXPECT_EQ(Cpp::GetFunctionArgDefault(Decls[1], 2), "34126");
778785
}
779786

787+
#ifdef _WIN32
788+
TEST(FunctionReflectionTest, DISABLED_Construct) {
789+
#else
780790
TEST(FunctionReflectionTest, Construct) {
791+
#endif // _WIN32
781792
Cpp::CreateInterpreter();
782793

783794
Interp->declare(R"(
@@ -811,7 +822,11 @@ TEST(FunctionReflectionTest, Construct) {
811822
EXPECT_EQ(output, "Constructor Executed");
812823
}
813824

825+
#ifdef _WIN32
826+
TEST(FunctionReflectionTest, DISABLED_Destruct) {
827+
#else
814828
TEST(FunctionReflectionTest, Destruct) {
829+
#endif // _WIN32
815830
Cpp::CreateInterpreter();
816831

817832
Interp->declare(R"(

unittests/CppInterOp/InterpreterTest.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ TEST(InterpreterTest, Evaluate) {
5353
EXPECT_FALSE(HadError) ;
5454
}
5555

56+
#ifdef _WIN32
57+
TEST(InterpreterTest, DISABLED_Process) {
58+
#else
5659
TEST(InterpreterTest, Process) {
60+
#endif // _WIN32
5761
Cpp::CreateInterpreter();
5862
EXPECT_TRUE(Cpp::Process("") == 0);
5963
EXPECT_TRUE(Cpp::Process("int a = 12;") == 0);
@@ -85,11 +89,11 @@ TEST(InterpreterTest, CreateInterpreter) {
8589
EXPECT_FALSE(Cpp::GetNamed("cppUnknown"));
8690
}
8791

88-
#ifdef LLVM_BINARY_DIR
92+
#if defined(LLVM_BINARY_DIR) && !defined(_WIN32)
8993
TEST(InterpreterTest, DetectResourceDir) {
9094
#else
9195
TEST(InterpreterTest, DISABLED_DetectResourceDir) {
92-
#endif // LLVM_BINARY_DIR
96+
#endif // LLVM_BINARY_DIR || !_WIN32
9397
Cpp::CreateInterpreter();
9498
EXPECT_STRNE(Cpp::DetectResourceDir().c_str(), Cpp::GetResourceDir());
9599
llvm::SmallString<256> Clang(LLVM_BINARY_DIR);
@@ -98,7 +102,11 @@ TEST(InterpreterTest, DISABLED_DetectResourceDir) {
98102
EXPECT_STREQ(DetectedPath.c_str(), Cpp::GetResourceDir());
99103
}
100104

105+
#ifdef _WIN32
106+
TEST(InterpreterTest, DISABLED_DetectSystemCompilerIncludePaths) {
107+
#else
101108
TEST(InterpreterTest, DetectSystemCompilerIncludePaths) {
109+
#endif // _WIN32
102110
std::vector<std::string> includes;
103111
Cpp::DetectSystemCompilerIncludePaths(includes);
104112
EXPECT_FALSE(includes.empty());

0 commit comments

Comments
 (0)