forked from distributed-system-analysis/pbench
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-e2etests
More file actions
executable file
·42 lines (34 loc) · 826 Bytes
/
run-e2etests
File metadata and controls
executable file
·42 lines (34 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
dir=$(dirname $0)
let sts=0
function tail_and_wait {
pid=$1
name=$2
file=$3
printf -- "+++ ${name} E2E Tests +++\n\n"
tail -n 9999999 -f ${file} --pid ${pid}
if [[ $? -ne 0 ]]; then
printf -- "tail -f ${file} --pid ${pid} failed\n" >&2
return 1
fi
wait ${pid}
let tw_sts=$?
if [[ $tw_sts -ne 0 ]]; then
status="FAILED"
else
status="SUCCEEDED"
fi
rm -f ${file}
printf -- "\n--- ${name} E2E Tests ($status) ---\n"
return $tw_sts
}
trap "kill -KILL -$$ > /dev/null 2>&1" INT TERM QUIT
> /var/tmp/dashboard.out
$dir/web-server/v0.4/e2etests > /var/tmp/dashboard.out 2>&1 < /dev/null &
dpid=$!
tail_and_wait $dpid 'Dashboard' /var/tmp/dashboard.out
let sts=sts+$?
if [ $sts -gt 0 ]; then
echo "E2E tests FAILED"
fi
exit $sts