1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 11:07:44 +00:00

squash commit

This commit is contained in:
Ulrich Hornung 2024-02-03 17:08:39 +01:00
parent b485a480cf
commit 93d922f075
No known key found for this signature in database
GPG key ID: 64EA3BAAF1BC0603
5 changed files with 483 additions and 133 deletions

View file

@ -0,0 +1,13 @@
#!/bin/bash
# spell-checker:ignore nextest watchplus PIPESTATUS
echo "$HOME"
PATH=$HOME/.cargo/bin:$PATH
export PATH
echo "$PATH"
pwd
command -v rustc && rustc -Vv
ls -la ~/.cargo/bin
cargo --list
cargo nextest --version

View file

@ -0,0 +1,48 @@
#!/bin/bash
# spell-checker:ignore nextest watchplus PIPESTATUS
echo "PATH: $PATH"
export PATH=$HOME/.cargo/bin:$PATH
export RUST_BACKTRACE=1
export CARGO_TERM_COLOR=always
export CARGO_INCREMENTAL=0
echo "PATH: $PATH"
run_tests_in_subprocess() (
# limit virtual memory to 3GB to avoid that OS kills sshd
ulimit -v $((1024 * 1024 * 3))
watchplus() {
# call: watchplus <interval> <command>
while true; do
"${@:2}"
sleep "$1"
done
}
kill_all_background_jobs() {
jobs -p | xargs -I{} kill -- {}
}
# observe (log) every 2 seconds the system resource usage to judge if we are at a limit
watchplus 2 df -h &
watchplus 2 free -hm &
# run tests
cd ~/coreutils && \
timeout --preserve-status --verbose -k 1m 60m \
cargo nextest run --profile ci --hide-progress-bar --features feat_os_unix_android
result=$?
kill_all_background_jobs
return $result
)
# run sub-shell to be able to use ulimit without affecting the sshd
run_tests_in_subprocess