Skip to content

Commit f563d3a

Browse files
committed
Build integration test as a normal unit test executable, opt-in to integration testing
Change-Id: I5cad36511c88dd7d6b8a05d4f58d8ee98da35e3f
1 parent bdf1f7a commit f563d3a

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

ci/travis_script_cpp.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,4 @@ make lint
3434

3535
ctest -VV -L unittest
3636

37-
# Also run the integration tests self tests
38-
debug/json-integration-test --unittest --verbose
39-
4037
popd

cpp/src/arrow/ipc/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ ADD_ARROW_TEST(ipc-json-test)
8585
ARROW_TEST_LINK_LIBRARIES(ipc-json-test
8686
${ARROW_IPC_TEST_LINK_LIBS})
8787

88-
add_executable(json-integration-test json-integration-test.cc)
88+
ADD_ARROW_TEST(json-integration-test)
8989

9090
if (APPLE)
9191
target_link_libraries(json-integration-test

cpp/src/arrow/ipc/json-integration-test.cc

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ DEFINE_string(arrow, "", "Arrow file name");
4040
DEFINE_string(json, "", "JSON file name");
4141
DEFINE_string(mode, "VALIDATE",
4242
"Mode of integration testing tool (ARROW_TO_JSON, JSON_TO_ARROW, VALIDATE)");
43-
DEFINE_bool(unittest, false, "Run integration test self unit tests");
44-
DEFINE_bool(verbose, false, "Verbose output");
43+
DEFINE_bool(integration, false, "Run in integration test mode");
44+
DEFINE_bool(verbose, true, "Verbose output");
4545

4646
namespace fs = boost::filesystem;
4747

@@ -366,16 +366,15 @@ TEST_F(TestJSONIntegration, ErrorStates) {
366366
int main(int argc, char** argv) {
367367
gflags::ParseCommandLineFlags(&argc, &argv, true);
368368

369-
if (FLAGS_unittest) {
369+
if (FLAGS_integration) {
370+
arrow::Status result = arrow::RunCommand(FLAGS_json, FLAGS_arrow, FLAGS_mode);
371+
if (!result.ok()) {
372+
std::cout << "Error message: " << result.ToString() << std::endl;
373+
return 1;
374+
}
375+
} else {
370376
::testing::InitGoogleTest(&argc, argv);
371377
return RUN_ALL_TESTS();
372378
}
373-
374-
arrow::Status result = arrow::RunCommand(FLAGS_json, FLAGS_arrow, FLAGS_mode);
375-
if (!result.ok()) {
376-
std::cout << "Error message: " << result.ToString() << std::endl;
377-
return 1;
378-
}
379-
380379
return 0;
381380
}

0 commit comments

Comments
 (0)