Files
datafusion/ci/scripts/cpp_test.sh
T
Krisztián Szűcs 0ff20169fb ARROW-7119: [C++][CI] Show automatic backtraces
Automatically generate coredumps and backtraces for the failing C++ tests on both Linux (including docker) and macOS.

Closes #6202 from kszucs/coredump and squashes the following commits:

f8200da97 <Krisztián Szűcs> remove sudo from the comment
1e75d9349 <Krisztián Szűcs> resolve review issues
ef5ac74e0 <Krisztián Szűcs> revert segfault enforcing change
deaca223a <Krisztián Szűcs> remove debug commands
467e0001d <Krisztián Szűcs> set ulimit within the same shell
d2af4e07c <Krisztián Szűcs> debug macos coredumps
7eae170cd <Krisztián Szűcs> debug macos
01961de60 <Krisztián Szűcs> macos debug
d0e4f623d <Krisztián Szűcs> remove debug commands
382a5f02a <Krisztián Szűcs> install gdb in more images
95c5384f9 <Krisztián Szűcs> limit the pattern for the first 15 chars
e75238cf6 <Krisztián Szűcs> debug
76d072b67 <Krisztián Szűcs> set ulimit
b8db15f16 <Krisztián Szűcs> no sudo
04fef61ae <Krisztián Szűcs> use sysctl
6c8bc4ffe <Krisztián Szűcs> debug
e8ec7ca53 <Krisztián Szűcs> remove util_coredump
655db2291 <Krisztián Szűcs> workarounds
cf03c0c3d <Krisztián Szűcs> ARROW_TEST_ULIMIT_CORE: unlimited
8a092cb1b <Krisztián Szűcs> tune run-tests.sh
7f2ed2dbe <Krisztián Szűcs> delimiter
e830bc7bd <Krisztián Szűcs> debug
187c32e23 <Krisztián Szűcs> permissions
ada66c06a <Krisztián Szűcs> force segfault
379b6ea5b <Krisztián Szűcs> enable for python and ruby macos builds
3f4af23c1 <Krisztián Szűcs> executable flag
b51b1fe49 <Krisztián Szűcs> on failure
28628acbb <Krisztián Szűcs> continue on error to show the coredump
eb1cdb57f <Krisztián Szűcs> coredump on macos

Authored-by: Krisztián Szűcs <szucs.krisztian@gmail.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
2020-02-12 08:53:23 +09:00

55 lines
1.6 KiB
Bash
Executable File

#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
set -ex
arrow_dir=${1}
source_dir=${1}/cpp
build_dir=${2}/cpp
binary_output_dir=${build_dir}/${ARROW_BUILD_TYPE:-debug}
export ARROW_TEST_DATA=${arrow_dir}/testing/data
export PARQUET_TEST_DATA=${source_dir}/submodules/parquet-testing/data
export LD_LIBRARY_PATH=${ARROW_HOME}/${CMAKE_INSTALL_LIBDIR:-lib}:${LD_LIBRARY_PATH}
case "$(uname)" in
Linux)
n_jobs=$(nproc)
;;
Darwin)
n_jobs=$(sysctl -n hw.ncpu)
;;
*)
n_jobs=1
;;
esac
pushd ${build_dir}
ctest --output-on-failure -j${n_jobs}
if [ "${ARROW_FUZZING}" == "ON" ]; then
# Fuzzing regression tests
${binary_output_dir}/arrow-ipc-stream-fuzz ${ARROW_TEST_DATA}/arrow-ipc-stream/crash-*
${binary_output_dir}/arrow-ipc-stream-fuzz ${ARROW_TEST_DATA}/arrow-ipc-stream/*-testcase-*
${binary_output_dir}/arrow-ipc-file-fuzz ${ARROW_TEST_DATA}/arrow-ipc-file/*-testcase-*
fi
popd