Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Enable test suite of libarrow #1058

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ cmake -G "Ninja" ^
-DARROW_AZURE=%READ_RECIPE_META_YAML_WHY_NOT% ^
-DARROW_BOOST_USE_SHARED:BOOL=ON ^
-DARROW_BUILD_STATIC:BOOL=OFF ^
-DARROW_BUILD_TESTS:BOOL=OFF ^
-DARROW_BUILD_TESTS:BOOL=ON ^
-DARROW_BUILD_UTILITIES:BOOL=OFF ^
-DARROW_COMPUTE:BOOL=ON ^
-DARROW_CSV:BOOL=ON ^
-DARROW_DATASET:BOOL=ON ^
-DARROW_DEPENDENCY_SOURCE=SYSTEM ^
-DARROW_ENABLE_TIMING_TESTS=OFF ^
-DARROW_FILESYSTEM:BOOL=ON ^
-DARROW_FLIGHT:BOOL=ON ^
-DARROW_FLIGHT_REQUIRE_TLSCREDENTIALSOPTIONS:BOOL=ON ^
Expand Down Expand Up @@ -66,4 +67,10 @@ if %ERRORLEVEL% neq 0 exit 1
cmake --build . --config Release
if %ERRORLEVEL% neq 0 exit 1

npm install -g azurite
set ARROW_TEST_DATA=%SRC_DIR%\testing\data
set PARQUET_TEST_DATA=%SRC_DIR%\cpp\submodules\parquet-testing\data
ctest --progress --output-on-failure
if %ERRORLEVEL% neq 0 exit 1

popd
12 changes: 10 additions & 2 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@ cmake -GNinja \
-DARROW_BOOST_USE_SHARED=ON \
-DARROW_BUILD_BENCHMARKS=OFF \
-DARROW_BUILD_STATIC=OFF \
-DARROW_BUILD_TESTS=OFF \
-DARROW_BUILD_TESTS=ON \
-DARROW_BUILD_UTILITIES=OFF \
-DARROW_COMPUTE=ON \
-DARROW_CSV=ON \
-DARROW_CXXFLAGS="${CXXFLAGS}" \
-DARROW_DATASET=ON \
-DARROW_DEPENDENCY_SOURCE=SYSTEM \
-DARROW_ENABLE_TIMING_TESTS=OFF \
-DARROW_FILESYSTEM=ON \
-DARROW_FLIGHT=ON \
-DARROW_FLIGHT_REQUIRE_TLSCREDENTIALSOPTIONS=ON \
Expand Down Expand Up @@ -106,6 +107,13 @@ cmake -GNinja \
..

# Do not install arrow, only build.
cmake --build . --config Release
cmake --build .

if [[ "$CONDA_BUILD_CROSS_COMPILATION" != 1 ]]; then
npm install -g azurite
export ARROW_TEST_DATA=$SRC_DIR/testing/data
export PARQUET_TEST_DATA=$SRC_DIR/cpp/submodules/parquet-testing/data
ctest --progress --output-on-failure
fi

popd
26 changes: 24 additions & 2 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,27 @@ source:
- patches/0001-GH-44455-C-Update-vendored-date-to-3.0.3.patch
# backport https://github.com/apache/arrow/pull/44507
- patches/0002-GH-44448-C-Add-support-for-overriding-grpc_cpp_plugi.patch
# testing-submodule not part of release tarball
# fix for https://github.com/apache/arrow/issues/43808
- patches/0003-GH-43808-C-set-kStrptimeSupportsZone-to-false-for-ol.patch
# skip gcsfs tests due to missing `storage-testbench`
- patches/0004-disable-gcsfs_test.patch
# testing-submodules not part of release tarball
- git_url: https://github.com/apache/arrow-testing.git
git_rev: 4d209492d514c2d3cb2d392681b9aa00e6d8da1c
folder: testing
- git_url: https://github.com/apache/parquet-testing.git
git_rev: cb7a9674142c137367bf75a01b79c6e214a73199
folder: cpp/submodules/parquet-testing

build:
number: 0
# for cuda support, building with one version is enough to be compatible with
# all later versions, since arrow is only using libcuda, and not libcudart.
skip: true # [cuda_compiler_version not in ("None", cuda_compiler_version_min)]
# debug: only native compilation
skip: true # [build_platform != target_platform]
# debug: cannot run CUDA-enabled libarrow tests without GPU
skip: true # [cuda_compiler_version != "None"]

requirements:
build:
Expand All @@ -50,6 +61,8 @@ requirements:
# necessary for vendored jemalloc
- autoconf # [unix]
- make # [unix]
# where orc ends up looking (because during build, CONDA_PREFIX==BUILD_PREFIX)
- tzdata
host:
# for required dependencies, see
# https://github.com/apache/arrow/blob/apache-arrow-11.0.0/cpp/cmake_modules/ThirdpartyToolchain.cmake#L46-L75
Expand All @@ -73,7 +86,7 @@ requirements:
# arrow uses a customized jemalloc, see #944
# - jemalloc
- libabseil
- libboost-headers
- libboost-devel *
- libgoogle-cloud-devel
- libgoogle-cloud-storage-devel
- libgrpc
Expand All @@ -88,6 +101,15 @@ requirements:
- xsimd
- zlib
- zstd
# test requirements, c.f.
# https://github.com/apache/arrow/blob/apache-arrow-12.0.0/cpp/CMakeLists.txt#L842-L846
- gtest
# https://github.com/apache/arrow/blob/apache-arrow-12.0.0/cpp/src/arrow/flight/sql/CMakeLists.txt#L86-L87
- sqlite *
# required by s3fs tests
- minio-server
# for npm, to install azurite
- nodejs *

outputs:
- name: apache-arrow-proc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From d774a80949599d58d4726aaa2d78cc64208ab300 Mon Sep 17 00:00:00 2001
From: Sutou Kouhei <[email protected]>
Date: Mon, 21 Oct 2024 16:41:27 +0900
Subject: [PATCH 1/2] GH-44455: [C++] Update vendored date to 3.0.3
Subject: [PATCH 1/4] GH-44455: [C++] Update vendored date to 3.0.3

IANA tzdata changed its data format. So we need to update vendored
date to parse it.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 3d00b553ffd302ada8d74b5b77b71128c594c0b4 Mon Sep 17 00:00:00 2001
From: Sutou Kouhei <[email protected]>
Date: Wed, 23 Oct 2024 10:30:33 +0900
Subject: [PATCH 2/2] GH-44448: [C++] Add support for overriding
Subject: [PATCH 2/4] GH-44448: [C++] Add support for overriding
grpc_cpp_plugin path for cross-compiling

---
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 9c482984116a6e6dcce7e9f91af453aa51b966ee Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <[email protected]>
Date: Sat, 2 Nov 2024 15:29:20 +1100
Subject: [PATCH 3/4] GH-43808: [C++] set kStrptimeSupportsZone to false for
old glibc

---
cpp/src/arrow/util/value_parsing.h | 3 +++
1 file changed, 3 insertions(+)

diff --git a/cpp/src/arrow/util/value_parsing.h b/cpp/src/arrow/util/value_parsing.h
index 609906052c..d6a615f6f6 100644
--- a/cpp/src/arrow/util/value_parsing.h
+++ b/cpp/src/arrow/util/value_parsing.h
@@ -790,6 +790,9 @@ static inline bool ParseTimestampISO8601(const char* s, size_t length,

#if defined(_WIN32) || defined(ARROW_WITH_MUSL)
static constexpr bool kStrptimeSupportsZone = false;
+#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ < 28)
+// see https://github.com/apache/arrow/issues/43808
+static constexpr bool kStrptimeSupportsZone = false;
#else
static constexpr bool kStrptimeSupportsZone = true;
#endif
31 changes: 31 additions & 0 deletions recipe/patches/0004-disable-gcsfs_test.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From 43e073eb4821d1e940915add71553c84028f3358 Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <[email protected]>
Date: Sat, 2 Nov 2024 15:41:34 +1100
Subject: [PATCH 4/4] disable gcsfs_test

it cannot work unless we package https://github.com/googleapis/storage-testbench,
which however has extremely tight dependencies on protobuf etc., making it very
hard to fit this into our migration patterns
---
cpp/src/arrow/filesystem/CMakeLists.txt | 8 --------
1 file changed, 8 deletions(-)

diff --git a/cpp/src/arrow/filesystem/CMakeLists.txt b/cpp/src/arrow/filesystem/CMakeLists.txt
index 7afdf566f2..b22a48a0c9 100644
--- a/cpp/src/arrow/filesystem/CMakeLists.txt
+++ b/cpp/src/arrow/filesystem/CMakeLists.txt
@@ -42,14 +42,6 @@ if(ARROW_BUILD_BENCHMARKS)
${ARROW_BENCHMARK_LINK_LIBS})
endif()

-if(ARROW_GCS)
- add_arrow_test(gcsfs_test
- EXTRA_LABELS
- filesystem
- EXTRA_LINK_LIBS
- google-cloud-cpp::storage)
-endif()
-
if(ARROW_AZURE)
add_arrow_test(azurefs_test
EXTRA_LABELS
Loading