This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 2de43af75b GH-46974: [Integration][Archery] Add support for
ARROW_JS_ROOT (#46975)
2de43af75b is described below
commit 2de43af75b1e9c0bae340dae3a9021c3025fd02e
Author: Sutou Kouhei <[email protected]>
AuthorDate: Fri Jul 4 06:38:20 2025 +0900
GH-46974: [Integration][Archery] Add support for ARROW_JS_ROOT (#46975)
### Rationale for this change
If we can specify the JS implementation directory by an environment
variable, it's useful. Because developers don't need to copy the JS
implementation to `apache/arrow/js`.
### What changes are included in this PR?
Refer `ARROW_JS_ROOT` before using the default JS implementation directory.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
No.
* GitHub Issue: #46974
Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
ci/scripts/integration_arrow.sh | 1 +
dev/archery/archery/integration/tester_js.py | 7 +------
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/ci/scripts/integration_arrow.sh b/ci/scripts/integration_arrow.sh
index 8ef977ad23..a4c0aca72a 100755
--- a/ci/scripts/integration_arrow.sh
+++ b/ci/scripts/integration_arrow.sh
@@ -47,6 +47,7 @@ fi
github_actions_group_end
export ARROW_BUILD_ROOT=${build_dir}
+export ARROW_JS_ROOT=${build_dir}/js
# Get more detailed context on crashes
export PYTHONFAULTHANDLER=1
diff --git a/dev/archery/archery/integration/tester_js.py
b/dev/archery/archery/integration/tester_js.py
index dcf56f9a5a..25b288ad19 100644
--- a/dev/archery/archery/integration/tester_js.py
+++ b/dev/archery/archery/integration/tester_js.py
@@ -16,17 +16,12 @@
# under the License.
import os
-from pathlib import Path
from .tester import Tester
from .util import run_cmd, log
-ARROW_BUILD_ROOT = os.environ.get(
- 'ARROW_BUILD_ROOT',
- Path(__file__).resolve().parents[4]
-)
-ARROW_JS_ROOT = os.path.join(ARROW_BUILD_ROOT, 'js')
+ARROW_JS_ROOT = os.environ['ARROW_JS_ROOT']
_EXE_PATH = os.path.join(ARROW_JS_ROOT, 'bin')
_VALIDATE = os.path.join(_EXE_PATH, 'integration.ts')
_JSON_TO_ARROW = os.path.join(_EXE_PATH, 'json-to-arrow.ts')