From e165d54f160b812130fc5dbf809216c48718b59d Mon Sep 17 00:00:00 2001 From: Neal Richardson Date: Mon, 3 Feb 2020 11:19:53 -0800 Subject: [PATCH 1/3] Make sure macOS wheel verification has test data --- cpp/src/arrow/flight/test_util.cc | 2 +- dev/release/verify-release-candidate.sh | 4 ++++ python/pyarrow/tests/test_flight.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cpp/src/arrow/flight/test_util.cc b/cpp/src/arrow/flight/test_util.cc index 5ad7a899c66..59b486c348c 100644 --- a/cpp/src/arrow/flight/test_util.cc +++ b/cpp/src/arrow/flight/test_util.cc @@ -454,7 +454,7 @@ Status TestClientBasicAuthHandler::GetToken(std::string* token) { Status GetTestResourceRoot(std::string* out) { const char* c_root = std::getenv("ARROW_TEST_DATA"); if (!c_root) { - return Status::IOError("Test resources not found, set ARROW_TEST_DATA"); + return Status::IOError("Test resources not found, set ARROW_TEST_DATA to /testing/data"); } *out = std::string(c_root); return Status::OK(); diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index 24c60ea632b..64da8759aee 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -637,6 +637,10 @@ test_linux_wheels() { test_macos_wheels() { local py_arches="2.7m 3.5m 3.6m 3.7m 3.8" + if [ ! -d "arrow-testing" ]; then + git clone https://github.com/apache/arrow-testing.git + fi + export ARROW_TEST_DATA=$PWD/arrow-testing/data for py_arch in ${py_arches}; do local env=_verify_wheel-${py_arch} diff --git a/python/pyarrow/tests/test_flight.py b/python/pyarrow/tests/test_flight.py index ff31b64105c..fe0470f7e5d 100644 --- a/python/pyarrow/tests/test_flight.py +++ b/python/pyarrow/tests/test_flight.py @@ -60,7 +60,7 @@ def resource_root(): """Get the path to the test resources directory.""" if not os.environ.get("ARROW_TEST_DATA"): raise RuntimeError("Test resources not found; set " - "ARROW_TEST_DATA to /testing") + "ARROW_TEST_DATA to /testing/data") return pathlib.Path(os.environ["ARROW_TEST_DATA"]) / "flight" From df9ef255dadc4966a7b41613bbb1262f15e91098 Mon Sep 17 00:00:00 2001 From: Neal Richardson Date: Mon, 3 Feb 2020 14:16:16 -0800 Subject: [PATCH 2/3] Move addition and fix lint --- cpp/src/arrow/flight/test_util.cc | 3 ++- dev/release/verify-release-candidate.sh | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cpp/src/arrow/flight/test_util.cc b/cpp/src/arrow/flight/test_util.cc index 59b486c348c..5d83353d281 100644 --- a/cpp/src/arrow/flight/test_util.cc +++ b/cpp/src/arrow/flight/test_util.cc @@ -454,7 +454,8 @@ Status TestClientBasicAuthHandler::GetToken(std::string* token) { Status GetTestResourceRoot(std::string* out) { const char* c_root = std::getenv("ARROW_TEST_DATA"); if (!c_root) { - return Status::IOError("Test resources not found, set ARROW_TEST_DATA to /testing/data"); + return Status::IOError( + "Test resources not found, set ARROW_TEST_DATA to /testing/data"); } *out = std::string(c_root); return Status::OK(); diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index 64da8759aee..0b5e08d77bd 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -637,10 +637,6 @@ test_linux_wheels() { test_macos_wheels() { local py_arches="2.7m 3.5m 3.6m 3.7m 3.8" - if [ ! -d "arrow-testing" ]; then - git clone https://github.com/apache/arrow-testing.git - fi - export ARROW_TEST_DATA=$PWD/arrow-testing/data for py_arch in ${py_arches}; do local env=_verify_wheel-${py_arch} @@ -672,6 +668,11 @@ test_macos_wheels() { } test_wheels() { + if [ ! -d "arrow-testing" ]; then + git clone https://github.com/apache/arrow-testing.git + fi + export ARROW_TEST_DATA=$PWD/arrow-testing/data + local download_dir=binaries mkdir -p ${download_dir} From a29e88a7ea3cb2fb0b8a7fd10ce3791a2b3a9082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Tue, 4 Feb 2020 12:53:56 +0100 Subject: [PATCH 3/3] factor out testing repository cloning --- dev/release/verify-release-candidate.sh | 29 +++++++++++++------------ 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index 0b5e08d77bd..bae762d3274 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -522,6 +522,18 @@ test_integration() { $INTEGRATION_TEST_ARGS } +clone_testing_repositories() { + # 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 + export PARQUET_TEST_DATA=$PWD/parquet-testing/data +} + test_source_distribution() { export ARROW_HOME=$TMPDIR/install export PARQUET_HOME=$TMPDIR/install @@ -534,15 +546,7 @@ test_source_distribution() { NPROC=$(nproc) fi - # 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 - export PARQUET_TEST_DATA=$PWD/parquet-testing/data + clone_testing_repositories if [ ${TEST_JAVA} -gt 0 ]; then test_package_java @@ -668,11 +672,8 @@ test_macos_wheels() { } test_wheels() { - if [ ! -d "arrow-testing" ]; then - git clone https://github.com/apache/arrow-testing.git - fi - export ARROW_TEST_DATA=$PWD/arrow-testing/data - + clone_testing_repositories + local download_dir=binaries mkdir -p ${download_dir}