ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in tests - #8782

Closed
arw2019 wants to merge 25 commits into
apache:masterfrom
arw2019:ARROW-10746-GTEST_SKIP
Closed

ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in tests#8782
arw2019 wants to merge 25 commits into
apache:masterfrom
arw2019:ARROW-10746-GTEST_SKIP

Conversation

@arw2019

Copy link
Copy Markdown
Contributor

As per a TODO left in ARROW-3769 / #3721 we can now use the GTEST_SKIP macro in parquet/encoding-test.cpp. GTEST_SKIP was added in gtest 1.10.0 so this involves bumping our minimal gtest version from 1.8.1

@github-actions

Copy link
Copy Markdown

@arw2019arw2019 changed the title ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in parquet encoding testsARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in testsNov 26, 2020
@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from ecfef76 to 19c70e4CompareNovember 26, 2020 20:57
@arw2019
arw2019 marked this pull request as draft November 26, 2020 21:22
@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from 0591595 to 2e846d3CompareNovember 27, 2020 00:40
@arw2019arw2019 closed this Nov 27, 2020
@arw2019arw2019 reopened this Nov 27, 2020
@arw2019
arw2019 marked this pull request as ready for review November 27, 2020 01:42
@arw2019

Copy link
Copy Markdown
ContributorAuthor

I think the code changes here are ok. However, at least some of the build errors look related (and persisted across two CI runs) so that's left to figure out

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch 2 times, most recently from 1ebe491 to f073eabCompareNovember 29, 2020 22:08
@pitrou

Copy link
Copy Markdown
Member

Well, at least the ASAN CI job failure seems related:

clang: error: no such file or directory: 'debug//libgtestd.so'

cc @kou@xhochy

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

It seems that the latest GoogleTest doesn't use the default CMAKE_XXX_OUTPUT_DIRECTORY: https://github.com/google/googletest/blob/master/googletest/cmake/internal_utils.cmake#L159-L164

Could you try this?

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index df03c3129..e36571808 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1603,21 +1603,16 @@ macro(build_gtest)
set(GTEST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest_ep-prefix")
set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include")
- set(_GTEST_RUNTIME_DIR ${BUILD_OUTPUT_ROOT_DIRECTORY})+ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
if(MSVC)
set(_GTEST_IMPORTED_TYPE IMPORTED_IMPLIB)
set(_GTEST_LIBRARY_SUFFIX
"${CMAKE_GTEST_DEBUG_EXTENSION}${CMAKE_IMPORT_LIBRARY_SUFFIX}")
- # Use the import libraries from the EP- set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
else()
set(_GTEST_IMPORTED_TYPE IMPORTED_LOCATION)
set(_GTEST_LIBRARY_SUFFIX
"${CMAKE_GTEST_DEBUG_EXTENSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
-- # Library and runtime same on non-Windows- set(_GTEST_LIBRARY_DIR "${_GTEST_RUNTIME_DIR}")
endif()
set(GTEST_SHARED_LIB
@@ -1632,6 +1627,7 @@ macro(build_gtest)
${EP_COMMON_TOOLCHAIN}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
"-DCMAKE_INSTALL_PREFIX=${GTEST_PREFIX}"
+ -DCMAKE_INSTALL_LIBDIR=lib
-DBUILD_SHARED_LIBS=ON
-DCMAKE_CXX_FLAGS=${GTEST_CMAKE_CXX_FLAGS}
-DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${GTEST_CMAKE_CXX_FLAGS})
@@ -1641,27 +1637,6 @@ macro(build_gtest)
set(GTEST_CMAKE_ARGS ${GTEST_CMAKE_ARGS} "-DCMAKE_MACOSX_RPATH:BOOL=ON")
endif()
- if(CMAKE_GENERATOR STREQUAL "Xcode")- # Xcode projects support multi-configuration builds. This forces the gtest build- # to use the same output directory as a single-configuration Makefile driven build.- list(- APPEND GTEST_CMAKE_ARGS "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${_GTEST_LIBRARY_DIR}"- "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- endif()-- if(MSVC)- if(NOT ("${CMAKE_GENERATOR}" STREQUAL "Ninja"))- set(_GTEST_RUNTIME_DIR ${_GTEST_RUNTIME_DIR}/${CMAKE_BUILD_TYPE})- endif()- set(GTEST_CMAKE_ARGS- ${GTEST_CMAKE_ARGS} "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${_GTEST_RUNTIME_DIR}"- "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- else()- list(- APPEND GTEST_CMAKE_ARGS "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${_GTEST_RUNTIME_DIR}"- "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- endif()-
add_definitions(-DGTEST_LINKED_AS_SHARED_LIBRARY=1)
if(MSVC AND NOT ARROW_USE_STATIC_CRT)

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from e91795e to 0bef0c9CompareDecember 1, 2020 02:54
@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

It seems that the template type name T is conflicted with Visual C++. Could you try this patch?

diff --git a/cpp/src/parquet/statistics_test.cc b/cpp/src/parquet/statistics_test.cc
index 0828f36b3..77e77e0eb 100644
--- a/cpp/src/parquet/statistics_test.cc+++ b/cpp/src/parquet/statistics_test.cc@@ -609,7 +609,7 @@ static const int NUM_VALUES = 10;
template <typename TestType>
class TestStatisticsSortOrder : public ::testing::Test {
public:
- typedef typename TestType::c_type T;+ using c_type = typename TestType::c_type;
void AddNodes(std::string name) {
fields_.push_back(schema::PrimitiveNode::Make(
@@ -670,7 +670,7 @@ class TestStatisticsSortOrder : public ::testing::Test {
}
protected:
- std::vector<T> values_;+ std::vector<c_type> values_;
std::vector<uint8_t> values_buf_;
std::vector<schema::NodePtr> fields_;
std::shared_ptr<schema::GroupNode> schema_;
@@ -700,13 +700,13 @@ void TestStatisticsSortOrder<Int32Type>::SetValues() {
// Write UINT32 min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(c_type)));
// Write INT32 min/max values
stats_[1]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::INT64
@@ -728,13 +728,13 @@ void TestStatisticsSortOrder<Int64Type>::SetValues() {
// Write UINT64 min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(c_type)));
// Write INT64 min/max values
stats_[1]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::FLOAT
@@ -747,8 +747,8 @@ void TestStatisticsSortOrder<FloatType>::SetValues() {
// Write Float min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::DOUBLE
@@ -761,8 +761,8 @@ void TestStatisticsSortOrder<DoubleType>::SetValues() {
// Write Double min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::ByteArray

Here is a patch to fix CMake lint failure:

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bdf15e4bc..46872fba3 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1603,7 +1603,7 @@ macro(build_gtest)
set(GTEST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest_ep-prefix")
set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include")
-set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")+ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
if(MSVC)
set(_GTEST_IMPORTED_TYPE IMPORTED_IMPLIB)

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

Could you add required GoogleTest version check?

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bdf15e4bc..60bdf13ad 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1682,7 +1682,7 @@ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
endmacro()
if(ARROW_TESTING)
- resolve_dependency(GTest)+ resolve_dependency(GTest REQUIRED_VERSION 1.10.0)
if(NOT GTEST_VENDORED)
# TODO(wesm): This logic does not work correctly with the MSVC static libraries

@arw2019

Copy link
Copy Markdown
ContributorAuthor

Thanks @kou!!! Pushed your suggestions

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from cffbea4 to cd8f7e8CompareDecember 1, 2020 06:08
@arw2019

Copy link
Copy Markdown
ContributorAuthor

Is this related in C++ / AMD64 Windows 2019?

D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(527,33): error C2039: 'TearDownTestCase': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(525): message : while compiling class template member function 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>::GetTearDownCaseOrSuite(const char *,int)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/column_writer_test.cc(688): message : see reference to function template instantiation 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>::GetTearDownCaseOrSuite(const char *,int)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/column_writer_test.cc(688): message : see reference to class template instantiation 'testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(529,33): error C2039: 'TearDownTestSuite': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

I think so.
We need a fix like #8782 (comment) for cpp/src/parquet/column_writer_test.cc.

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from cfaa72b to 6a32ee4CompareDecember 1, 2020 20:14

@pitroupitrou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two small comments.

Comment threadcpp/src/parquet/encoding_test.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be continue instead.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, done

Comment threadcpp/src/parquet/encoding_test.cc Outdated
Comment on lines 511 to 507

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from 09ae96f to c4d813bCompareDecember 2, 2020 23:00
@arw2019

Copy link
Copy Markdown
ContributorAuthor

It's down to three failing checks:

  • Appveyor - not sure what the problem is
  • C++ / AMD64 MacOS 10.15 - looks like a gtest location problem
dyld: Library not loaded: @rpath/libgtest_maind.dylib
  • C++/ AMD64 Windows 2019 - a template instantiation problem in cpp/src/parquet/statistics_test.cc
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(527,33): error C2039: 'TearDownTestCase': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(525): message : while compiling class template member function 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(const char *,int)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(705): message : see reference to function template instantiation 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(const char *,int)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(706): message : see reference to class template instantiation 'testing::internal::SuiteApiResolver<TestClass>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/statistics_test.cc(490): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/statistics_test.cc(490): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(529,33): error C2039: 'TearDownTestSuite': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]

I'll keep looking.

@kou

kou commented Dec 4, 2020

Copy link
Copy Markdown
Member

Both the Appveyor case and the macOS case are caused by same reason. They can't find GoogleTest's library.
I'll take a look them.

cpp/src/parquet/statistics_test.cc: It seems that naming conflict like other build failures but I'm not sure. I'll also take a look it.

@kou

kou commented Dec 7, 2020

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g nightly

@github-actions

Copy link
Copy Markdown

Revision: f3f04e8

Submitted crossbow builds: ursa-labs/crossbow @ actions-743

TaskStatus
centos-7-aarch64TravisCI
centos-7-amd64Github Actions
centos-8-aarch64TravisCI
centos-8-amd64Github Actions
conda-cleanAzure
conda-linux-gcc-py36-aarch64Drone
conda-linux-gcc-py36-cpu-r36Azure
conda-linux-gcc-py36-cudaAzure
conda-linux-gcc-py37-aarch64Drone
conda-linux-gcc-py37-cpu-r40Azure
conda-linux-gcc-py37-cudaAzure
conda-linux-gcc-py38-aarch64Drone
conda-linux-gcc-py38-cpuAzure
conda-linux-gcc-py38-cudaAzure
conda-osx-clang-py36-r36Azure
conda-osx-clang-py37-r40Azure
conda-osx-clang-py38Azure
conda-win-vs2017-py36-r36Azure
conda-win-vs2017-py37-r40Azure
conda-win-vs2017-py38Azure
debian-buster-amd64Github Actions
debian-buster-arm64TravisCI
debian-stretch-amd64Github Actions
debian-stretch-arm64TravisCI
example-cpp-minimal-build-staticGithub Actions
example-cpp-minimal-build-static-system-dependencyGithub Actions
gandiva-jar-osxTravisCI
gandiva-jar-xenialTravisCI
homebrew-cppTravisCI
homebrew-r-autobrewTravisCI
nugetGithub Actions
test-conda-cppGithub Actions
test-conda-cpp-valgrindGithub Actions
test-conda-python-3.6Github Actions
test-conda-python-3.6-pandas-0.23Github Actions
test-conda-python-3.7Github Actions
test-conda-python-3.7-dask-latestGithub Actions
test-conda-python-3.7-hdfs-2.9.2Github Actions
test-conda-python-3.7-kartothek-latestGithub Actions
test-conda-python-3.7-kartothek-masterGithub Actions
test-conda-python-3.7-pandas-latestGithub Actions
test-conda-python-3.7-pandas-masterGithub Actions
test-conda-python-3.7-spark-branch-3.0Github Actions
test-conda-python-3.7-turbodbc-latestGithub Actions
test-conda-python-3.7-turbodbc-masterGithub Actions
test-conda-python-3.8Github Actions
test-conda-python-3.8-dask-masterGithub Actions
test-conda-python-3.8-hypothesisGithub Actions
test-conda-python-3.8-jpypeGithub Actions
test-conda-python-3.8-pandas-latestGithub Actions
test-conda-python-3.8-spark-masterGithub Actions
test-debian-10-cppCircleCI
test-debian-10-go-1.12Azure
test-debian-10-python-3Azure
test-debian-c-glibCircleCI
test-debian-rubyCircleCI
test-fedora-33-cppCircleCI
test-fedora-33-python-3Azure
test-r-linux-as-cranGithub Actions
test-r-rhub-ubuntu-gcc-releaseAzure
test-r-rocker-r-base-latestAzure
test-r-rstudio-r-base-3.6-bionicAzure
test-r-rstudio-r-base-3.6-centos6Azure
test-r-rstudio-r-base-3.6-centos8Azure
test-r-rstudio-r-base-3.6-opensuse15Azure
test-r-rstudio-r-base-3.6-opensuse42Azure
test-ubuntu-16.04-cppCircleCI
test-ubuntu-18.04-cppCircleCI
test-ubuntu-18.04-cpp-cmake32CircleCI
test-ubuntu-18.04-cpp-releaseCircleCI
test-ubuntu-18.04-cpp-staticCircleCI
test-ubuntu-18.04-docsAzure
test-ubuntu-18.04-python-3Azure
test-ubuntu-18.04-r-sanitizerAzure
test-ubuntu-20.04-cppGithub Actions
test-ubuntu-20.04-cpp-14Github Actions
test-ubuntu-20.04-cpp-17Github Actions
test-ubuntu-c-glibCircleCI
test-ubuntu-rubyAzure
ubuntu-bionic-amd64Github Actions
ubuntu-bionic-arm64TravisCI
ubuntu-focal-amd64Github Actions
ubuntu-focal-arm64TravisCI
ubuntu-groovy-amd64Github Actions
ubuntu-groovy-arm64TravisCI
ubuntu-xenial-amd64Github Actions
ubuntu-xenial-arm64TravisCI
wheel-manylinux1-cp36mAzure
wheel-manylinux1-cp37mAzure
wheel-manylinux1-cp38Azure
wheel-manylinux2010-cp36mAzure
wheel-manylinux2010-cp37mAzure
wheel-manylinux2010-cp38Azure
wheel-manylinux2014-cp36mAzure
wheel-manylinux2014-cp37mAzure
wheel-manylinux2014-cp38Azure
wheel-osx-high-sierra-cp36mTravisCI
wheel-osx-high-sierra-cp37mTravisCI
wheel-osx-high-sierra-cp38TravisCI
wheel-osx-mavericks-cp36mTravisCI
wheel-osx-mavericks-cp37mTravisCI
wheel-osx-mavericks-cp38TravisCI
wheel-win-cp36mGithub Actions
wheel-win-cp37mGithub Actions
wheel-win-cp38Github Actions

kou
kou approved these changes Dec 7, 2020

@koukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

All green. I'll merge this.

@koukou closed this in 3453943Dec 7, 2020
@arw2019

Copy link
Copy Markdown
ContributorAuthor

Thanks @kou@pitrou !!!

@arw2019
arw2019 deleted the ARROW-10746-GTEST_SKIP branch December 7, 2020 06:35
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@arw2019@pitrou@kou
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in tests - #8782

Closed
arw2019 wants to merge 25 commits into
apache:masterfrom
arw2019:ARROW-10746-GTEST_SKIP
Closed

ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in tests#8782
arw2019 wants to merge 25 commits into
apache:masterfrom
arw2019:ARROW-10746-GTEST_SKIP

Conversation

@arw2019

Copy link
Copy Markdown
Contributor

As per a TODO left in ARROW-3769 / #3721 we can now use the GTEST_SKIP macro in parquet/encoding-test.cpp. GTEST_SKIP was added in gtest 1.10.0 so this involves bumping our minimal gtest version from 1.8.1

@github-actions

Copy link
Copy Markdown

@arw2019arw2019 changed the title ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in parquet encoding testsARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in testsNov 26, 2020
@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from ecfef76 to 19c70e4CompareNovember 26, 2020 20:57
@arw2019
arw2019 marked this pull request as draft November 26, 2020 21:22
@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from 0591595 to 2e846d3CompareNovember 27, 2020 00:40
@arw2019arw2019 closed this Nov 27, 2020
@arw2019arw2019 reopened this Nov 27, 2020
@arw2019
arw2019 marked this pull request as ready for review November 27, 2020 01:42
@arw2019

Copy link
Copy Markdown
ContributorAuthor

I think the code changes here are ok. However, at least some of the build errors look related (and persisted across two CI runs) so that's left to figure out

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch 2 times, most recently from 1ebe491 to f073eabCompareNovember 29, 2020 22:08
@pitrou

Copy link
Copy Markdown
Member

Well, at least the ASAN CI job failure seems related:

clang: error: no such file or directory: 'debug//libgtestd.so'

cc @kou@xhochy

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

It seems that the latest GoogleTest doesn't use the default CMAKE_XXX_OUTPUT_DIRECTORY: https://github.com/google/googletest/blob/master/googletest/cmake/internal_utils.cmake#L159-L164

Could you try this?

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index df03c3129..e36571808 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1603,21 +1603,16 @@ macro(build_gtest)
set(GTEST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest_ep-prefix")
set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include")
- set(_GTEST_RUNTIME_DIR ${BUILD_OUTPUT_ROOT_DIRECTORY})+ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
if(MSVC)
set(_GTEST_IMPORTED_TYPE IMPORTED_IMPLIB)
set(_GTEST_LIBRARY_SUFFIX
"${CMAKE_GTEST_DEBUG_EXTENSION}${CMAKE_IMPORT_LIBRARY_SUFFIX}")
- # Use the import libraries from the EP- set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
else()
set(_GTEST_IMPORTED_TYPE IMPORTED_LOCATION)
set(_GTEST_LIBRARY_SUFFIX
"${CMAKE_GTEST_DEBUG_EXTENSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
-- # Library and runtime same on non-Windows- set(_GTEST_LIBRARY_DIR "${_GTEST_RUNTIME_DIR}")
endif()
set(GTEST_SHARED_LIB
@@ -1632,6 +1627,7 @@ macro(build_gtest)
${EP_COMMON_TOOLCHAIN}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
"-DCMAKE_INSTALL_PREFIX=${GTEST_PREFIX}"
+ -DCMAKE_INSTALL_LIBDIR=lib
-DBUILD_SHARED_LIBS=ON
-DCMAKE_CXX_FLAGS=${GTEST_CMAKE_CXX_FLAGS}
-DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${GTEST_CMAKE_CXX_FLAGS})
@@ -1641,27 +1637,6 @@ macro(build_gtest)
set(GTEST_CMAKE_ARGS ${GTEST_CMAKE_ARGS} "-DCMAKE_MACOSX_RPATH:BOOL=ON")
endif()
- if(CMAKE_GENERATOR STREQUAL "Xcode")- # Xcode projects support multi-configuration builds. This forces the gtest build- # to use the same output directory as a single-configuration Makefile driven build.- list(- APPEND GTEST_CMAKE_ARGS "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${_GTEST_LIBRARY_DIR}"- "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- endif()-- if(MSVC)- if(NOT ("${CMAKE_GENERATOR}" STREQUAL "Ninja"))- set(_GTEST_RUNTIME_DIR ${_GTEST_RUNTIME_DIR}/${CMAKE_BUILD_TYPE})- endif()- set(GTEST_CMAKE_ARGS- ${GTEST_CMAKE_ARGS} "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${_GTEST_RUNTIME_DIR}"- "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- else()- list(- APPEND GTEST_CMAKE_ARGS "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${_GTEST_RUNTIME_DIR}"- "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- endif()-
add_definitions(-DGTEST_LINKED_AS_SHARED_LIBRARY=1)
if(MSVC AND NOT ARROW_USE_STATIC_CRT)

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from e91795e to 0bef0c9CompareDecember 1, 2020 02:54
@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

It seems that the template type name T is conflicted with Visual C++. Could you try this patch?

diff --git a/cpp/src/parquet/statistics_test.cc b/cpp/src/parquet/statistics_test.cc
index 0828f36b3..77e77e0eb 100644
--- a/cpp/src/parquet/statistics_test.cc+++ b/cpp/src/parquet/statistics_test.cc@@ -609,7 +609,7 @@ static const int NUM_VALUES = 10;
template <typename TestType>
class TestStatisticsSortOrder : public ::testing::Test {
public:
- typedef typename TestType::c_type T;+ using c_type = typename TestType::c_type;
void AddNodes(std::string name) {
fields_.push_back(schema::PrimitiveNode::Make(
@@ -670,7 +670,7 @@ class TestStatisticsSortOrder : public ::testing::Test {
}
protected:
- std::vector<T> values_;+ std::vector<c_type> values_;
std::vector<uint8_t> values_buf_;
std::vector<schema::NodePtr> fields_;
std::shared_ptr<schema::GroupNode> schema_;
@@ -700,13 +700,13 @@ void TestStatisticsSortOrder<Int32Type>::SetValues() {
// Write UINT32 min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(c_type)));
// Write INT32 min/max values
stats_[1]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::INT64
@@ -728,13 +728,13 @@ void TestStatisticsSortOrder<Int64Type>::SetValues() {
// Write UINT64 min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(c_type)));
// Write INT64 min/max values
stats_[1]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::FLOAT
@@ -747,8 +747,8 @@ void TestStatisticsSortOrder<FloatType>::SetValues() {
// Write Float min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::DOUBLE
@@ -761,8 +761,8 @@ void TestStatisticsSortOrder<DoubleType>::SetValues() {
// Write Double min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::ByteArray

Here is a patch to fix CMake lint failure:

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bdf15e4bc..46872fba3 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1603,7 +1603,7 @@ macro(build_gtest)
set(GTEST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest_ep-prefix")
set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include")
-set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")+ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
if(MSVC)
set(_GTEST_IMPORTED_TYPE IMPORTED_IMPLIB)

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

Could you add required GoogleTest version check?

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bdf15e4bc..60bdf13ad 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1682,7 +1682,7 @@ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
endmacro()
if(ARROW_TESTING)
- resolve_dependency(GTest)+ resolve_dependency(GTest REQUIRED_VERSION 1.10.0)
if(NOT GTEST_VENDORED)
# TODO(wesm): This logic does not work correctly with the MSVC static libraries

@arw2019

Copy link
Copy Markdown
ContributorAuthor

Thanks @kou!!! Pushed your suggestions

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from cffbea4 to cd8f7e8CompareDecember 1, 2020 06:08
@arw2019

Copy link
Copy Markdown
ContributorAuthor

Is this related in C++ / AMD64 Windows 2019?

D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(527,33): error C2039: 'TearDownTestCase': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(525): message : while compiling class template member function 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>::GetTearDownCaseOrSuite(const char *,int)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/column_writer_test.cc(688): message : see reference to function template instantiation 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>::GetTearDownCaseOrSuite(const char *,int)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/column_writer_test.cc(688): message : see reference to class template instantiation 'testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(529,33): error C2039: 'TearDownTestSuite': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

I think so.
We need a fix like #8782 (comment) for cpp/src/parquet/column_writer_test.cc.

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from cfaa72b to 6a32ee4CompareDecember 1, 2020 20:14

@pitroupitrou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two small comments.

Comment threadcpp/src/parquet/encoding_test.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be continue instead.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, done

Comment threadcpp/src/parquet/encoding_test.cc Outdated
Comment on lines 511 to 507

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from 09ae96f to c4d813bCompareDecember 2, 2020 23:00
@arw2019

Copy link
Copy Markdown
ContributorAuthor

It's down to three failing checks:

  • Appveyor - not sure what the problem is
  • C++ / AMD64 MacOS 10.15 - looks like a gtest location problem
dyld: Library not loaded: @rpath/libgtest_maind.dylib
  • C++/ AMD64 Windows 2019 - a template instantiation problem in cpp/src/parquet/statistics_test.cc
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(527,33): error C2039: 'TearDownTestCase': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(525): message : while compiling class template member function 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(const char *,int)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(705): message : see reference to function template instantiation 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(const char *,int)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(706): message : see reference to class template instantiation 'testing::internal::SuiteApiResolver<TestClass>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/statistics_test.cc(490): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/statistics_test.cc(490): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(529,33): error C2039: 'TearDownTestSuite': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]

I'll keep looking.

@kou

kou commented Dec 4, 2020

Copy link
Copy Markdown
Member

Both the Appveyor case and the macOS case are caused by same reason. They can't find GoogleTest's library.
I'll take a look them.

cpp/src/parquet/statistics_test.cc: It seems that naming conflict like other build failures but I'm not sure. I'll also take a look it.

@kou

kou commented Dec 7, 2020

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g nightly

@github-actions

Copy link
Copy Markdown

Revision: f3f04e8

Submitted crossbow builds: ursa-labs/crossbow @ actions-743

TaskStatus
centos-7-aarch64TravisCI
centos-7-amd64Github Actions
centos-8-aarch64TravisCI
centos-8-amd64Github Actions
conda-cleanAzure
conda-linux-gcc-py36-aarch64Drone
conda-linux-gcc-py36-cpu-r36Azure
conda-linux-gcc-py36-cudaAzure
conda-linux-gcc-py37-aarch64Drone
conda-linux-gcc-py37-cpu-r40Azure
conda-linux-gcc-py37-cudaAzure
conda-linux-gcc-py38-aarch64Drone
conda-linux-gcc-py38-cpuAzure
conda-linux-gcc-py38-cudaAzure
conda-osx-clang-py36-r36Azure
conda-osx-clang-py37-r40Azure
conda-osx-clang-py38Azure
conda-win-vs2017-py36-r36Azure
conda-win-vs2017-py37-r40Azure
conda-win-vs2017-py38Azure
debian-buster-amd64Github Actions
debian-buster-arm64TravisCI
debian-stretch-amd64Github Actions
debian-stretch-arm64TravisCI
example-cpp-minimal-build-staticGithub Actions
example-cpp-minimal-build-static-system-dependencyGithub Actions
gandiva-jar-osxTravisCI
gandiva-jar-xenialTravisCI
homebrew-cppTravisCI
homebrew-r-autobrewTravisCI
nugetGithub Actions
test-conda-cppGithub Actions
test-conda-cpp-valgrindGithub Actions
test-conda-python-3.6Github Actions
test-conda-python-3.6-pandas-0.23Github Actions
test-conda-python-3.7Github Actions
test-conda-python-3.7-dask-latestGithub Actions
test-conda-python-3.7-hdfs-2.9.2Github Actions
test-conda-python-3.7-kartothek-latestGithub Actions
test-conda-python-3.7-kartothek-masterGithub Actions
test-conda-python-3.7-pandas-latestGithub Actions
test-conda-python-3.7-pandas-masterGithub Actions
test-conda-python-3.7-spark-branch-3.0Github Actions
test-conda-python-3.7-turbodbc-latestGithub Actions
test-conda-python-3.7-turbodbc-masterGithub Actions
test-conda-python-3.8Github Actions
test-conda-python-3.8-dask-masterGithub Actions
test-conda-python-3.8-hypothesisGithub Actions
test-conda-python-3.8-jpypeGithub Actions
test-conda-python-3.8-pandas-latestGithub Actions
test-conda-python-3.8-spark-masterGithub Actions
test-debian-10-cppCircleCI
test-debian-10-go-1.12Azure
test-debian-10-python-3Azure
test-debian-c-glibCircleCI
test-debian-rubyCircleCI
test-fedora-33-cppCircleCI
test-fedora-33-python-3Azure
test-r-linux-as-cranGithub Actions
test-r-rhub-ubuntu-gcc-releaseAzure
test-r-rocker-r-base-latestAzure
test-r-rstudio-r-base-3.6-bionicAzure
test-r-rstudio-r-base-3.6-centos6Azure
test-r-rstudio-r-base-3.6-centos8Azure
test-r-rstudio-r-base-3.6-opensuse15Azure
test-r-rstudio-r-base-3.6-opensuse42Azure
test-ubuntu-16.04-cppCircleCI
test-ubuntu-18.04-cppCircleCI
test-ubuntu-18.04-cpp-cmake32CircleCI
test-ubuntu-18.04-cpp-releaseCircleCI
test-ubuntu-18.04-cpp-staticCircleCI
test-ubuntu-18.04-docsAzure
test-ubuntu-18.04-python-3Azure
test-ubuntu-18.04-r-sanitizerAzure
test-ubuntu-20.04-cppGithub Actions
test-ubuntu-20.04-cpp-14Github Actions
test-ubuntu-20.04-cpp-17Github Actions
test-ubuntu-c-glibCircleCI
test-ubuntu-rubyAzure
ubuntu-bionic-amd64Github Actions
ubuntu-bionic-arm64TravisCI
ubuntu-focal-amd64Github Actions
ubuntu-focal-arm64TravisCI
ubuntu-groovy-amd64Github Actions
ubuntu-groovy-arm64TravisCI
ubuntu-xenial-amd64Github Actions
ubuntu-xenial-arm64TravisCI
wheel-manylinux1-cp36mAzure
wheel-manylinux1-cp37mAzure
wheel-manylinux1-cp38Azure
wheel-manylinux2010-cp36mAzure
wheel-manylinux2010-cp37mAzure
wheel-manylinux2010-cp38Azure
wheel-manylinux2014-cp36mAzure
wheel-manylinux2014-cp37mAzure
wheel-manylinux2014-cp38Azure
wheel-osx-high-sierra-cp36mTravisCI
wheel-osx-high-sierra-cp37mTravisCI
wheel-osx-high-sierra-cp38TravisCI
wheel-osx-mavericks-cp36mTravisCI
wheel-osx-mavericks-cp37mTravisCI
wheel-osx-mavericks-cp38TravisCI
wheel-win-cp36mGithub Actions
wheel-win-cp37mGithub Actions
wheel-win-cp38Github Actions

kou
kou approved these changes Dec 7, 2020

@koukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

All green. I'll merge this.

@koukou closed this in 3453943Dec 7, 2020
@arw2019

Copy link
Copy Markdown
ContributorAuthor

Thanks @kou@pitrou !!!

@arw2019
arw2019 deleted the ARROW-10746-GTEST_SKIP branch December 7, 2020 06:35
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@arw2019@pitrou@kou
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in tests - #8782

Closed
arw2019 wants to merge 25 commits into
apache:masterfrom
arw2019:ARROW-10746-GTEST_SKIP
Closed

ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in tests#8782
arw2019 wants to merge 25 commits into
apache:masterfrom
arw2019:ARROW-10746-GTEST_SKIP

Conversation

@arw2019

Copy link
Copy Markdown
Contributor

As per a TODO left in ARROW-3769 / #3721 we can now use the GTEST_SKIP macro in parquet/encoding-test.cpp. GTEST_SKIP was added in gtest 1.10.0 so this involves bumping our minimal gtest version from 1.8.1

@github-actions

Copy link
Copy Markdown

@arw2019arw2019 changed the title ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in parquet encoding testsARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in testsNov 26, 2020
@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from ecfef76 to 19c70e4CompareNovember 26, 2020 20:57
@arw2019
arw2019 marked this pull request as draft November 26, 2020 21:22
@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from 0591595 to 2e846d3CompareNovember 27, 2020 00:40
@arw2019arw2019 closed this Nov 27, 2020
@arw2019arw2019 reopened this Nov 27, 2020
@arw2019
arw2019 marked this pull request as ready for review November 27, 2020 01:42
@arw2019

Copy link
Copy Markdown
ContributorAuthor

I think the code changes here are ok. However, at least some of the build errors look related (and persisted across two CI runs) so that's left to figure out

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch 2 times, most recently from 1ebe491 to f073eabCompareNovember 29, 2020 22:08
@pitrou

Copy link
Copy Markdown
Member

Well, at least the ASAN CI job failure seems related:

clang: error: no such file or directory: 'debug//libgtestd.so'

cc @kou@xhochy

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

It seems that the latest GoogleTest doesn't use the default CMAKE_XXX_OUTPUT_DIRECTORY: https://github.com/google/googletest/blob/master/googletest/cmake/internal_utils.cmake#L159-L164

Could you try this?

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index df03c3129..e36571808 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1603,21 +1603,16 @@ macro(build_gtest)
set(GTEST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest_ep-prefix")
set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include")
- set(_GTEST_RUNTIME_DIR ${BUILD_OUTPUT_ROOT_DIRECTORY})+ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
if(MSVC)
set(_GTEST_IMPORTED_TYPE IMPORTED_IMPLIB)
set(_GTEST_LIBRARY_SUFFIX
"${CMAKE_GTEST_DEBUG_EXTENSION}${CMAKE_IMPORT_LIBRARY_SUFFIX}")
- # Use the import libraries from the EP- set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
else()
set(_GTEST_IMPORTED_TYPE IMPORTED_LOCATION)
set(_GTEST_LIBRARY_SUFFIX
"${CMAKE_GTEST_DEBUG_EXTENSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
-- # Library and runtime same on non-Windows- set(_GTEST_LIBRARY_DIR "${_GTEST_RUNTIME_DIR}")
endif()
set(GTEST_SHARED_LIB
@@ -1632,6 +1627,7 @@ macro(build_gtest)
${EP_COMMON_TOOLCHAIN}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
"-DCMAKE_INSTALL_PREFIX=${GTEST_PREFIX}"
+ -DCMAKE_INSTALL_LIBDIR=lib
-DBUILD_SHARED_LIBS=ON
-DCMAKE_CXX_FLAGS=${GTEST_CMAKE_CXX_FLAGS}
-DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${GTEST_CMAKE_CXX_FLAGS})
@@ -1641,27 +1637,6 @@ macro(build_gtest)
set(GTEST_CMAKE_ARGS ${GTEST_CMAKE_ARGS} "-DCMAKE_MACOSX_RPATH:BOOL=ON")
endif()
- if(CMAKE_GENERATOR STREQUAL "Xcode")- # Xcode projects support multi-configuration builds. This forces the gtest build- # to use the same output directory as a single-configuration Makefile driven build.- list(- APPEND GTEST_CMAKE_ARGS "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${_GTEST_LIBRARY_DIR}"- "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- endif()-- if(MSVC)- if(NOT ("${CMAKE_GENERATOR}" STREQUAL "Ninja"))- set(_GTEST_RUNTIME_DIR ${_GTEST_RUNTIME_DIR}/${CMAKE_BUILD_TYPE})- endif()- set(GTEST_CMAKE_ARGS- ${GTEST_CMAKE_ARGS} "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${_GTEST_RUNTIME_DIR}"- "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- else()- list(- APPEND GTEST_CMAKE_ARGS "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${_GTEST_RUNTIME_DIR}"- "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- endif()-
add_definitions(-DGTEST_LINKED_AS_SHARED_LIBRARY=1)
if(MSVC AND NOT ARROW_USE_STATIC_CRT)

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from e91795e to 0bef0c9CompareDecember 1, 2020 02:54
@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

It seems that the template type name T is conflicted with Visual C++. Could you try this patch?

diff --git a/cpp/src/parquet/statistics_test.cc b/cpp/src/parquet/statistics_test.cc
index 0828f36b3..77e77e0eb 100644
--- a/cpp/src/parquet/statistics_test.cc+++ b/cpp/src/parquet/statistics_test.cc@@ -609,7 +609,7 @@ static const int NUM_VALUES = 10;
template <typename TestType>
class TestStatisticsSortOrder : public ::testing::Test {
public:
- typedef typename TestType::c_type T;+ using c_type = typename TestType::c_type;
void AddNodes(std::string name) {
fields_.push_back(schema::PrimitiveNode::Make(
@@ -670,7 +670,7 @@ class TestStatisticsSortOrder : public ::testing::Test {
}
protected:
- std::vector<T> values_;+ std::vector<c_type> values_;
std::vector<uint8_t> values_buf_;
std::vector<schema::NodePtr> fields_;
std::shared_ptr<schema::GroupNode> schema_;
@@ -700,13 +700,13 @@ void TestStatisticsSortOrder<Int32Type>::SetValues() {
// Write UINT32 min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(c_type)));
// Write INT32 min/max values
stats_[1]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::INT64
@@ -728,13 +728,13 @@ void TestStatisticsSortOrder<Int64Type>::SetValues() {
// Write UINT64 min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(c_type)));
// Write INT64 min/max values
stats_[1]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::FLOAT
@@ -747,8 +747,8 @@ void TestStatisticsSortOrder<FloatType>::SetValues() {
// Write Float min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::DOUBLE
@@ -761,8 +761,8 @@ void TestStatisticsSortOrder<DoubleType>::SetValues() {
// Write Double min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::ByteArray

Here is a patch to fix CMake lint failure:

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bdf15e4bc..46872fba3 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1603,7 +1603,7 @@ macro(build_gtest)
set(GTEST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest_ep-prefix")
set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include")
-set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")+ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
if(MSVC)
set(_GTEST_IMPORTED_TYPE IMPORTED_IMPLIB)

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

Could you add required GoogleTest version check?

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bdf15e4bc..60bdf13ad 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1682,7 +1682,7 @@ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
endmacro()
if(ARROW_TESTING)
- resolve_dependency(GTest)+ resolve_dependency(GTest REQUIRED_VERSION 1.10.0)
if(NOT GTEST_VENDORED)
# TODO(wesm): This logic does not work correctly with the MSVC static libraries

@arw2019

Copy link
Copy Markdown
ContributorAuthor

Thanks @kou!!! Pushed your suggestions

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from cffbea4 to cd8f7e8CompareDecember 1, 2020 06:08
@arw2019

Copy link
Copy Markdown
ContributorAuthor

Is this related in C++ / AMD64 Windows 2019?

D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(527,33): error C2039: 'TearDownTestCase': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(525): message : while compiling class template member function 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>::GetTearDownCaseOrSuite(const char *,int)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/column_writer_test.cc(688): message : see reference to function template instantiation 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>::GetTearDownCaseOrSuite(const char *,int)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/column_writer_test.cc(688): message : see reference to class template instantiation 'testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(529,33): error C2039: 'TearDownTestSuite': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

I think so.
We need a fix like #8782 (comment) for cpp/src/parquet/column_writer_test.cc.

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from cfaa72b to 6a32ee4CompareDecember 1, 2020 20:14

@pitroupitrou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two small comments.

Comment threadcpp/src/parquet/encoding_test.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be continue instead.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, done

Comment threadcpp/src/parquet/encoding_test.cc Outdated
Comment on lines 511 to 507

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from 09ae96f to c4d813bCompareDecember 2, 2020 23:00
@arw2019

Copy link
Copy Markdown
ContributorAuthor

It's down to three failing checks:

  • Appveyor - not sure what the problem is
  • C++ / AMD64 MacOS 10.15 - looks like a gtest location problem
dyld: Library not loaded: @rpath/libgtest_maind.dylib
  • C++/ AMD64 Windows 2019 - a template instantiation problem in cpp/src/parquet/statistics_test.cc
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(527,33): error C2039: 'TearDownTestCase': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(525): message : while compiling class template member function 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(const char *,int)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(705): message : see reference to function template instantiation 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(const char *,int)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(706): message : see reference to class template instantiation 'testing::internal::SuiteApiResolver<TestClass>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/statistics_test.cc(490): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/statistics_test.cc(490): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(529,33): error C2039: 'TearDownTestSuite': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]

I'll keep looking.

@kou

kou commented Dec 4, 2020

Copy link
Copy Markdown
Member

Both the Appveyor case and the macOS case are caused by same reason. They can't find GoogleTest's library.
I'll take a look them.

cpp/src/parquet/statistics_test.cc: It seems that naming conflict like other build failures but I'm not sure. I'll also take a look it.

@kou

kou commented Dec 7, 2020

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g nightly

@github-actions

Copy link
Copy Markdown

Revision: f3f04e8

Submitted crossbow builds: ursa-labs/crossbow @ actions-743

TaskStatus
centos-7-aarch64TravisCI
centos-7-amd64Github Actions
centos-8-aarch64TravisCI
centos-8-amd64Github Actions
conda-cleanAzure
conda-linux-gcc-py36-aarch64Drone
conda-linux-gcc-py36-cpu-r36Azure
conda-linux-gcc-py36-cudaAzure
conda-linux-gcc-py37-aarch64Drone
conda-linux-gcc-py37-cpu-r40Azure
conda-linux-gcc-py37-cudaAzure
conda-linux-gcc-py38-aarch64Drone
conda-linux-gcc-py38-cpuAzure
conda-linux-gcc-py38-cudaAzure
conda-osx-clang-py36-r36Azure
conda-osx-clang-py37-r40Azure
conda-osx-clang-py38Azure
conda-win-vs2017-py36-r36Azure
conda-win-vs2017-py37-r40Azure
conda-win-vs2017-py38Azure
debian-buster-amd64Github Actions
debian-buster-arm64TravisCI
debian-stretch-amd64Github Actions
debian-stretch-arm64TravisCI
example-cpp-minimal-build-staticGithub Actions
example-cpp-minimal-build-static-system-dependencyGithub Actions
gandiva-jar-osxTravisCI
gandiva-jar-xenialTravisCI
homebrew-cppTravisCI
homebrew-r-autobrewTravisCI
nugetGithub Actions
test-conda-cppGithub Actions
test-conda-cpp-valgrindGithub Actions
test-conda-python-3.6Github Actions
test-conda-python-3.6-pandas-0.23Github Actions
test-conda-python-3.7Github Actions
test-conda-python-3.7-dask-latestGithub Actions
test-conda-python-3.7-hdfs-2.9.2Github Actions
test-conda-python-3.7-kartothek-latestGithub Actions
test-conda-python-3.7-kartothek-masterGithub Actions
test-conda-python-3.7-pandas-latestGithub Actions
test-conda-python-3.7-pandas-masterGithub Actions
test-conda-python-3.7-spark-branch-3.0Github Actions
test-conda-python-3.7-turbodbc-latestGithub Actions
test-conda-python-3.7-turbodbc-masterGithub Actions
test-conda-python-3.8Github Actions
test-conda-python-3.8-dask-masterGithub Actions
test-conda-python-3.8-hypothesisGithub Actions
test-conda-python-3.8-jpypeGithub Actions
test-conda-python-3.8-pandas-latestGithub Actions
test-conda-python-3.8-spark-masterGithub Actions
test-debian-10-cppCircleCI
test-debian-10-go-1.12Azure
test-debian-10-python-3Azure
test-debian-c-glibCircleCI
test-debian-rubyCircleCI
test-fedora-33-cppCircleCI
test-fedora-33-python-3Azure
test-r-linux-as-cranGithub Actions
test-r-rhub-ubuntu-gcc-releaseAzure
test-r-rocker-r-base-latestAzure
test-r-rstudio-r-base-3.6-bionicAzure
test-r-rstudio-r-base-3.6-centos6Azure
test-r-rstudio-r-base-3.6-centos8Azure
test-r-rstudio-r-base-3.6-opensuse15Azure
test-r-rstudio-r-base-3.6-opensuse42Azure
test-ubuntu-16.04-cppCircleCI
test-ubuntu-18.04-cppCircleCI
test-ubuntu-18.04-cpp-cmake32CircleCI
test-ubuntu-18.04-cpp-releaseCircleCI
test-ubuntu-18.04-cpp-staticCircleCI
test-ubuntu-18.04-docsAzure
test-ubuntu-18.04-python-3Azure
test-ubuntu-18.04-r-sanitizerAzure
test-ubuntu-20.04-cppGithub Actions
test-ubuntu-20.04-cpp-14Github Actions
test-ubuntu-20.04-cpp-17Github Actions
test-ubuntu-c-glibCircleCI
test-ubuntu-rubyAzure
ubuntu-bionic-amd64Github Actions
ubuntu-bionic-arm64TravisCI
ubuntu-focal-amd64Github Actions
ubuntu-focal-arm64TravisCI
ubuntu-groovy-amd64Github Actions
ubuntu-groovy-arm64TravisCI
ubuntu-xenial-amd64Github Actions
ubuntu-xenial-arm64TravisCI
wheel-manylinux1-cp36mAzure
wheel-manylinux1-cp37mAzure
wheel-manylinux1-cp38Azure
wheel-manylinux2010-cp36mAzure
wheel-manylinux2010-cp37mAzure
wheel-manylinux2010-cp38Azure
wheel-manylinux2014-cp36mAzure
wheel-manylinux2014-cp37mAzure
wheel-manylinux2014-cp38Azure
wheel-osx-high-sierra-cp36mTravisCI
wheel-osx-high-sierra-cp37mTravisCI
wheel-osx-high-sierra-cp38TravisCI
wheel-osx-mavericks-cp36mTravisCI
wheel-osx-mavericks-cp37mTravisCI
wheel-osx-mavericks-cp38TravisCI
wheel-win-cp36mGithub Actions
wheel-win-cp37mGithub Actions
wheel-win-cp38Github Actions

kou
kou approved these changes Dec 7, 2020

@koukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

All green. I'll merge this.

@koukou closed this in 3453943Dec 7, 2020
@arw2019

Copy link
Copy Markdown
ContributorAuthor

Thanks @kou@pitrou !!!

@arw2019
arw2019 deleted the ARROW-10746-GTEST_SKIP branch December 7, 2020 06:35
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@arw2019@pitrou@kou
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in tests - #8782

Closed
arw2019 wants to merge 25 commits into
apache:masterfrom
arw2019:ARROW-10746-GTEST_SKIP
Closed

ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in tests#8782
arw2019 wants to merge 25 commits into
apache:masterfrom
arw2019:ARROW-10746-GTEST_SKIP

Conversation

@arw2019

Copy link
Copy Markdown
Contributor

As per a TODO left in ARROW-3769 / #3721 we can now use the GTEST_SKIP macro in parquet/encoding-test.cpp. GTEST_SKIP was added in gtest 1.10.0 so this involves bumping our minimal gtest version from 1.8.1

@github-actions

Copy link
Copy Markdown

@arw2019arw2019 changed the title ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in parquet encoding testsARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in testsNov 26, 2020
@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from ecfef76 to 19c70e4CompareNovember 26, 2020 20:57
@arw2019
arw2019 marked this pull request as draft November 26, 2020 21:22
@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from 0591595 to 2e846d3CompareNovember 27, 2020 00:40
@arw2019arw2019 closed this Nov 27, 2020
@arw2019arw2019 reopened this Nov 27, 2020
@arw2019
arw2019 marked this pull request as ready for review November 27, 2020 01:42
@arw2019

Copy link
Copy Markdown
ContributorAuthor

I think the code changes here are ok. However, at least some of the build errors look related (and persisted across two CI runs) so that's left to figure out

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch 2 times, most recently from 1ebe491 to f073eabCompareNovember 29, 2020 22:08
@pitrou

Copy link
Copy Markdown
Member

Well, at least the ASAN CI job failure seems related:

clang: error: no such file or directory: 'debug//libgtestd.so'

cc @kou@xhochy

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

It seems that the latest GoogleTest doesn't use the default CMAKE_XXX_OUTPUT_DIRECTORY: https://github.com/google/googletest/blob/master/googletest/cmake/internal_utils.cmake#L159-L164

Could you try this?

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index df03c3129..e36571808 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1603,21 +1603,16 @@ macro(build_gtest)
set(GTEST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest_ep-prefix")
set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include")
- set(_GTEST_RUNTIME_DIR ${BUILD_OUTPUT_ROOT_DIRECTORY})+ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
if(MSVC)
set(_GTEST_IMPORTED_TYPE IMPORTED_IMPLIB)
set(_GTEST_LIBRARY_SUFFIX
"${CMAKE_GTEST_DEBUG_EXTENSION}${CMAKE_IMPORT_LIBRARY_SUFFIX}")
- # Use the import libraries from the EP- set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
else()
set(_GTEST_IMPORTED_TYPE IMPORTED_LOCATION)
set(_GTEST_LIBRARY_SUFFIX
"${CMAKE_GTEST_DEBUG_EXTENSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
-- # Library and runtime same on non-Windows- set(_GTEST_LIBRARY_DIR "${_GTEST_RUNTIME_DIR}")
endif()
set(GTEST_SHARED_LIB
@@ -1632,6 +1627,7 @@ macro(build_gtest)
${EP_COMMON_TOOLCHAIN}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
"-DCMAKE_INSTALL_PREFIX=${GTEST_PREFIX}"
+ -DCMAKE_INSTALL_LIBDIR=lib
-DBUILD_SHARED_LIBS=ON
-DCMAKE_CXX_FLAGS=${GTEST_CMAKE_CXX_FLAGS}
-DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${GTEST_CMAKE_CXX_FLAGS})
@@ -1641,27 +1637,6 @@ macro(build_gtest)
set(GTEST_CMAKE_ARGS ${GTEST_CMAKE_ARGS} "-DCMAKE_MACOSX_RPATH:BOOL=ON")
endif()
- if(CMAKE_GENERATOR STREQUAL "Xcode")- # Xcode projects support multi-configuration builds. This forces the gtest build- # to use the same output directory as a single-configuration Makefile driven build.- list(- APPEND GTEST_CMAKE_ARGS "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${_GTEST_LIBRARY_DIR}"- "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- endif()-- if(MSVC)- if(NOT ("${CMAKE_GENERATOR}" STREQUAL "Ninja"))- set(_GTEST_RUNTIME_DIR ${_GTEST_RUNTIME_DIR}/${CMAKE_BUILD_TYPE})- endif()- set(GTEST_CMAKE_ARGS- ${GTEST_CMAKE_ARGS} "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${_GTEST_RUNTIME_DIR}"- "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- else()- list(- APPEND GTEST_CMAKE_ARGS "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${_GTEST_RUNTIME_DIR}"- "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- endif()-
add_definitions(-DGTEST_LINKED_AS_SHARED_LIBRARY=1)
if(MSVC AND NOT ARROW_USE_STATIC_CRT)

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from e91795e to 0bef0c9CompareDecember 1, 2020 02:54
@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

It seems that the template type name T is conflicted with Visual C++. Could you try this patch?

diff --git a/cpp/src/parquet/statistics_test.cc b/cpp/src/parquet/statistics_test.cc
index 0828f36b3..77e77e0eb 100644
--- a/cpp/src/parquet/statistics_test.cc+++ b/cpp/src/parquet/statistics_test.cc@@ -609,7 +609,7 @@ static const int NUM_VALUES = 10;
template <typename TestType>
class TestStatisticsSortOrder : public ::testing::Test {
public:
- typedef typename TestType::c_type T;+ using c_type = typename TestType::c_type;
void AddNodes(std::string name) {
fields_.push_back(schema::PrimitiveNode::Make(
@@ -670,7 +670,7 @@ class TestStatisticsSortOrder : public ::testing::Test {
}
protected:
- std::vector<T> values_;+ std::vector<c_type> values_;
std::vector<uint8_t> values_buf_;
std::vector<schema::NodePtr> fields_;
std::shared_ptr<schema::GroupNode> schema_;
@@ -700,13 +700,13 @@ void TestStatisticsSortOrder<Int32Type>::SetValues() {
// Write UINT32 min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(c_type)));
// Write INT32 min/max values
stats_[1]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::INT64
@@ -728,13 +728,13 @@ void TestStatisticsSortOrder<Int64Type>::SetValues() {
// Write UINT64 min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(c_type)));
// Write INT64 min/max values
stats_[1]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::FLOAT
@@ -747,8 +747,8 @@ void TestStatisticsSortOrder<FloatType>::SetValues() {
// Write Float min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::DOUBLE
@@ -761,8 +761,8 @@ void TestStatisticsSortOrder<DoubleType>::SetValues() {
// Write Double min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::ByteArray

Here is a patch to fix CMake lint failure:

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bdf15e4bc..46872fba3 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1603,7 +1603,7 @@ macro(build_gtest)
set(GTEST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest_ep-prefix")
set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include")
-set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")+ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
if(MSVC)
set(_GTEST_IMPORTED_TYPE IMPORTED_IMPLIB)

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

Could you add required GoogleTest version check?

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bdf15e4bc..60bdf13ad 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1682,7 +1682,7 @@ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
endmacro()
if(ARROW_TESTING)
- resolve_dependency(GTest)+ resolve_dependency(GTest REQUIRED_VERSION 1.10.0)
if(NOT GTEST_VENDORED)
# TODO(wesm): This logic does not work correctly with the MSVC static libraries

@arw2019

Copy link
Copy Markdown
ContributorAuthor

Thanks @kou!!! Pushed your suggestions

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from cffbea4 to cd8f7e8CompareDecember 1, 2020 06:08
@arw2019

Copy link
Copy Markdown
ContributorAuthor

Is this related in C++ / AMD64 Windows 2019?

D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(527,33): error C2039: 'TearDownTestCase': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(525): message : while compiling class template member function 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>::GetTearDownCaseOrSuite(const char *,int)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/column_writer_test.cc(688): message : see reference to function template instantiation 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>::GetTearDownCaseOrSuite(const char *,int)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/column_writer_test.cc(688): message : see reference to class template instantiation 'testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(529,33): error C2039: 'TearDownTestSuite': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

I think so.
We need a fix like #8782 (comment) for cpp/src/parquet/column_writer_test.cc.

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from cfaa72b to 6a32ee4CompareDecember 1, 2020 20:14

@pitroupitrou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two small comments.

Comment threadcpp/src/parquet/encoding_test.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be continue instead.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, done

Comment threadcpp/src/parquet/encoding_test.cc Outdated
Comment on lines 511 to 507

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from 09ae96f to c4d813bCompareDecember 2, 2020 23:00
@arw2019

Copy link
Copy Markdown
ContributorAuthor

It's down to three failing checks:

  • Appveyor - not sure what the problem is
  • C++ / AMD64 MacOS 10.15 - looks like a gtest location problem
dyld: Library not loaded: @rpath/libgtest_maind.dylib
  • C++/ AMD64 Windows 2019 - a template instantiation problem in cpp/src/parquet/statistics_test.cc
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(527,33): error C2039: 'TearDownTestCase': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(525): message : while compiling class template member function 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(const char *,int)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(705): message : see reference to function template instantiation 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(const char *,int)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(706): message : see reference to class template instantiation 'testing::internal::SuiteApiResolver<TestClass>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/statistics_test.cc(490): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/statistics_test.cc(490): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(529,33): error C2039: 'TearDownTestSuite': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]

I'll keep looking.

@kou

kou commented Dec 4, 2020

Copy link
Copy Markdown
Member

Both the Appveyor case and the macOS case are caused by same reason. They can't find GoogleTest's library.
I'll take a look them.

cpp/src/parquet/statistics_test.cc: It seems that naming conflict like other build failures but I'm not sure. I'll also take a look it.

@kou

kou commented Dec 7, 2020

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g nightly

@github-actions

Copy link
Copy Markdown

Revision: f3f04e8

Submitted crossbow builds: ursa-labs/crossbow @ actions-743

TaskStatus
centos-7-aarch64TravisCI
centos-7-amd64Github Actions
centos-8-aarch64TravisCI
centos-8-amd64Github Actions
conda-cleanAzure
conda-linux-gcc-py36-aarch64Drone
conda-linux-gcc-py36-cpu-r36Azure
conda-linux-gcc-py36-cudaAzure
conda-linux-gcc-py37-aarch64Drone
conda-linux-gcc-py37-cpu-r40Azure
conda-linux-gcc-py37-cudaAzure
conda-linux-gcc-py38-aarch64Drone
conda-linux-gcc-py38-cpuAzure
conda-linux-gcc-py38-cudaAzure
conda-osx-clang-py36-r36Azure
conda-osx-clang-py37-r40Azure
conda-osx-clang-py38Azure
conda-win-vs2017-py36-r36Azure
conda-win-vs2017-py37-r40Azure
conda-win-vs2017-py38Azure
debian-buster-amd64Github Actions
debian-buster-arm64TravisCI
debian-stretch-amd64Github Actions
debian-stretch-arm64TravisCI
example-cpp-minimal-build-staticGithub Actions
example-cpp-minimal-build-static-system-dependencyGithub Actions
gandiva-jar-osxTravisCI
gandiva-jar-xenialTravisCI
homebrew-cppTravisCI
homebrew-r-autobrewTravisCI
nugetGithub Actions
test-conda-cppGithub Actions
test-conda-cpp-valgrindGithub Actions
test-conda-python-3.6Github Actions
test-conda-python-3.6-pandas-0.23Github Actions
test-conda-python-3.7Github Actions
test-conda-python-3.7-dask-latestGithub Actions
test-conda-python-3.7-hdfs-2.9.2Github Actions
test-conda-python-3.7-kartothek-latestGithub Actions
test-conda-python-3.7-kartothek-masterGithub Actions
test-conda-python-3.7-pandas-latestGithub Actions
test-conda-python-3.7-pandas-masterGithub Actions
test-conda-python-3.7-spark-branch-3.0Github Actions
test-conda-python-3.7-turbodbc-latestGithub Actions
test-conda-python-3.7-turbodbc-masterGithub Actions
test-conda-python-3.8Github Actions
test-conda-python-3.8-dask-masterGithub Actions
test-conda-python-3.8-hypothesisGithub Actions
test-conda-python-3.8-jpypeGithub Actions
test-conda-python-3.8-pandas-latestGithub Actions
test-conda-python-3.8-spark-masterGithub Actions
test-debian-10-cppCircleCI
test-debian-10-go-1.12Azure
test-debian-10-python-3Azure
test-debian-c-glibCircleCI
test-debian-rubyCircleCI
test-fedora-33-cppCircleCI
test-fedora-33-python-3Azure
test-r-linux-as-cranGithub Actions
test-r-rhub-ubuntu-gcc-releaseAzure
test-r-rocker-r-base-latestAzure
test-r-rstudio-r-base-3.6-bionicAzure
test-r-rstudio-r-base-3.6-centos6Azure
test-r-rstudio-r-base-3.6-centos8Azure
test-r-rstudio-r-base-3.6-opensuse15Azure
test-r-rstudio-r-base-3.6-opensuse42Azure
test-ubuntu-16.04-cppCircleCI
test-ubuntu-18.04-cppCircleCI
test-ubuntu-18.04-cpp-cmake32CircleCI
test-ubuntu-18.04-cpp-releaseCircleCI
test-ubuntu-18.04-cpp-staticCircleCI
test-ubuntu-18.04-docsAzure
test-ubuntu-18.04-python-3Azure
test-ubuntu-18.04-r-sanitizerAzure
test-ubuntu-20.04-cppGithub Actions
test-ubuntu-20.04-cpp-14Github Actions
test-ubuntu-20.04-cpp-17Github Actions
test-ubuntu-c-glibCircleCI
test-ubuntu-rubyAzure
ubuntu-bionic-amd64Github Actions
ubuntu-bionic-arm64TravisCI
ubuntu-focal-amd64Github Actions
ubuntu-focal-arm64TravisCI
ubuntu-groovy-amd64Github Actions
ubuntu-groovy-arm64TravisCI
ubuntu-xenial-amd64Github Actions
ubuntu-xenial-arm64TravisCI
wheel-manylinux1-cp36mAzure
wheel-manylinux1-cp37mAzure
wheel-manylinux1-cp38Azure
wheel-manylinux2010-cp36mAzure
wheel-manylinux2010-cp37mAzure
wheel-manylinux2010-cp38Azure
wheel-manylinux2014-cp36mAzure
wheel-manylinux2014-cp37mAzure
wheel-manylinux2014-cp38Azure
wheel-osx-high-sierra-cp36mTravisCI
wheel-osx-high-sierra-cp37mTravisCI
wheel-osx-high-sierra-cp38TravisCI
wheel-osx-mavericks-cp36mTravisCI
wheel-osx-mavericks-cp37mTravisCI
wheel-osx-mavericks-cp38TravisCI
wheel-win-cp36mGithub Actions
wheel-win-cp37mGithub Actions
wheel-win-cp38Github Actions

kou
kou approved these changes Dec 7, 2020

@koukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

All green. I'll merge this.

@koukou closed this in 3453943Dec 7, 2020
@arw2019

Copy link
Copy Markdown
ContributorAuthor

Thanks @kou@pitrou !!!

@arw2019
arw2019 deleted the ARROW-10746-GTEST_SKIP branch December 7, 2020 06:35
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@arw2019@pitrou@kou
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in tests - #8782

Closed
arw2019 wants to merge 25 commits into
apache:masterfrom
arw2019:ARROW-10746-GTEST_SKIP
Closed

ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in tests#8782
arw2019 wants to merge 25 commits into
apache:masterfrom
arw2019:ARROW-10746-GTEST_SKIP

Conversation

@arw2019

Copy link
Copy Markdown
Contributor

As per a TODO left in ARROW-3769 / #3721 we can now use the GTEST_SKIP macro in parquet/encoding-test.cpp. GTEST_SKIP was added in gtest 1.10.0 so this involves bumping our minimal gtest version from 1.8.1

@github-actions

Copy link
Copy Markdown

@arw2019arw2019 changed the title ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in parquet encoding testsARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in testsNov 26, 2020
@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from ecfef76 to 19c70e4CompareNovember 26, 2020 20:57
@arw2019
arw2019 marked this pull request as draft November 26, 2020 21:22
@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from 0591595 to 2e846d3CompareNovember 27, 2020 00:40
@arw2019arw2019 closed this Nov 27, 2020
@arw2019arw2019 reopened this Nov 27, 2020
@arw2019
arw2019 marked this pull request as ready for review November 27, 2020 01:42
@arw2019

Copy link
Copy Markdown
ContributorAuthor

I think the code changes here are ok. However, at least some of the build errors look related (and persisted across two CI runs) so that's left to figure out

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch 2 times, most recently from 1ebe491 to f073eabCompareNovember 29, 2020 22:08
@pitrou

Copy link
Copy Markdown
Member

Well, at least the ASAN CI job failure seems related:

clang: error: no such file or directory: 'debug//libgtestd.so'

cc @kou@xhochy

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

It seems that the latest GoogleTest doesn't use the default CMAKE_XXX_OUTPUT_DIRECTORY: https://github.com/google/googletest/blob/master/googletest/cmake/internal_utils.cmake#L159-L164

Could you try this?

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index df03c3129..e36571808 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1603,21 +1603,16 @@ macro(build_gtest)
set(GTEST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest_ep-prefix")
set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include")
- set(_GTEST_RUNTIME_DIR ${BUILD_OUTPUT_ROOT_DIRECTORY})+ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
if(MSVC)
set(_GTEST_IMPORTED_TYPE IMPORTED_IMPLIB)
set(_GTEST_LIBRARY_SUFFIX
"${CMAKE_GTEST_DEBUG_EXTENSION}${CMAKE_IMPORT_LIBRARY_SUFFIX}")
- # Use the import libraries from the EP- set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
else()
set(_GTEST_IMPORTED_TYPE IMPORTED_LOCATION)
set(_GTEST_LIBRARY_SUFFIX
"${CMAKE_GTEST_DEBUG_EXTENSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
-- # Library and runtime same on non-Windows- set(_GTEST_LIBRARY_DIR "${_GTEST_RUNTIME_DIR}")
endif()
set(GTEST_SHARED_LIB
@@ -1632,6 +1627,7 @@ macro(build_gtest)
${EP_COMMON_TOOLCHAIN}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
"-DCMAKE_INSTALL_PREFIX=${GTEST_PREFIX}"
+ -DCMAKE_INSTALL_LIBDIR=lib
-DBUILD_SHARED_LIBS=ON
-DCMAKE_CXX_FLAGS=${GTEST_CMAKE_CXX_FLAGS}
-DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${GTEST_CMAKE_CXX_FLAGS})
@@ -1641,27 +1637,6 @@ macro(build_gtest)
set(GTEST_CMAKE_ARGS ${GTEST_CMAKE_ARGS} "-DCMAKE_MACOSX_RPATH:BOOL=ON")
endif()
- if(CMAKE_GENERATOR STREQUAL "Xcode")- # Xcode projects support multi-configuration builds. This forces the gtest build- # to use the same output directory as a single-configuration Makefile driven build.- list(- APPEND GTEST_CMAKE_ARGS "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${_GTEST_LIBRARY_DIR}"- "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- endif()-- if(MSVC)- if(NOT ("${CMAKE_GENERATOR}" STREQUAL "Ninja"))- set(_GTEST_RUNTIME_DIR ${_GTEST_RUNTIME_DIR}/${CMAKE_BUILD_TYPE})- endif()- set(GTEST_CMAKE_ARGS- ${GTEST_CMAKE_ARGS} "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${_GTEST_RUNTIME_DIR}"- "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- else()- list(- APPEND GTEST_CMAKE_ARGS "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${_GTEST_RUNTIME_DIR}"- "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- endif()-
add_definitions(-DGTEST_LINKED_AS_SHARED_LIBRARY=1)
if(MSVC AND NOT ARROW_USE_STATIC_CRT)

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from e91795e to 0bef0c9CompareDecember 1, 2020 02:54
@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

It seems that the template type name T is conflicted with Visual C++. Could you try this patch?

diff --git a/cpp/src/parquet/statistics_test.cc b/cpp/src/parquet/statistics_test.cc
index 0828f36b3..77e77e0eb 100644
--- a/cpp/src/parquet/statistics_test.cc+++ b/cpp/src/parquet/statistics_test.cc@@ -609,7 +609,7 @@ static const int NUM_VALUES = 10;
template <typename TestType>
class TestStatisticsSortOrder : public ::testing::Test {
public:
- typedef typename TestType::c_type T;+ using c_type = typename TestType::c_type;
void AddNodes(std::string name) {
fields_.push_back(schema::PrimitiveNode::Make(
@@ -670,7 +670,7 @@ class TestStatisticsSortOrder : public ::testing::Test {
}
protected:
- std::vector<T> values_;+ std::vector<c_type> values_;
std::vector<uint8_t> values_buf_;
std::vector<schema::NodePtr> fields_;
std::shared_ptr<schema::GroupNode> schema_;
@@ -700,13 +700,13 @@ void TestStatisticsSortOrder<Int32Type>::SetValues() {
// Write UINT32 min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(c_type)));
// Write INT32 min/max values
stats_[1]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::INT64
@@ -728,13 +728,13 @@ void TestStatisticsSortOrder<Int64Type>::SetValues() {
// Write UINT64 min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(c_type)));
// Write INT64 min/max values
stats_[1]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::FLOAT
@@ -747,8 +747,8 @@ void TestStatisticsSortOrder<FloatType>::SetValues() {
// Write Float min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::DOUBLE
@@ -761,8 +761,8 @@ void TestStatisticsSortOrder<DoubleType>::SetValues() {
// Write Double min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::ByteArray

Here is a patch to fix CMake lint failure:

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bdf15e4bc..46872fba3 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1603,7 +1603,7 @@ macro(build_gtest)
set(GTEST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest_ep-prefix")
set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include")
-set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")+ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
if(MSVC)
set(_GTEST_IMPORTED_TYPE IMPORTED_IMPLIB)

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

Could you add required GoogleTest version check?

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bdf15e4bc..60bdf13ad 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1682,7 +1682,7 @@ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
endmacro()
if(ARROW_TESTING)
- resolve_dependency(GTest)+ resolve_dependency(GTest REQUIRED_VERSION 1.10.0)
if(NOT GTEST_VENDORED)
# TODO(wesm): This logic does not work correctly with the MSVC static libraries

@arw2019

Copy link
Copy Markdown
ContributorAuthor

Thanks @kou!!! Pushed your suggestions

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from cffbea4 to cd8f7e8CompareDecember 1, 2020 06:08
@arw2019

Copy link
Copy Markdown
ContributorAuthor

Is this related in C++ / AMD64 Windows 2019?

D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(527,33): error C2039: 'TearDownTestCase': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(525): message : while compiling class template member function 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>::GetTearDownCaseOrSuite(const char *,int)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/column_writer_test.cc(688): message : see reference to function template instantiation 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>::GetTearDownCaseOrSuite(const char *,int)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/column_writer_test.cc(688): message : see reference to class template instantiation 'testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(529,33): error C2039: 'TearDownTestSuite': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

I think so.
We need a fix like #8782 (comment) for cpp/src/parquet/column_writer_test.cc.

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from cfaa72b to 6a32ee4CompareDecember 1, 2020 20:14

@pitroupitrou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two small comments.

Comment threadcpp/src/parquet/encoding_test.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be continue instead.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, done

Comment threadcpp/src/parquet/encoding_test.cc Outdated
Comment on lines 511 to 507

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from 09ae96f to c4d813bCompareDecember 2, 2020 23:00
@arw2019

Copy link
Copy Markdown
ContributorAuthor

It's down to three failing checks:

  • Appveyor - not sure what the problem is
  • C++ / AMD64 MacOS 10.15 - looks like a gtest location problem
dyld: Library not loaded: @rpath/libgtest_maind.dylib
  • C++/ AMD64 Windows 2019 - a template instantiation problem in cpp/src/parquet/statistics_test.cc
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(527,33): error C2039: 'TearDownTestCase': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(525): message : while compiling class template member function 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(const char *,int)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(705): message : see reference to function template instantiation 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(const char *,int)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(706): message : see reference to class template instantiation 'testing::internal::SuiteApiResolver<TestClass>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/statistics_test.cc(490): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/statistics_test.cc(490): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(529,33): error C2039: 'TearDownTestSuite': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]

I'll keep looking.

@kou

kou commented Dec 4, 2020

Copy link
Copy Markdown
Member

Both the Appveyor case and the macOS case are caused by same reason. They can't find GoogleTest's library.
I'll take a look them.

cpp/src/parquet/statistics_test.cc: It seems that naming conflict like other build failures but I'm not sure. I'll also take a look it.

@kou

kou commented Dec 7, 2020

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g nightly

@github-actions

Copy link
Copy Markdown

Revision: f3f04e8

Submitted crossbow builds: ursa-labs/crossbow @ actions-743

TaskStatus
centos-7-aarch64TravisCI
centos-7-amd64Github Actions
centos-8-aarch64TravisCI
centos-8-amd64Github Actions
conda-cleanAzure
conda-linux-gcc-py36-aarch64Drone
conda-linux-gcc-py36-cpu-r36Azure
conda-linux-gcc-py36-cudaAzure
conda-linux-gcc-py37-aarch64Drone
conda-linux-gcc-py37-cpu-r40Azure
conda-linux-gcc-py37-cudaAzure
conda-linux-gcc-py38-aarch64Drone
conda-linux-gcc-py38-cpuAzure
conda-linux-gcc-py38-cudaAzure
conda-osx-clang-py36-r36Azure
conda-osx-clang-py37-r40Azure
conda-osx-clang-py38Azure
conda-win-vs2017-py36-r36Azure
conda-win-vs2017-py37-r40Azure
conda-win-vs2017-py38Azure
debian-buster-amd64Github Actions
debian-buster-arm64TravisCI
debian-stretch-amd64Github Actions
debian-stretch-arm64TravisCI
example-cpp-minimal-build-staticGithub Actions
example-cpp-minimal-build-static-system-dependencyGithub Actions
gandiva-jar-osxTravisCI
gandiva-jar-xenialTravisCI
homebrew-cppTravisCI
homebrew-r-autobrewTravisCI
nugetGithub Actions
test-conda-cppGithub Actions
test-conda-cpp-valgrindGithub Actions
test-conda-python-3.6Github Actions
test-conda-python-3.6-pandas-0.23Github Actions
test-conda-python-3.7Github Actions
test-conda-python-3.7-dask-latestGithub Actions
test-conda-python-3.7-hdfs-2.9.2Github Actions
test-conda-python-3.7-kartothek-latestGithub Actions
test-conda-python-3.7-kartothek-masterGithub Actions
test-conda-python-3.7-pandas-latestGithub Actions
test-conda-python-3.7-pandas-masterGithub Actions
test-conda-python-3.7-spark-branch-3.0Github Actions
test-conda-python-3.7-turbodbc-latestGithub Actions
test-conda-python-3.7-turbodbc-masterGithub Actions
test-conda-python-3.8Github Actions
test-conda-python-3.8-dask-masterGithub Actions
test-conda-python-3.8-hypothesisGithub Actions
test-conda-python-3.8-jpypeGithub Actions
test-conda-python-3.8-pandas-latestGithub Actions
test-conda-python-3.8-spark-masterGithub Actions
test-debian-10-cppCircleCI
test-debian-10-go-1.12Azure
test-debian-10-python-3Azure
test-debian-c-glibCircleCI
test-debian-rubyCircleCI
test-fedora-33-cppCircleCI
test-fedora-33-python-3Azure
test-r-linux-as-cranGithub Actions
test-r-rhub-ubuntu-gcc-releaseAzure
test-r-rocker-r-base-latestAzure
test-r-rstudio-r-base-3.6-bionicAzure
test-r-rstudio-r-base-3.6-centos6Azure
test-r-rstudio-r-base-3.6-centos8Azure
test-r-rstudio-r-base-3.6-opensuse15Azure
test-r-rstudio-r-base-3.6-opensuse42Azure
test-ubuntu-16.04-cppCircleCI
test-ubuntu-18.04-cppCircleCI
test-ubuntu-18.04-cpp-cmake32CircleCI
test-ubuntu-18.04-cpp-releaseCircleCI
test-ubuntu-18.04-cpp-staticCircleCI
test-ubuntu-18.04-docsAzure
test-ubuntu-18.04-python-3Azure
test-ubuntu-18.04-r-sanitizerAzure
test-ubuntu-20.04-cppGithub Actions
test-ubuntu-20.04-cpp-14Github Actions
test-ubuntu-20.04-cpp-17Github Actions
test-ubuntu-c-glibCircleCI
test-ubuntu-rubyAzure
ubuntu-bionic-amd64Github Actions
ubuntu-bionic-arm64TravisCI
ubuntu-focal-amd64Github Actions
ubuntu-focal-arm64TravisCI
ubuntu-groovy-amd64Github Actions
ubuntu-groovy-arm64TravisCI
ubuntu-xenial-amd64Github Actions
ubuntu-xenial-arm64TravisCI
wheel-manylinux1-cp36mAzure
wheel-manylinux1-cp37mAzure
wheel-manylinux1-cp38Azure
wheel-manylinux2010-cp36mAzure
wheel-manylinux2010-cp37mAzure
wheel-manylinux2010-cp38Azure
wheel-manylinux2014-cp36mAzure
wheel-manylinux2014-cp37mAzure
wheel-manylinux2014-cp38Azure
wheel-osx-high-sierra-cp36mTravisCI
wheel-osx-high-sierra-cp37mTravisCI
wheel-osx-high-sierra-cp38TravisCI
wheel-osx-mavericks-cp36mTravisCI
wheel-osx-mavericks-cp37mTravisCI
wheel-osx-mavericks-cp38TravisCI
wheel-win-cp36mGithub Actions
wheel-win-cp37mGithub Actions
wheel-win-cp38Github Actions

kou
kou approved these changes Dec 7, 2020

@koukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

All green. I'll merge this.

@koukou closed this in 3453943Dec 7, 2020
@arw2019

Copy link
Copy Markdown
ContributorAuthor

Thanks @kou@pitrou !!!

@arw2019
arw2019 deleted the ARROW-10746-GTEST_SKIP branch December 7, 2020 06:35
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@arw2019@pitrou@kou
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in tests - #8782

Closed
arw2019 wants to merge 25 commits into
apache:masterfrom
arw2019:ARROW-10746-GTEST_SKIP
Closed

ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in tests#8782
arw2019 wants to merge 25 commits into
apache:masterfrom
arw2019:ARROW-10746-GTEST_SKIP

Conversation

@arw2019

Copy link
Copy Markdown
Contributor

As per a TODO left in ARROW-3769 / #3721 we can now use the GTEST_SKIP macro in parquet/encoding-test.cpp. GTEST_SKIP was added in gtest 1.10.0 so this involves bumping our minimal gtest version from 1.8.1

@github-actions

Copy link
Copy Markdown

@arw2019arw2019 changed the title ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in parquet encoding testsARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in testsNov 26, 2020
@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from ecfef76 to 19c70e4CompareNovember 26, 2020 20:57
@arw2019
arw2019 marked this pull request as draft November 26, 2020 21:22
@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from 0591595 to 2e846d3CompareNovember 27, 2020 00:40
@arw2019arw2019 closed this Nov 27, 2020
@arw2019arw2019 reopened this Nov 27, 2020
@arw2019
arw2019 marked this pull request as ready for review November 27, 2020 01:42
@arw2019

Copy link
Copy Markdown
ContributorAuthor

I think the code changes here are ok. However, at least some of the build errors look related (and persisted across two CI runs) so that's left to figure out

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch 2 times, most recently from 1ebe491 to f073eabCompareNovember 29, 2020 22:08
@pitrou

Copy link
Copy Markdown
Member

Well, at least the ASAN CI job failure seems related:

clang: error: no such file or directory: 'debug//libgtestd.so'

cc @kou@xhochy

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

It seems that the latest GoogleTest doesn't use the default CMAKE_XXX_OUTPUT_DIRECTORY: https://github.com/google/googletest/blob/master/googletest/cmake/internal_utils.cmake#L159-L164

Could you try this?

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index df03c3129..e36571808 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1603,21 +1603,16 @@ macro(build_gtest)
set(GTEST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest_ep-prefix")
set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include")
- set(_GTEST_RUNTIME_DIR ${BUILD_OUTPUT_ROOT_DIRECTORY})+ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
if(MSVC)
set(_GTEST_IMPORTED_TYPE IMPORTED_IMPLIB)
set(_GTEST_LIBRARY_SUFFIX
"${CMAKE_GTEST_DEBUG_EXTENSION}${CMAKE_IMPORT_LIBRARY_SUFFIX}")
- # Use the import libraries from the EP- set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
else()
set(_GTEST_IMPORTED_TYPE IMPORTED_LOCATION)
set(_GTEST_LIBRARY_SUFFIX
"${CMAKE_GTEST_DEBUG_EXTENSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
-- # Library and runtime same on non-Windows- set(_GTEST_LIBRARY_DIR "${_GTEST_RUNTIME_DIR}")
endif()
set(GTEST_SHARED_LIB
@@ -1632,6 +1627,7 @@ macro(build_gtest)
${EP_COMMON_TOOLCHAIN}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
"-DCMAKE_INSTALL_PREFIX=${GTEST_PREFIX}"
+ -DCMAKE_INSTALL_LIBDIR=lib
-DBUILD_SHARED_LIBS=ON
-DCMAKE_CXX_FLAGS=${GTEST_CMAKE_CXX_FLAGS}
-DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${GTEST_CMAKE_CXX_FLAGS})
@@ -1641,27 +1637,6 @@ macro(build_gtest)
set(GTEST_CMAKE_ARGS ${GTEST_CMAKE_ARGS} "-DCMAKE_MACOSX_RPATH:BOOL=ON")
endif()
- if(CMAKE_GENERATOR STREQUAL "Xcode")- # Xcode projects support multi-configuration builds. This forces the gtest build- # to use the same output directory as a single-configuration Makefile driven build.- list(- APPEND GTEST_CMAKE_ARGS "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${_GTEST_LIBRARY_DIR}"- "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- endif()-- if(MSVC)- if(NOT ("${CMAKE_GENERATOR}" STREQUAL "Ninja"))- set(_GTEST_RUNTIME_DIR ${_GTEST_RUNTIME_DIR}/${CMAKE_BUILD_TYPE})- endif()- set(GTEST_CMAKE_ARGS- ${GTEST_CMAKE_ARGS} "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${_GTEST_RUNTIME_DIR}"- "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- else()- list(- APPEND GTEST_CMAKE_ARGS "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${_GTEST_RUNTIME_DIR}"- "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- endif()-
add_definitions(-DGTEST_LINKED_AS_SHARED_LIBRARY=1)
if(MSVC AND NOT ARROW_USE_STATIC_CRT)

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from e91795e to 0bef0c9CompareDecember 1, 2020 02:54
@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

It seems that the template type name T is conflicted with Visual C++. Could you try this patch?

diff --git a/cpp/src/parquet/statistics_test.cc b/cpp/src/parquet/statistics_test.cc
index 0828f36b3..77e77e0eb 100644
--- a/cpp/src/parquet/statistics_test.cc+++ b/cpp/src/parquet/statistics_test.cc@@ -609,7 +609,7 @@ static const int NUM_VALUES = 10;
template <typename TestType>
class TestStatisticsSortOrder : public ::testing::Test {
public:
- typedef typename TestType::c_type T;+ using c_type = typename TestType::c_type;
void AddNodes(std::string name) {
fields_.push_back(schema::PrimitiveNode::Make(
@@ -670,7 +670,7 @@ class TestStatisticsSortOrder : public ::testing::Test {
}
protected:
- std::vector<T> values_;+ std::vector<c_type> values_;
std::vector<uint8_t> values_buf_;
std::vector<schema::NodePtr> fields_;
std::shared_ptr<schema::GroupNode> schema_;
@@ -700,13 +700,13 @@ void TestStatisticsSortOrder<Int32Type>::SetValues() {
// Write UINT32 min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(c_type)));
// Write INT32 min/max values
stats_[1]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::INT64
@@ -728,13 +728,13 @@ void TestStatisticsSortOrder<Int64Type>::SetValues() {
// Write UINT64 min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(c_type)));
// Write INT64 min/max values
stats_[1]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::FLOAT
@@ -747,8 +747,8 @@ void TestStatisticsSortOrder<FloatType>::SetValues() {
// Write Float min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::DOUBLE
@@ -761,8 +761,8 @@ void TestStatisticsSortOrder<DoubleType>::SetValues() {
// Write Double min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::ByteArray

Here is a patch to fix CMake lint failure:

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bdf15e4bc..46872fba3 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1603,7 +1603,7 @@ macro(build_gtest)
set(GTEST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest_ep-prefix")
set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include")
-set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")+ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
if(MSVC)
set(_GTEST_IMPORTED_TYPE IMPORTED_IMPLIB)

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

Could you add required GoogleTest version check?

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bdf15e4bc..60bdf13ad 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1682,7 +1682,7 @@ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
endmacro()
if(ARROW_TESTING)
- resolve_dependency(GTest)+ resolve_dependency(GTest REQUIRED_VERSION 1.10.0)
if(NOT GTEST_VENDORED)
# TODO(wesm): This logic does not work correctly with the MSVC static libraries

@arw2019

Copy link
Copy Markdown
ContributorAuthor

Thanks @kou!!! Pushed your suggestions

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from cffbea4 to cd8f7e8CompareDecember 1, 2020 06:08
@arw2019

Copy link
Copy Markdown
ContributorAuthor

Is this related in C++ / AMD64 Windows 2019?

D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(527,33): error C2039: 'TearDownTestCase': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(525): message : while compiling class template member function 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>::GetTearDownCaseOrSuite(const char *,int)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/column_writer_test.cc(688): message : see reference to function template instantiation 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>::GetTearDownCaseOrSuite(const char *,int)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/column_writer_test.cc(688): message : see reference to class template instantiation 'testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(529,33): error C2039: 'TearDownTestSuite': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

I think so.
We need a fix like #8782 (comment) for cpp/src/parquet/column_writer_test.cc.

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from cfaa72b to 6a32ee4CompareDecember 1, 2020 20:14

@pitroupitrou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two small comments.

Comment threadcpp/src/parquet/encoding_test.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be continue instead.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, done

Comment threadcpp/src/parquet/encoding_test.cc Outdated
Comment on lines 511 to 507

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from 09ae96f to c4d813bCompareDecember 2, 2020 23:00
@arw2019

Copy link
Copy Markdown
ContributorAuthor

It's down to three failing checks:

  • Appveyor - not sure what the problem is
  • C++ / AMD64 MacOS 10.15 - looks like a gtest location problem
dyld: Library not loaded: @rpath/libgtest_maind.dylib
  • C++/ AMD64 Windows 2019 - a template instantiation problem in cpp/src/parquet/statistics_test.cc
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(527,33): error C2039: 'TearDownTestCase': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(525): message : while compiling class template member function 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(const char *,int)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(705): message : see reference to function template instantiation 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(const char *,int)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(706): message : see reference to class template instantiation 'testing::internal::SuiteApiResolver<TestClass>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/statistics_test.cc(490): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/statistics_test.cc(490): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(529,33): error C2039: 'TearDownTestSuite': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]

I'll keep looking.

@kou

kou commented Dec 4, 2020

Copy link
Copy Markdown
Member

Both the Appveyor case and the macOS case are caused by same reason. They can't find GoogleTest's library.
I'll take a look them.

cpp/src/parquet/statistics_test.cc: It seems that naming conflict like other build failures but I'm not sure. I'll also take a look it.

@kou

kou commented Dec 7, 2020

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g nightly

@github-actions

Copy link
Copy Markdown

Revision: f3f04e8

Submitted crossbow builds: ursa-labs/crossbow @ actions-743

TaskStatus
centos-7-aarch64TravisCI
centos-7-amd64Github Actions
centos-8-aarch64TravisCI
centos-8-amd64Github Actions
conda-cleanAzure
conda-linux-gcc-py36-aarch64Drone
conda-linux-gcc-py36-cpu-r36Azure
conda-linux-gcc-py36-cudaAzure
conda-linux-gcc-py37-aarch64Drone
conda-linux-gcc-py37-cpu-r40Azure
conda-linux-gcc-py37-cudaAzure
conda-linux-gcc-py38-aarch64Drone
conda-linux-gcc-py38-cpuAzure
conda-linux-gcc-py38-cudaAzure
conda-osx-clang-py36-r36Azure
conda-osx-clang-py37-r40Azure
conda-osx-clang-py38Azure
conda-win-vs2017-py36-r36Azure
conda-win-vs2017-py37-r40Azure
conda-win-vs2017-py38Azure
debian-buster-amd64Github Actions
debian-buster-arm64TravisCI
debian-stretch-amd64Github Actions
debian-stretch-arm64TravisCI
example-cpp-minimal-build-staticGithub Actions
example-cpp-minimal-build-static-system-dependencyGithub Actions
gandiva-jar-osxTravisCI
gandiva-jar-xenialTravisCI
homebrew-cppTravisCI
homebrew-r-autobrewTravisCI
nugetGithub Actions
test-conda-cppGithub Actions
test-conda-cpp-valgrindGithub Actions
test-conda-python-3.6Github Actions
test-conda-python-3.6-pandas-0.23Github Actions
test-conda-python-3.7Github Actions
test-conda-python-3.7-dask-latestGithub Actions
test-conda-python-3.7-hdfs-2.9.2Github Actions
test-conda-python-3.7-kartothek-latestGithub Actions
test-conda-python-3.7-kartothek-masterGithub Actions
test-conda-python-3.7-pandas-latestGithub Actions
test-conda-python-3.7-pandas-masterGithub Actions
test-conda-python-3.7-spark-branch-3.0Github Actions
test-conda-python-3.7-turbodbc-latestGithub Actions
test-conda-python-3.7-turbodbc-masterGithub Actions
test-conda-python-3.8Github Actions
test-conda-python-3.8-dask-masterGithub Actions
test-conda-python-3.8-hypothesisGithub Actions
test-conda-python-3.8-jpypeGithub Actions
test-conda-python-3.8-pandas-latestGithub Actions
test-conda-python-3.8-spark-masterGithub Actions
test-debian-10-cppCircleCI
test-debian-10-go-1.12Azure
test-debian-10-python-3Azure
test-debian-c-glibCircleCI
test-debian-rubyCircleCI
test-fedora-33-cppCircleCI
test-fedora-33-python-3Azure
test-r-linux-as-cranGithub Actions
test-r-rhub-ubuntu-gcc-releaseAzure
test-r-rocker-r-base-latestAzure
test-r-rstudio-r-base-3.6-bionicAzure
test-r-rstudio-r-base-3.6-centos6Azure
test-r-rstudio-r-base-3.6-centos8Azure
test-r-rstudio-r-base-3.6-opensuse15Azure
test-r-rstudio-r-base-3.6-opensuse42Azure
test-ubuntu-16.04-cppCircleCI
test-ubuntu-18.04-cppCircleCI
test-ubuntu-18.04-cpp-cmake32CircleCI
test-ubuntu-18.04-cpp-releaseCircleCI
test-ubuntu-18.04-cpp-staticCircleCI
test-ubuntu-18.04-docsAzure
test-ubuntu-18.04-python-3Azure
test-ubuntu-18.04-r-sanitizerAzure
test-ubuntu-20.04-cppGithub Actions
test-ubuntu-20.04-cpp-14Github Actions
test-ubuntu-20.04-cpp-17Github Actions
test-ubuntu-c-glibCircleCI
test-ubuntu-rubyAzure
ubuntu-bionic-amd64Github Actions
ubuntu-bionic-arm64TravisCI
ubuntu-focal-amd64Github Actions
ubuntu-focal-arm64TravisCI
ubuntu-groovy-amd64Github Actions
ubuntu-groovy-arm64TravisCI
ubuntu-xenial-amd64Github Actions
ubuntu-xenial-arm64TravisCI
wheel-manylinux1-cp36mAzure
wheel-manylinux1-cp37mAzure
wheel-manylinux1-cp38Azure
wheel-manylinux2010-cp36mAzure
wheel-manylinux2010-cp37mAzure
wheel-manylinux2010-cp38Azure
wheel-manylinux2014-cp36mAzure
wheel-manylinux2014-cp37mAzure
wheel-manylinux2014-cp38Azure
wheel-osx-high-sierra-cp36mTravisCI
wheel-osx-high-sierra-cp37mTravisCI
wheel-osx-high-sierra-cp38TravisCI
wheel-osx-mavericks-cp36mTravisCI
wheel-osx-mavericks-cp37mTravisCI
wheel-osx-mavericks-cp38TravisCI
wheel-win-cp36mGithub Actions
wheel-win-cp37mGithub Actions
wheel-win-cp38Github Actions

kou
kou approved these changes Dec 7, 2020

@koukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

All green. I'll merge this.

@koukou closed this in 3453943Dec 7, 2020
@arw2019

Copy link
Copy Markdown
ContributorAuthor

Thanks @kou@pitrou !!!

@arw2019
arw2019 deleted the ARROW-10746-GTEST_SKIP branch December 7, 2020 06:35
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@arw2019@pitrou@kou
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in tests - #8782

Closed
arw2019 wants to merge 25 commits into
apache:masterfrom
arw2019:ARROW-10746-GTEST_SKIP
Closed

ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in tests#8782
arw2019 wants to merge 25 commits into
apache:masterfrom
arw2019:ARROW-10746-GTEST_SKIP

Conversation

@arw2019

Copy link
Copy Markdown
Contributor

As per a TODO left in ARROW-3769 / #3721 we can now use the GTEST_SKIP macro in parquet/encoding-test.cpp. GTEST_SKIP was added in gtest 1.10.0 so this involves bumping our minimal gtest version from 1.8.1

@github-actions

Copy link
Copy Markdown

@arw2019arw2019 changed the title ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in parquet encoding testsARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in testsNov 26, 2020
@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from ecfef76 to 19c70e4CompareNovember 26, 2020 20:57
@arw2019
arw2019 marked this pull request as draft November 26, 2020 21:22
@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from 0591595 to 2e846d3CompareNovember 27, 2020 00:40
@arw2019arw2019 closed this Nov 27, 2020
@arw2019arw2019 reopened this Nov 27, 2020
@arw2019
arw2019 marked this pull request as ready for review November 27, 2020 01:42
@arw2019

Copy link
Copy Markdown
ContributorAuthor

I think the code changes here are ok. However, at least some of the build errors look related (and persisted across two CI runs) so that's left to figure out

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch 2 times, most recently from 1ebe491 to f073eabCompareNovember 29, 2020 22:08
@pitrou

Copy link
Copy Markdown
Member

Well, at least the ASAN CI job failure seems related:

clang: error: no such file or directory: 'debug//libgtestd.so'

cc @kou@xhochy

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

It seems that the latest GoogleTest doesn't use the default CMAKE_XXX_OUTPUT_DIRECTORY: https://github.com/google/googletest/blob/master/googletest/cmake/internal_utils.cmake#L159-L164

Could you try this?

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index df03c3129..e36571808 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1603,21 +1603,16 @@ macro(build_gtest)
set(GTEST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest_ep-prefix")
set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include")
- set(_GTEST_RUNTIME_DIR ${BUILD_OUTPUT_ROOT_DIRECTORY})+ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
if(MSVC)
set(_GTEST_IMPORTED_TYPE IMPORTED_IMPLIB)
set(_GTEST_LIBRARY_SUFFIX
"${CMAKE_GTEST_DEBUG_EXTENSION}${CMAKE_IMPORT_LIBRARY_SUFFIX}")
- # Use the import libraries from the EP- set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
else()
set(_GTEST_IMPORTED_TYPE IMPORTED_LOCATION)
set(_GTEST_LIBRARY_SUFFIX
"${CMAKE_GTEST_DEBUG_EXTENSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
-- # Library and runtime same on non-Windows- set(_GTEST_LIBRARY_DIR "${_GTEST_RUNTIME_DIR}")
endif()
set(GTEST_SHARED_LIB
@@ -1632,6 +1627,7 @@ macro(build_gtest)
${EP_COMMON_TOOLCHAIN}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
"-DCMAKE_INSTALL_PREFIX=${GTEST_PREFIX}"
+ -DCMAKE_INSTALL_LIBDIR=lib
-DBUILD_SHARED_LIBS=ON
-DCMAKE_CXX_FLAGS=${GTEST_CMAKE_CXX_FLAGS}
-DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${GTEST_CMAKE_CXX_FLAGS})
@@ -1641,27 +1637,6 @@ macro(build_gtest)
set(GTEST_CMAKE_ARGS ${GTEST_CMAKE_ARGS} "-DCMAKE_MACOSX_RPATH:BOOL=ON")
endif()
- if(CMAKE_GENERATOR STREQUAL "Xcode")- # Xcode projects support multi-configuration builds. This forces the gtest build- # to use the same output directory as a single-configuration Makefile driven build.- list(- APPEND GTEST_CMAKE_ARGS "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${_GTEST_LIBRARY_DIR}"- "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- endif()-- if(MSVC)- if(NOT ("${CMAKE_GENERATOR}" STREQUAL "Ninja"))- set(_GTEST_RUNTIME_DIR ${_GTEST_RUNTIME_DIR}/${CMAKE_BUILD_TYPE})- endif()- set(GTEST_CMAKE_ARGS- ${GTEST_CMAKE_ARGS} "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${_GTEST_RUNTIME_DIR}"- "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- else()- list(- APPEND GTEST_CMAKE_ARGS "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${_GTEST_RUNTIME_DIR}"- "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- endif()-
add_definitions(-DGTEST_LINKED_AS_SHARED_LIBRARY=1)
if(MSVC AND NOT ARROW_USE_STATIC_CRT)

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from e91795e to 0bef0c9CompareDecember 1, 2020 02:54
@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

It seems that the template type name T is conflicted with Visual C++. Could you try this patch?

diff --git a/cpp/src/parquet/statistics_test.cc b/cpp/src/parquet/statistics_test.cc
index 0828f36b3..77e77e0eb 100644
--- a/cpp/src/parquet/statistics_test.cc+++ b/cpp/src/parquet/statistics_test.cc@@ -609,7 +609,7 @@ static const int NUM_VALUES = 10;
template <typename TestType>
class TestStatisticsSortOrder : public ::testing::Test {
public:
- typedef typename TestType::c_type T;+ using c_type = typename TestType::c_type;
void AddNodes(std::string name) {
fields_.push_back(schema::PrimitiveNode::Make(
@@ -670,7 +670,7 @@ class TestStatisticsSortOrder : public ::testing::Test {
}
protected:
- std::vector<T> values_;+ std::vector<c_type> values_;
std::vector<uint8_t> values_buf_;
std::vector<schema::NodePtr> fields_;
std::shared_ptr<schema::GroupNode> schema_;
@@ -700,13 +700,13 @@ void TestStatisticsSortOrder<Int32Type>::SetValues() {
// Write UINT32 min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(c_type)));
// Write INT32 min/max values
stats_[1]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::INT64
@@ -728,13 +728,13 @@ void TestStatisticsSortOrder<Int64Type>::SetValues() {
// Write UINT64 min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(c_type)));
// Write INT64 min/max values
stats_[1]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::FLOAT
@@ -747,8 +747,8 @@ void TestStatisticsSortOrder<FloatType>::SetValues() {
// Write Float min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::DOUBLE
@@ -761,8 +761,8 @@ void TestStatisticsSortOrder<DoubleType>::SetValues() {
// Write Double min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::ByteArray

Here is a patch to fix CMake lint failure:

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bdf15e4bc..46872fba3 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1603,7 +1603,7 @@ macro(build_gtest)
set(GTEST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest_ep-prefix")
set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include")
-set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")+ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
if(MSVC)
set(_GTEST_IMPORTED_TYPE IMPORTED_IMPLIB)

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

Could you add required GoogleTest version check?

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bdf15e4bc..60bdf13ad 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1682,7 +1682,7 @@ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
endmacro()
if(ARROW_TESTING)
- resolve_dependency(GTest)+ resolve_dependency(GTest REQUIRED_VERSION 1.10.0)
if(NOT GTEST_VENDORED)
# TODO(wesm): This logic does not work correctly with the MSVC static libraries

@arw2019

Copy link
Copy Markdown
ContributorAuthor

Thanks @kou!!! Pushed your suggestions

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from cffbea4 to cd8f7e8CompareDecember 1, 2020 06:08
@arw2019

Copy link
Copy Markdown
ContributorAuthor

Is this related in C++ / AMD64 Windows 2019?

D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(527,33): error C2039: 'TearDownTestCase': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(525): message : while compiling class template member function 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>::GetTearDownCaseOrSuite(const char *,int)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/column_writer_test.cc(688): message : see reference to function template instantiation 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>::GetTearDownCaseOrSuite(const char *,int)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/column_writer_test.cc(688): message : see reference to class template instantiation 'testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(529,33): error C2039: 'TearDownTestSuite': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

I think so.
We need a fix like #8782 (comment) for cpp/src/parquet/column_writer_test.cc.

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from cfaa72b to 6a32ee4CompareDecember 1, 2020 20:14

@pitroupitrou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two small comments.

Comment threadcpp/src/parquet/encoding_test.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be continue instead.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, done

Comment threadcpp/src/parquet/encoding_test.cc Outdated
Comment on lines 511 to 507

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from 09ae96f to c4d813bCompareDecember 2, 2020 23:00
@arw2019

Copy link
Copy Markdown
ContributorAuthor

It's down to three failing checks:

  • Appveyor - not sure what the problem is
  • C++ / AMD64 MacOS 10.15 - looks like a gtest location problem
dyld: Library not loaded: @rpath/libgtest_maind.dylib
  • C++/ AMD64 Windows 2019 - a template instantiation problem in cpp/src/parquet/statistics_test.cc
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(527,33): error C2039: 'TearDownTestCase': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(525): message : while compiling class template member function 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(const char *,int)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(705): message : see reference to function template instantiation 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(const char *,int)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(706): message : see reference to class template instantiation 'testing::internal::SuiteApiResolver<TestClass>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/statistics_test.cc(490): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/statistics_test.cc(490): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(529,33): error C2039: 'TearDownTestSuite': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]

I'll keep looking.

@kou

kou commented Dec 4, 2020

Copy link
Copy Markdown
Member

Both the Appveyor case and the macOS case are caused by same reason. They can't find GoogleTest's library.
I'll take a look them.

cpp/src/parquet/statistics_test.cc: It seems that naming conflict like other build failures but I'm not sure. I'll also take a look it.

@kou

kou commented Dec 7, 2020

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g nightly

@github-actions

Copy link
Copy Markdown

Revision: f3f04e8

Submitted crossbow builds: ursa-labs/crossbow @ actions-743

TaskStatus
centos-7-aarch64TravisCI
centos-7-amd64Github Actions
centos-8-aarch64TravisCI
centos-8-amd64Github Actions
conda-cleanAzure
conda-linux-gcc-py36-aarch64Drone
conda-linux-gcc-py36-cpu-r36Azure
conda-linux-gcc-py36-cudaAzure
conda-linux-gcc-py37-aarch64Drone
conda-linux-gcc-py37-cpu-r40Azure
conda-linux-gcc-py37-cudaAzure
conda-linux-gcc-py38-aarch64Drone
conda-linux-gcc-py38-cpuAzure
conda-linux-gcc-py38-cudaAzure
conda-osx-clang-py36-r36Azure
conda-osx-clang-py37-r40Azure
conda-osx-clang-py38Azure
conda-win-vs2017-py36-r36Azure
conda-win-vs2017-py37-r40Azure
conda-win-vs2017-py38Azure
debian-buster-amd64Github Actions
debian-buster-arm64TravisCI
debian-stretch-amd64Github Actions
debian-stretch-arm64TravisCI
example-cpp-minimal-build-staticGithub Actions
example-cpp-minimal-build-static-system-dependencyGithub Actions
gandiva-jar-osxTravisCI
gandiva-jar-xenialTravisCI
homebrew-cppTravisCI
homebrew-r-autobrewTravisCI
nugetGithub Actions
test-conda-cppGithub Actions
test-conda-cpp-valgrindGithub Actions
test-conda-python-3.6Github Actions
test-conda-python-3.6-pandas-0.23Github Actions
test-conda-python-3.7Github Actions
test-conda-python-3.7-dask-latestGithub Actions
test-conda-python-3.7-hdfs-2.9.2Github Actions
test-conda-python-3.7-kartothek-latestGithub Actions
test-conda-python-3.7-kartothek-masterGithub Actions
test-conda-python-3.7-pandas-latestGithub Actions
test-conda-python-3.7-pandas-masterGithub Actions
test-conda-python-3.7-spark-branch-3.0Github Actions
test-conda-python-3.7-turbodbc-latestGithub Actions
test-conda-python-3.7-turbodbc-masterGithub Actions
test-conda-python-3.8Github Actions
test-conda-python-3.8-dask-masterGithub Actions
test-conda-python-3.8-hypothesisGithub Actions
test-conda-python-3.8-jpypeGithub Actions
test-conda-python-3.8-pandas-latestGithub Actions
test-conda-python-3.8-spark-masterGithub Actions
test-debian-10-cppCircleCI
test-debian-10-go-1.12Azure
test-debian-10-python-3Azure
test-debian-c-glibCircleCI
test-debian-rubyCircleCI
test-fedora-33-cppCircleCI
test-fedora-33-python-3Azure
test-r-linux-as-cranGithub Actions
test-r-rhub-ubuntu-gcc-releaseAzure
test-r-rocker-r-base-latestAzure
test-r-rstudio-r-base-3.6-bionicAzure
test-r-rstudio-r-base-3.6-centos6Azure
test-r-rstudio-r-base-3.6-centos8Azure
test-r-rstudio-r-base-3.6-opensuse15Azure
test-r-rstudio-r-base-3.6-opensuse42Azure
test-ubuntu-16.04-cppCircleCI
test-ubuntu-18.04-cppCircleCI
test-ubuntu-18.04-cpp-cmake32CircleCI
test-ubuntu-18.04-cpp-releaseCircleCI
test-ubuntu-18.04-cpp-staticCircleCI
test-ubuntu-18.04-docsAzure
test-ubuntu-18.04-python-3Azure
test-ubuntu-18.04-r-sanitizerAzure
test-ubuntu-20.04-cppGithub Actions
test-ubuntu-20.04-cpp-14Github Actions
test-ubuntu-20.04-cpp-17Github Actions
test-ubuntu-c-glibCircleCI
test-ubuntu-rubyAzure
ubuntu-bionic-amd64Github Actions
ubuntu-bionic-arm64TravisCI
ubuntu-focal-amd64Github Actions
ubuntu-focal-arm64TravisCI
ubuntu-groovy-amd64Github Actions
ubuntu-groovy-arm64TravisCI
ubuntu-xenial-amd64Github Actions
ubuntu-xenial-arm64TravisCI
wheel-manylinux1-cp36mAzure
wheel-manylinux1-cp37mAzure
wheel-manylinux1-cp38Azure
wheel-manylinux2010-cp36mAzure
wheel-manylinux2010-cp37mAzure
wheel-manylinux2010-cp38Azure
wheel-manylinux2014-cp36mAzure
wheel-manylinux2014-cp37mAzure
wheel-manylinux2014-cp38Azure
wheel-osx-high-sierra-cp36mTravisCI
wheel-osx-high-sierra-cp37mTravisCI
wheel-osx-high-sierra-cp38TravisCI
wheel-osx-mavericks-cp36mTravisCI
wheel-osx-mavericks-cp37mTravisCI
wheel-osx-mavericks-cp38TravisCI
wheel-win-cp36mGithub Actions
wheel-win-cp37mGithub Actions
wheel-win-cp38Github Actions

kou
kou approved these changes Dec 7, 2020

@koukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

All green. I'll merge this.

@koukou closed this in 3453943Dec 7, 2020
@arw2019

Copy link
Copy Markdown
ContributorAuthor

Thanks @kou@pitrou !!!

@arw2019
arw2019 deleted the ARROW-10746-GTEST_SKIP branch December 7, 2020 06:35
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@arw2019@pitrou@kou
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in tests - #8782

Closed
arw2019 wants to merge 25 commits into
apache:masterfrom
arw2019:ARROW-10746-GTEST_SKIP
Closed

ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in tests#8782
arw2019 wants to merge 25 commits into
apache:masterfrom
arw2019:ARROW-10746-GTEST_SKIP

Conversation

@arw2019

Copy link
Copy Markdown
Contributor

As per a TODO left in ARROW-3769 / #3721 we can now use the GTEST_SKIP macro in parquet/encoding-test.cpp. GTEST_SKIP was added in gtest 1.10.0 so this involves bumping our minimal gtest version from 1.8.1

@github-actions

Copy link
Copy Markdown

@arw2019arw2019 changed the title ARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in parquet encoding testsARROW-10746: [C++] Bump gtest version + use GTEST_SKIP in testsNov 26, 2020
@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from ecfef76 to 19c70e4CompareNovember 26, 2020 20:57
@arw2019
arw2019 marked this pull request as draft November 26, 2020 21:22
@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from 0591595 to 2e846d3CompareNovember 27, 2020 00:40
@arw2019arw2019 closed this Nov 27, 2020
@arw2019arw2019 reopened this Nov 27, 2020
@arw2019
arw2019 marked this pull request as ready for review November 27, 2020 01:42
@arw2019

Copy link
Copy Markdown
ContributorAuthor

I think the code changes here are ok. However, at least some of the build errors look related (and persisted across two CI runs) so that's left to figure out

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch 2 times, most recently from 1ebe491 to f073eabCompareNovember 29, 2020 22:08
@pitrou

Copy link
Copy Markdown
Member

Well, at least the ASAN CI job failure seems related:

clang: error: no such file or directory: 'debug//libgtestd.so'

cc @kou@xhochy

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

It seems that the latest GoogleTest doesn't use the default CMAKE_XXX_OUTPUT_DIRECTORY: https://github.com/google/googletest/blob/master/googletest/cmake/internal_utils.cmake#L159-L164

Could you try this?

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index df03c3129..e36571808 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1603,21 +1603,16 @@ macro(build_gtest)
set(GTEST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest_ep-prefix")
set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include")
- set(_GTEST_RUNTIME_DIR ${BUILD_OUTPUT_ROOT_DIRECTORY})+ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
if(MSVC)
set(_GTEST_IMPORTED_TYPE IMPORTED_IMPLIB)
set(_GTEST_LIBRARY_SUFFIX
"${CMAKE_GTEST_DEBUG_EXTENSION}${CMAKE_IMPORT_LIBRARY_SUFFIX}")
- # Use the import libraries from the EP- set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
else()
set(_GTEST_IMPORTED_TYPE IMPORTED_LOCATION)
set(_GTEST_LIBRARY_SUFFIX
"${CMAKE_GTEST_DEBUG_EXTENSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
-- # Library and runtime same on non-Windows- set(_GTEST_LIBRARY_DIR "${_GTEST_RUNTIME_DIR}")
endif()
set(GTEST_SHARED_LIB
@@ -1632,6 +1627,7 @@ macro(build_gtest)
${EP_COMMON_TOOLCHAIN}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
"-DCMAKE_INSTALL_PREFIX=${GTEST_PREFIX}"
+ -DCMAKE_INSTALL_LIBDIR=lib
-DBUILD_SHARED_LIBS=ON
-DCMAKE_CXX_FLAGS=${GTEST_CMAKE_CXX_FLAGS}
-DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${GTEST_CMAKE_CXX_FLAGS})
@@ -1641,27 +1637,6 @@ macro(build_gtest)
set(GTEST_CMAKE_ARGS ${GTEST_CMAKE_ARGS} "-DCMAKE_MACOSX_RPATH:BOOL=ON")
endif()
- if(CMAKE_GENERATOR STREQUAL "Xcode")- # Xcode projects support multi-configuration builds. This forces the gtest build- # to use the same output directory as a single-configuration Makefile driven build.- list(- APPEND GTEST_CMAKE_ARGS "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${_GTEST_LIBRARY_DIR}"- "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- endif()-- if(MSVC)- if(NOT ("${CMAKE_GENERATOR}" STREQUAL "Ninja"))- set(_GTEST_RUNTIME_DIR ${_GTEST_RUNTIME_DIR}/${CMAKE_BUILD_TYPE})- endif()- set(GTEST_CMAKE_ARGS- ${GTEST_CMAKE_ARGS} "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${_GTEST_RUNTIME_DIR}"- "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- else()- list(- APPEND GTEST_CMAKE_ARGS "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${_GTEST_RUNTIME_DIR}"- "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}=${_GTEST_RUNTIME_DIR}")- endif()-
add_definitions(-DGTEST_LINKED_AS_SHARED_LIBRARY=1)
if(MSVC AND NOT ARROW_USE_STATIC_CRT)

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from e91795e to 0bef0c9CompareDecember 1, 2020 02:54
@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

It seems that the template type name T is conflicted with Visual C++. Could you try this patch?

diff --git a/cpp/src/parquet/statistics_test.cc b/cpp/src/parquet/statistics_test.cc
index 0828f36b3..77e77e0eb 100644
--- a/cpp/src/parquet/statistics_test.cc+++ b/cpp/src/parquet/statistics_test.cc@@ -609,7 +609,7 @@ static const int NUM_VALUES = 10;
template <typename TestType>
class TestStatisticsSortOrder : public ::testing::Test {
public:
- typedef typename TestType::c_type T;+ using c_type = typename TestType::c_type;
void AddNodes(std::string name) {
fields_.push_back(schema::PrimitiveNode::Make(
@@ -670,7 +670,7 @@ class TestStatisticsSortOrder : public ::testing::Test {
}
protected:
- std::vector<T> values_;+ std::vector<c_type> values_;
std::vector<uint8_t> values_buf_;
std::vector<schema::NodePtr> fields_;
std::shared_ptr<schema::GroupNode> schema_;
@@ -700,13 +700,13 @@ void TestStatisticsSortOrder<Int32Type>::SetValues() {
// Write UINT32 min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(c_type)));
// Write INT32 min/max values
stats_[1]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::INT64
@@ -728,13 +728,13 @@ void TestStatisticsSortOrder<Int64Type>::SetValues() {
// Write UINT64 min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[5]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[4]), sizeof(c_type)));
// Write INT64 min/max values
stats_[1]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::FLOAT
@@ -747,8 +747,8 @@ void TestStatisticsSortOrder<FloatType>::SetValues() {
// Write Float min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::DOUBLE
@@ -761,8 +761,8 @@ void TestStatisticsSortOrder<DoubleType>::SetValues() {
// Write Double min/max values
stats_[0]
- .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(T)))- .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(T)));+ .set_min(std::string(reinterpret_cast<const char*>(&values_[0]), sizeof(c_type)))+ .set_max(std::string(reinterpret_cast<const char*>(&values_[9]), sizeof(c_type)));
}
// TYPE::ByteArray

Here is a patch to fix CMake lint failure:

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bdf15e4bc..46872fba3 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1603,7 +1603,7 @@ macro(build_gtest)
set(GTEST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest_ep-prefix")
set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include")
-set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")+ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
if(MSVC)
set(_GTEST_IMPORTED_TYPE IMPORTED_IMPLIB)

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

Could you add required GoogleTest version check?

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bdf15e4bc..60bdf13ad 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake@@ -1682,7 +1682,7 @@ set(_GTEST_LIBRARY_DIR "${GTEST_PREFIX}/lib")
endmacro()
if(ARROW_TESTING)
- resolve_dependency(GTest)+ resolve_dependency(GTest REQUIRED_VERSION 1.10.0)
if(NOT GTEST_VENDORED)
# TODO(wesm): This logic does not work correctly with the MSVC static libraries

@arw2019

Copy link
Copy Markdown
ContributorAuthor

Thanks @kou!!! Pushed your suggestions

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from cffbea4 to cd8f7e8CompareDecember 1, 2020 06:08
@arw2019

Copy link
Copy Markdown
ContributorAuthor

Is this related in C++ / AMD64 Windows 2019?

D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(527,33): error C2039: 'TearDownTestCase': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(525): message : while compiling class template member function 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>::GetTearDownCaseOrSuite(const char *,int)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/column_writer_test.cc(688): message : see reference to function template instantiation 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>::GetTearDownCaseOrSuite(const char *,int)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/column_writer_test.cc(688): message : see reference to class template instantiation 'testing::internal::SuiteApiResolver<parquet::test::TestByteArrayValuesWriter>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(529,33): error C2039: 'TearDownTestSuite': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-writer-test.vcxproj]

@kou

kou commented Dec 1, 2020

Copy link
Copy Markdown
Member

I think so.
We need a fix like #8782 (comment) for cpp/src/parquet/column_writer_test.cc.

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from cfaa72b to 6a32ee4CompareDecember 1, 2020 20:14

@pitroupitrou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two small comments.

Comment threadcpp/src/parquet/encoding_test.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be continue instead.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, done

Comment threadcpp/src/parquet/encoding_test.cc Outdated
Comment on lines 511 to 507

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@arw2019
arw2019force-pushed the ARROW-10746-GTEST_SKIP branch from 09ae96f to c4d813bCompareDecember 2, 2020 23:00
@arw2019

Copy link
Copy Markdown
ContributorAuthor

It's down to three failing checks:

  • Appveyor - not sure what the problem is
  • C++ / AMD64 MacOS 10.15 - looks like a gtest location problem
dyld: Library not loaded: @rpath/libgtest_maind.dylib
  • C++/ AMD64 Windows 2019 - a template instantiation problem in cpp/src/parquet/statistics_test.cc
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(527,33): error C2039: 'TearDownTestCase': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(525): message : while compiling class template member function 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(const char *,int)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(705): message : see reference to function template instantiation 'testing::internal::SetUpTearDownSuiteFuncType testing::internal::SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(const char *,int)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(706): message : see reference to class template instantiation 'testing::internal::SuiteApiResolver<TestClass>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types3<T2,T3,T4>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::ByteArrayType,
T3=parquet::FLBAType,
T4=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types4<T2,T3,T4,T5>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::DoubleType,
T3=parquet::ByteArrayType,
T4=parquet::FLBAType,
T5=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types5<T2,T3,T4,T5,T6>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::FloatType,
T3=parquet::DoubleType,
T4=parquet::ByteArrayType,
T5=parquet::FLBAType,
T6=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(720): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(721): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<Fixture,TestSel,testing::internal::Types6<T2,T3,T4,T5,T6,T7>>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
with
[
Fixture=parquet::test::TestStatistics,
TestSel=testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,
T2=parquet::Int64Type,
T3=parquet::FloatType,
T4=parquet::DoubleType,
T5=parquet::ByteArrayType,
T6=parquet::FLBAType,
T7=parquet::BooleanType
]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(698): message : while compiling class template member function 'bool testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/statistics_test.cc(490): message : see reference to function template instantiation 'bool testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>::Register(const char *,const testing::internal::CodeLocation &,const char *,const char *,int,const std::vector<std::string,std::allocator<std::string>> &)' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:/a/arrow/arrow/cpp/src/parquet/statistics_test.cc(490): message : see reference to class template instantiation 'testing::internal::TypeParameterizedTest<parquet::test::TestStatistics,testing::internal::TemplateSel<parquet::test::TestStatistics_MinMaxEncode_Test>,parquet::test::gtest_type_params_TestStatistics_>' being compiled [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\build\cpp\googletest_ep-prefix\include\gtest/internal/gtest-internal.h(529,33): error C2039: 'TearDownTestSuite': is not a member of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]
D:\a\arrow\arrow\cpp\src\parquet/types.h(518): message : see declaration of 'parquet::ByteArray' [D:\a\arrow\arrow\build\cpp\src\parquet\parquet-internals-test.vcxproj]

I'll keep looking.

@kou

kou commented Dec 4, 2020

Copy link
Copy Markdown
Member

Both the Appveyor case and the macOS case are caused by same reason. They can't find GoogleTest's library.
I'll take a look them.

cpp/src/parquet/statistics_test.cc: It seems that naming conflict like other build failures but I'm not sure. I'll also take a look it.

@kou

kou commented Dec 7, 2020

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g nightly

@github-actions

Copy link
Copy Markdown

Revision: f3f04e8

Submitted crossbow builds: ursa-labs/crossbow @ actions-743

TaskStatus
centos-7-aarch64TravisCI
centos-7-amd64Github Actions
centos-8-aarch64TravisCI
centos-8-amd64Github Actions
conda-cleanAzure
conda-linux-gcc-py36-aarch64Drone
conda-linux-gcc-py36-cpu-r36Azure
conda-linux-gcc-py36-cudaAzure
conda-linux-gcc-py37-aarch64Drone
conda-linux-gcc-py37-cpu-r40Azure
conda-linux-gcc-py37-cudaAzure
conda-linux-gcc-py38-aarch64Drone
conda-linux-gcc-py38-cpuAzure
conda-linux-gcc-py38-cudaAzure
conda-osx-clang-py36-r36Azure
conda-osx-clang-py37-r40Azure
conda-osx-clang-py38Azure
conda-win-vs2017-py36-r36Azure
conda-win-vs2017-py37-r40Azure
conda-win-vs2017-py38Azure
debian-buster-amd64Github Actions
debian-buster-arm64TravisCI
debian-stretch-amd64Github Actions
debian-stretch-arm64TravisCI
example-cpp-minimal-build-staticGithub Actions
example-cpp-minimal-build-static-system-dependencyGithub Actions
gandiva-jar-osxTravisCI
gandiva-jar-xenialTravisCI
homebrew-cppTravisCI
homebrew-r-autobrewTravisCI
nugetGithub Actions
test-conda-cppGithub Actions
test-conda-cpp-valgrindGithub Actions
test-conda-python-3.6Github Actions
test-conda-python-3.6-pandas-0.23Github Actions
test-conda-python-3.7Github Actions
test-conda-python-3.7-dask-latestGithub Actions
test-conda-python-3.7-hdfs-2.9.2Github Actions
test-conda-python-3.7-kartothek-latestGithub Actions
test-conda-python-3.7-kartothek-masterGithub Actions
test-conda-python-3.7-pandas-latestGithub Actions
test-conda-python-3.7-pandas-masterGithub Actions
test-conda-python-3.7-spark-branch-3.0Github Actions
test-conda-python-3.7-turbodbc-latestGithub Actions
test-conda-python-3.7-turbodbc-masterGithub Actions
test-conda-python-3.8Github Actions
test-conda-python-3.8-dask-masterGithub Actions
test-conda-python-3.8-hypothesisGithub Actions
test-conda-python-3.8-jpypeGithub Actions
test-conda-python-3.8-pandas-latestGithub Actions
test-conda-python-3.8-spark-masterGithub Actions
test-debian-10-cppCircleCI
test-debian-10-go-1.12Azure
test-debian-10-python-3Azure
test-debian-c-glibCircleCI
test-debian-rubyCircleCI
test-fedora-33-cppCircleCI
test-fedora-33-python-3Azure
test-r-linux-as-cranGithub Actions
test-r-rhub-ubuntu-gcc-releaseAzure
test-r-rocker-r-base-latestAzure
test-r-rstudio-r-base-3.6-bionicAzure
test-r-rstudio-r-base-3.6-centos6Azure
test-r-rstudio-r-base-3.6-centos8Azure
test-r-rstudio-r-base-3.6-opensuse15Azure
test-r-rstudio-r-base-3.6-opensuse42Azure
test-ubuntu-16.04-cppCircleCI
test-ubuntu-18.04-cppCircleCI
test-ubuntu-18.04-cpp-cmake32CircleCI
test-ubuntu-18.04-cpp-releaseCircleCI
test-ubuntu-18.04-cpp-staticCircleCI
test-ubuntu-18.04-docsAzure
test-ubuntu-18.04-python-3Azure
test-ubuntu-18.04-r-sanitizerAzure
test-ubuntu-20.04-cppGithub Actions
test-ubuntu-20.04-cpp-14Github Actions
test-ubuntu-20.04-cpp-17Github Actions
test-ubuntu-c-glibCircleCI
test-ubuntu-rubyAzure
ubuntu-bionic-amd64Github Actions
ubuntu-bionic-arm64TravisCI
ubuntu-focal-amd64Github Actions
ubuntu-focal-arm64TravisCI
ubuntu-groovy-amd64Github Actions
ubuntu-groovy-arm64TravisCI
ubuntu-xenial-amd64Github Actions
ubuntu-xenial-arm64TravisCI
wheel-manylinux1-cp36mAzure
wheel-manylinux1-cp37mAzure
wheel-manylinux1-cp38Azure
wheel-manylinux2010-cp36mAzure
wheel-manylinux2010-cp37mAzure
wheel-manylinux2010-cp38Azure
wheel-manylinux2014-cp36mAzure
wheel-manylinux2014-cp37mAzure
wheel-manylinux2014-cp38Azure
wheel-osx-high-sierra-cp36mTravisCI
wheel-osx-high-sierra-cp37mTravisCI
wheel-osx-high-sierra-cp38TravisCI
wheel-osx-mavericks-cp36mTravisCI
wheel-osx-mavericks-cp37mTravisCI
wheel-osx-mavericks-cp38TravisCI
wheel-win-cp36mGithub Actions
wheel-win-cp37mGithub Actions
wheel-win-cp38Github Actions

kou
kou approved these changes Dec 7, 2020

@koukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

All green. I'll merge this.

@koukou closed this in 3453943Dec 7, 2020
@arw2019

Copy link
Copy Markdown
ContributorAuthor

Thanks @kou@pitrou !!!

@arw2019
arw2019 deleted the ARROW-10746-GTEST_SKIP branch December 7, 2020 06:35
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@arw2019@pitrou@kou