From 6d4723da3abcc802f185e5505411c279131d7458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Mon, 3 Feb 2020 19:13:52 +0100 Subject: [PATCH] Support for restarting the release verification script --- dev/release/verify-release-candidate.sh | 35 ++++++++++++++++++------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index 9d68b7ce18b..24c60ea632b 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -28,6 +28,9 @@ # # If using a non-system Boost, set BOOST_ROOT and add Boost libraries to # LD_LIBRARY_PATH. +# +# To reuse build artifacts between runs set TMPDIR environment variable to +# a directory where the temporary files should be placed to. case $# in 3) ARTIFACT="$1" @@ -205,7 +208,12 @@ setup_tempdir() { fi } trap cleanup EXIT - TMPDIR=$(mktemp -d -t "$1.XXXXX") + + if [ -z "${TMPDIR}" ]; then + TMPDIR=$(mktemp -d -t "$1.XXXXX") + else + mkdir -p "${TMPDIR}" + fi } @@ -219,9 +227,12 @@ setup_miniconda() { MINICONDA=$PWD/test-miniconda - wget -O miniconda.sh $MINICONDA_URL - bash miniconda.sh -b -p $MINICONDA - rm -f miniconda.sh + if [ ! -d "${MINICONDA}" ]; then + # Setup miniconda only if the directory doesn't exist yet + wget -O miniconda.sh $MINICONDA_URL + bash miniconda.sh -b -p $MINICONDA + rm -f miniconda.sh + fi . $MINICONDA/etc/profile.d/conda.sh } @@ -249,7 +260,7 @@ test_and_install_cpp() { cython conda activate arrow-test - mkdir cpp/build + mkdir -p cpp/build pushd cpp/build ARROW_CMAKE_OPTIONS=" @@ -523,10 +534,14 @@ test_source_distribution() { NPROC=$(nproc) fi - git clone https://github.com/apache/arrow-testing.git + # Clone testing repositories if not cloned already + if [ ! -d "arrow-testing" ]; then + git clone https://github.com/apache/arrow-testing.git + fi + if [ ! -d "parquet-testing" ]; then + git clone https://github.com/apache/parquet-testing.git + fi export ARROW_TEST_DATA=$PWD/arrow-testing/data - - git clone https://github.com/apache/parquet-testing.git export PARQUET_TEST_DATA=$PWD/parquet-testing/data if [ ${TEST_JAVA} -gt 0 ]; then @@ -612,7 +627,7 @@ test_linux_wheels() { # install test requirements pip install -r ${ARROW_DIR}/python/requirements-test.txt - # execute the tests + # execute the python unit tests pytest --pyargs pyarrow done @@ -645,7 +660,7 @@ test_macos_wheels() { # install test requirements pip install -r ${ARROW_DIR}/python/requirements-test.txt - # execute the tests + # execute the python unit tests pytest --pyargs pyarrow conda deactivate