Files
chatmail-core/scripts/remote_tests_rust.sh
link2xt 38a547dfda build: make scripts for remote testing usable
This updates `scripts/remote_tests_{rust,python}.sh`.
The scripts were previously used to run tests
from CI on remote faster machine,
but they are still usable to run tests remotely
e.g. from a laptop that is on battery.
2025-11-26 17:12:25 +00:00

26 lines
556 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
if ! test -v SSHTARGET; then
echo >&2 SSHTARGET is not set
exit 1
fi
BUILDDIR=ci_builds/chatmailcore
echo "--- Copying files to $SSHTARGET:$BUILDDIR"
rsync -az --delete --mkpath --files-from=<(git ls-files) ./ "$SSHTARGET:$BUILDDIR"
echo "--- Running Rust tests remotely"
ssh -oBatchMode=yes -- "$SSHTARGET" <<_HERE
set +x -e
# make sure all processes exit when ssh dies
shopt -s huponexit
export RUSTC_WRAPPER=\`command -v sccache\`
cd $BUILDDIR
cargo nextest run
_HERE