Skip to content

Commit

Permalink
Disable client_test.cc on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lidavidm committed Jul 5, 2022
1 parent 5368d61 commit 09ee32b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
11 changes: 9 additions & 2 deletions cpp/src/arrow/flight/sql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,18 @@ if(ARROW_BUILD_TESTS OR ARROW_BUILD_EXAMPLES)
example/sqlite_statement_batch_reader.cc
example/sqlite_server.cc
example/sqlite_tables_schema_batch_reader.cc)
set(ARROW_FLIGHT_SQL_TEST_SRCS server_test.cc)
if(NOT MSVC AND NOT MINGW)
# ARROW-16902: getting Protobuf generated code to have all the
# proper dllexport/dllimport declarations is difficult, since
# protoc does not insert them everywhere needed to satisfy both
# MinGW and MSVC, and the Protobuf team recommends against it
list(APPEND ARROW_FLIGHT_SQL_TEST_SRCS client_test.cc)
endif()

add_arrow_test(flight_sql_test
SOURCES
client_test.cc
server_test.cc
${ARROW_FLIGHT_SQL_TEST_SRCS}
${ARROW_FLIGHT_SQL_TEST_SERVER_SRCS}
STATIC_LINK_LIBS
${ARROW_FLIGHT_SQL_TEST_LINK_LIBS}
Expand Down
11 changes: 1 addition & 10 deletions cpp/src/arrow/flight/sql/client_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,9 @@

#include <utility>

// XXX(ARROW-16902): Protobuf doesn't insert dllimport declarations in
// all the right places for MinGW (causing an error "redeclared
// without dllimport attribute"). Instead, just omit them and rely on
// symbols being found implicitly.
#if defined(__MINGW32__)
#define ARROW_FLIGHT_SQL_STATIC
#endif
// Must come before Protobuf include
#include "arrow/flight/sql/protocol_internal.h"

#include "arrow/buffer.h"
#include "arrow/flight/sql/api.h"
#include "arrow/flight/sql/protocol_internal.h"
#include "arrow/testing/gtest_util.h"

namespace pb = arrow::flight::protocol;
Expand Down

0 comments on commit 09ee32b

Please sign in to comment.