mirror of
https://github.com/chatmail/core.git
synced 2026-04-05 23:22:11 +03:00
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.
26 lines
556 B
Bash
Executable File
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
|
|
|