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

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

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