summaryrefslogtreecommitdiff
path: root/run-test.sh
blob: c982c4cbfb9cf8bbf30dcbf17ab2dc3e7183617e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

cd "$(dirname "$(readlink -e "$0")")"

for i in {1..300}; do
  [ -d ~erich/.cache/ms-playwright/ ] && break
  sleep 1
done

if ! cnt=$(su erich -c "npx playwright test"); then
  printf '%s\n' \
    'To: erich@eckner.net' \
    'From: erich@'"$(hostname)" \
    'Subject: playwright' \
    '' \
    'Die Milchtankstelle hat neue Nachrichten:' \
    '' \
    "${cnt}" \
  | sendmailadvanced -t
fi