Merge branch 'stable' into devel
[tails.git] / bin / test-rerun.sh
blobf522a05bca044da2bf0e3d3920e1d75719ff0cfc
1 #!/bin/bash
3 if [ "$(id -u)" -ne 0 ]; then
4 exec sudo \
5 VERSION="$VERSION" ISOS="$ISOS" PREVIOUS_STABLE_VERSION="$PREVIOUS_STABLE_VERSION" \
6 tmpdir="$HOME/tails/release/test-results/${VERSION:?}" \
7 "$0" "$@"
8 fi
11 args=(--tmpdir "$tmpdir" --capture --view
12 --iso "${ISOS:?}/tails-amd64-${VERSION:?}/tails-amd64-${VERSION:?}.iso"
13 --old-iso "${ISOS}/tails-amd64-${PREVIOUS_STABLE_VERSION:?}/tails-amd64-${PREVIOUS_STABLE_VERSION:?}.iso"
16 # When running test suite during release, it's very common to go AFK while the test suite is running. So let's make sure Chutney successfully bootstrapped so
17 # you don't risk coming back hours later, having to restart from
18 # scratch. The following command will exit when Chutney has successfully
19 # bootstrapped, or time out after ten minutes, which indicates that
20 # something is wrong:
22 sleep 10
23 if ! env CHUTNEY_DATA_DIR="${tmpdir}/chutney-data" \
24 CHUTNEY_START_TIME=600 \
25 submodules/chutney/chutney wait_for_bootstrap \
26 features/chutney/test-network || exit 1
27 then
28 echo "ERROR: chutney not ready" >&2
29 exit 1
31 ) &
32 ./run_test_suite "${args[@]}" "$@"
34 while true; do
35 ./run_test_suite "${args[@]}" "@$(find "${tmpdir:?}" -maxdepth 2 -type f -name rerun.txt -print0 | xargs -0 ls -t1|stest -s|shuf -n1)"
36 sleep 3
37 done