Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ repos:
?^ci/scripts/python_build\.sh$|
?^ci/scripts/python_sdist_build\.sh$|
?^ci/scripts/python_sdist_test\.sh$|
?^ci/scripts/python_test_emscripten\.sh$|
?^ci/scripts/python_wheel_unix_test\.sh$|
?^ci/scripts/r_build\.sh$|
?^ci/scripts/r_revdepcheck\.sh$|
Expand Down
7 changes: 4 additions & 3 deletions ci/scripts/python_test_emscripten.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ set -ex
build_dir=${1}/python
pyodide_dist_dir=${2}

cd ${build_dir}
cd "${build_dir}"

# note: this uses the newest wheel in dist
# shellcheck disable=SC2012
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part use ls with -t option, so we can't use echo.
I don't know alternate command which is usable on macOS / Linux.
(As far as I know, find and stat can't use the same option on macOS / Linux)

latest=$(python3 -c '
import glob, os
files = glob.glob("dist/pyarrow*.whl")
if files:
    print(max(files, key=os.path.getmtime))
')
echo "$latest"

pyodide_wheel=$(ls -t dist/pyarrow*.whl | head -1)

echo "-------------- Running emscripten tests in Node ----------------------"
python scripts/run_emscripten_tests.py ${pyodide_wheel} --dist-dir=${pyodide_dist_dir} --runtime=node
python scripts/run_emscripten_tests.py "${pyodide_wheel}" --dist-dir="${pyodide_dist_dir}" --runtime=node

echo "-------------- Running emscripten tests in Chrome --------------------"
python scripts/run_emscripten_tests.py ${pyodide_wheel} --dist-dir=${pyodide_dist_dir} --runtime=chrome
python scripts/run_emscripten_tests.py "${pyodide_wheel}" --dist-dir="${pyodide_dist_dir}" --runtime=chrome

Loading