Skip to content

Commit 56f3619

Browse files
committed
disable text format tests on windows
1 parent f4a706e commit 56f3619

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

src/substrait/common/tests/IoTest.cpp

+15-5
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,24 @@ TEST_P(SaveAndLoadTestFixture, SaveAndLoad) {
109109
})")));
110110
}
111111

112+
static auto getFormats() {
113+
return testing::Values(
114+
PlanFileFormat::kBinary,
115+
PlanFileFormat::kJson,
116+
PlanFileFormat::kProtoText
117+
118+
#ifndef _WIN32
119+
// Text format is currently not supported on Windows
120+
,
121+
PlanFileFormat::kText
122+
#endif
123+
);
124+
}
125+
112126
INSTANTIATE_TEST_SUITE_P(
113127
SaveAndLoadTests,
114128
SaveAndLoadTestFixture,
115-
testing::Values(
116-
PlanFileFormat::kBinary,
117-
PlanFileFormat::kJson,
118-
PlanFileFormat::kProtoText,
119-
PlanFileFormat::kText),
129+
getFormats(),
120130
[](const testing::TestParamInfo<SaveAndLoadTestFixture::ParamType>& info) {
121131
return planFileEncodingToString(info.param);
122132
});

src/substrait/textplan/parser/tests/TextPlanParserTest.cpp

+9-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@ class TestCase {
2727
::testing::Matcher<const ParseResult&> expectedMatch;
2828
};
2929

30-
class TextPlanParserTestFixture : public ::testing::TestWithParam<TestCase> {};
30+
class TextPlanParserTestFixture : public ::testing::TestWithParam<TestCase> {
31+
void SetUp() override {
32+
#if defined(_WIN32) || defined(_WIN64)
33+
GTEST_SKIP() << "Skipping textplanparser test on Windows.";
34+
#endif
35+
::testing::TestWithParam<TestCase>::SetUp();
36+
}
37+
};
3138

3239
std::vector<TestCase> getTestCases() {
3340
static std::vector<TestCase> cases = {
@@ -1301,7 +1308,7 @@ std::vector<TestCase> getTestCases() {
13011308
return cases;
13021309
}
13031310

1304-
TEST(TextPlanParser, LoadFromFile) {
1311+
TEST_P(TextPlanParserTestFixture, LoadFromFile) {
13051312
auto stream = loadTextFile("data/provided_sample1.splan");
13061313
ASSERT_TRUE(stream.has_value()) << "Test input file missing.";
13071314
auto result = parseStream(&*stream);

0 commit comments

Comments
 (0)