Skip to content

Commit ae129a7

Browse files
arrow: add run_tests.sh (#13745)
run_tests.sh is used as part of Chronos with cached builds: https://github.com/google/oss-fuzz/tree/master/infra/experimental/chronos#check-tests ```sh $ infra/experimental/chronos/check_tests.sh arrow c++ ... ... 33/46 Test #36: arrow-json-test .................... Passed 1.56 sec 34/46 Test #32: arrow-feather-test ................. Passed 3.06 sec 35/46 Test #26: arrow-utility-test ................. Passed 3.49 sec 36/46 Test #39: parquet-reader-test ................ Passed 3.57 sec 37/46 Test #23: arrow-io-compressed-test ........... Passed 5.50 sec 38/46 Test #38: parquet-encoding-test .............. Passed 5.30 sec 39/46 Test #20: arrow-compute-scalar-cast-test ..... Passed 7.04 sec 40/46 Test #27: arrow-async-utility-test ........... Passed 8.69 sec 41/46 Test #42: parquet-arrow-reader-writer-test ... Passed 8.41 sec 42/46 Test #29: arrow-threading-utility-test ....... Passed 8.76 sec 43/46 Test #41: parquet-chunker-test ............... Passed 8.71 sec 44/46 Test #1: arrow-array-test ................... Passed 9.60 sec 45/46 Test #34: arrow-ipc-read-write-test .......... Passed 9.52 sec 46/46 Test #40: parquet-writer-test ................ Passed 18.53 sec 100% tests passed, 0 tests failed out of 46 Label Time Summary: arrow-compute-tests = 7.36 sec*proc (2 tests) arrow-tests = 63.05 sec*proc (34 tests) parquet-tests = 48.01 sec*proc (10 tests) unittest = 118.42 sec*proc (46 tests) Total Test time (real) = 18.97 sec -------------------------------------------------------- Total time taken to replay tests: 19 ``` --------- Signed-off-by: David Korczynski <david@adalogics.com>
1 parent 2162dfb commit ae129a7

File tree

3 files changed

+44
-18
lines changed

3 files changed

+44
-18
lines changed

projects/arrow/Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,16 @@ RUN apt-get update -y -q && \
2525
flex \
2626
ninja-build \
2727
python3
28-
RUN wget https://archives.boost.io/release/1.85.0/source/boost_1_85_0.tar.bz2 # Temporarily use manual installation over the outdated libboost-dev package
28+
29+
RUN wget https://github.com/boostorg/boost/releases/download/boost-1.87.0/boost-1.87.0-cmake.tar.gz && \
30+
tar -xvf boost-1.87.0-cmake.tar.gz && \
31+
cd boost-1.87.0/ && \
32+
CFLAGS="" CXXFLAGS="" ./bootstrap.sh && \
33+
CFLAGS="" CXXFLAGS="" ./b2 headers && \
34+
CFLAGS="" CXXFLAGS="" ./b2 runtime-link=static link=static variant=release install -j 10 && \
35+
cp -R -f boost/ /usr/include/
2936

3037
RUN git clone --depth=1 --recurse-submodules \
3138
https://github.com/apache/arrow.git $SRC/arrow
3239

33-
COPY build.sh $SRC/
40+
COPY *.sh $SRC/

projects/arrow/build.sh

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -eu
1+
#!/bin/bash -eux
22
# Copyright 2020 Google Inc.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,21 +15,12 @@
1515
#
1616
################################################################################
1717

18-
set -ex
19-
20-
# Install Boost headers
21-
(
22-
cd $SRC/
23-
tar jxf boost_1_85_0.tar.bz2
24-
cd boost_1_85_0/
25-
CFLAGS="" CXXFLAGS="" ./bootstrap.sh
26-
CFLAGS="" CXXFLAGS="" ./b2 headers
27-
cp -R boost/ /usr/include/
28-
)
29-
3018
ARROW=${SRC}/arrow/cpp
3119

32-
cd ${WORK}
20+
export BUILD_DIR=$SRC/build-dir
21+
mkdir -p ${BUILD_DIR}
22+
cd ${BUILD_DIR}
23+
#cd ${WORK}
3324

3425
# The CMake build setup compiles and runs the Thrift compiler, but ASAN
3526
# would report leaks and error out.
@@ -39,6 +30,8 @@ cmake ${ARROW} -GNinja \
3930
-DCMAKE_BUILD_TYPE=Release \
4031
-DARROW_DEPENDENCY_SOURCE=BUNDLED \
4132
-DBOOST_SOURCE=SYSTEM \
33+
-DBoost_USE_STATIC_RUNTIME=on \
34+
-DARROW_BOOST_USE_SHARED=off \
4235
-DCMAKE_C_FLAGS="${CFLAGS}" \
4336
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
4437
-DARROW_EXTRA_ERROR_CONTEXT=off \
@@ -48,7 +41,7 @@ cmake ${ARROW} -GNinja \
4841
-DARROW_PARQUET=on \
4942
-DARROW_BUILD_SHARED=off \
5043
-DARROW_BUILD_STATIC=on \
51-
-DARROW_BUILD_TESTS=off \
44+
-DARROW_BUILD_TESTS=on \
5245
-DARROW_BUILD_INTEGRATION=off \
5346
-DARROW_BUILD_BENCHMARKS=off \
5447
-DARROW_BUILD_EXAMPLES=off \
@@ -69,8 +62,11 @@ cmake ${ARROW} -GNinja \
6962
-DARROW_USE_TSAN=off \
7063
-DARROW_FUZZING=on \
7164

72-
cmake --build .
65+
cmake --build . -j$(nproc)
7366

7467
cp -a release/* ${OUT}
7568

69+
# Remove unit tests from out
70+
rm $OUT/*-test
71+
7672
${ARROW}/build-support/fuzzing/generate_corpuses.sh ${OUT}

projects/arrow/run_tests.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
###############################################################################
16+
17+
set -eux
18+
19+
cd $SRC/build-dir
20+
21+
export PARQUET_TEST_DATA=$SRC/arrow/cpp/submodules/parquet-testing/data/
22+
export ARROW_TEST_DATA=$SRC/arrow/testing/data
23+
ASAN_OPTIONS="detect_leaks=0" ctest -j$(nproc)

0 commit comments

Comments
 (0)