-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathtest
More file actions
executable file
·58 lines (52 loc) · 1.54 KB
/
Copy pathtest
File metadata and controls
executable file
·58 lines (52 loc) · 1.54 KB
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
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
set -e
[[ "$TRACE" == "true" ]] && set -x
cd "$(dirname "$0")/.."
echo "Clearing test output directory"
rm -rf tmp/test_output/
mkdir -p tmp/test_output
[ -f script/build ] && script/build
run_tests() {
runtime_env="$1"
if time script/docker -i "$runtime_env" /app/script/inside_container/test; then
tput bold # bold text
tput setaf 2 # green text
echo "======================================"
echo "$runtime_env Passed"
echo "======================================"
tput sgr0 # reset to default text
return 0
else
tput bold # bold text
tput setaf 1 # red text
echo "======================================"
echo "$runtime_env FAILED"
echo "======================================"
tput sgr0 # reset to default text
return 1
fi
}
success="true"
for runtime_env in $(cat .runtime-environments | sed 's/[[:blank:]]*#.*//;/^[[:blank:]]*$/d'); do
echo
echo
echo "Testing runtime env $runtime_env"
run_tests "$runtime_env" || success="false"
done
if [ $success == "true" ]; then
tput bold # bold text
tput setaf 2 # green text
echo "======================================"
echo "= Full Test Suite Passed ="
echo "======================================"
tput sgr0 # reset to default text
exit 0
else
tput bold # bold text
tput setaf 1 # red text
echo "======================================"
echo "= Full Test Suite FAILED ="
echo "======================================"
tput sgr0 # reset to default text
exit 1
fi