Skip to content

Commit

Permalink
apacheGH-38345: [Release] Use local test data for verification if pos…
Browse files Browse the repository at this point in the history
…sible (apache#38362)

### Rationale for this change

We have external test data repositories, apache/arrow-testing and apache/parquet-testing. We use them as submodule. apache/arrow may not use the latest test data repositories. But our verification script always use the latest test data repositories. It may cause test failures.

### What changes are included in this PR?

Use local test data if they exist.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: apache#38345

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
  • Loading branch information
kou authored and JerAguilon committed Oct 25, 2023
1 parent 2ccb13b commit 882a6a0
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions dev/release/verify-release-candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -959,12 +959,26 @@ ensure_source_directory() {
fi
fi

# Ensure that the testing repositories are cloned
if [ ! -d "${ARROW_SOURCE_DIR}/testing/data" ]; then
git clone https://github.com/apache/arrow-testing.git ${ARROW_SOURCE_DIR}/testing
# Ensure that the testing repositories are prepared
if [ ! -d ${ARROW_SOURCE_DIR}/testing/data ]; then
if [ -d ${SOURCE_DIR}/../../testing/data ]; then
cp -a ${SOURCE_DIR}/../../testing/ ${ARROW_SOURCE_DIR}/
else
git clone \
https://github.com/apache/arrow-testing.git \
${ARROW_SOURCE_DIR}/testing
fi
fi
if [ ! -d "${ARROW_SOURCE_DIR}/cpp/submodules/parquet-testing/data" ]; then
git clone https://github.com/apache/parquet-testing.git ${ARROW_SOURCE_DIR}/cpp/submodules/parquet-testing
if [ ! -d ${ARROW_SOURCE_DIR}/cpp/submodules/parquet-testing/data ]; then
if [ -d ${SOURCE_DIR}/../../cpp/submodules/parquet-testing/data ]; then
cp -a \
${SOURCE_DIR}/../../cpp/submodules/parquet-testing/ \
${ARROW_SOURCE_DIR}/cpp/submodules/
else
git clone \
https://github.com/apache/parquet-testing.git \
${ARROW_SOURCE_DIR}/cpp/submodules/parquet-testing
fi
fi

export ARROW_TEST_DATA=$ARROW_SOURCE_DIR/testing/data
Expand Down

0 comments on commit 882a6a0

Please sign in to comment.