forked from andybarry/flight
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-all-tests
More file actions
executable file
·50 lines (33 loc) · 801 Bytes
/
run-all-tests
File metadata and controls
executable file
·50 lines (33 loc) · 801 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
43
44
45
46
47
48
#!/bin/bash
# make bash bail out if anything errors
set -e
set -o pipefail
# error out if the date is before the year 2014
# since that indicates the clock isn't set
if [ `date +%s` -lt 1430231759 ]
then
echo "Error: time/date is not set correctly."
echo "Current time/date: `date`"
exit 1
fi
# read the file
FILE=tests.txt
ROOT=`pwd`
while read line; do
# ignore comments
case "$line" in \#*) continue ;; esac
# ignore empty lines
if [ -z $line ]
then
continue
fi
# get directory
dir=$(dirname "$line")
filename=$(basename "$line")
echo "----------------------------------------"
echo " Running: $line"
echo "----------------------------------------"
cd $ROOT/$dir
# run test
./$filename
done < $FILE