ghost_loop.sh 798 B

123456789101112131415
  1. #!/bin/bash
  2. # ghost_loop.sh <vm> <tries> [extension.js] - ghost_run.sh again and again (tags try1, try2, ...) until a run has a failing
  3. # check or the tries are used up; the same environment variables as ghost_run.sh. A frozen wallpaper after the engine stopped
  4. # (GNOME 46) shows up as the failing hotswap frame check, it needs several full runs to appear.
  5. HERE=$(cd "$(dirname "$0")" && pwd)
  6. vm=$1 tries=$2 ext=$3
  7. [ -n "$vm" ] && [ -n "$tries" ] || { sed -n '2,4p' "$0"; exit 2; }
  8. root=${LWE_REPORT_ROOT:-$HERE/reports/ghost}
  9. for n in $(seq 1 "$tries"); do
  10. "$HERE/ghost_run.sh" "$vm" "try$n" "$ext"
  11. if grep -q '^FAIL' "$root/$vm-try$n/$vm/checks.txt" 2>/dev/null; then
  12. echo "$(date +%T) $vm try$n has a failing check, the loop stops" >> "$root/runs.log"
  13. break
  14. fi
  15. done