-
Notifications
You must be signed in to change notification settings - Fork 43
/
testAll.sh
executable file
·47 lines (37 loc) · 1.06 KB
/
testAll.sh
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
#!/usr/bin/env bash
[[ "$TRACE" ]] && set -x
pushd `dirname "$0"` > /dev/null
trap __EXIT EXIT
colorful=false
tput setaf 7 > /dev/null 2>&1
if [[ $? -eq 0 ]]; then
colorful=true
fi
function __EXIT() {
popd > /dev/null
}
function printError() {
$colorful && tput setaf 1
>&2 echo "Error: $@"
$colorful && tput setaf 7
}
function printImportantMessage() {
$colorful && tput setaf 3
>&2 echo "$@"
$colorful && tput setaf 7
}
function printUsage() {
$colorful && tput setaf 3
>&2 echo "$@"
$colorful && tput setaf 7
}
printImportantMessage "It takes minutes to finish the tests."
go build -o cli/hotswap/hotswap github.com/edwingeng/hotswap/cli/hotswap
[[ $? -ne 0 ]] && exit 1
cli/hotswap/hotswap build --staticLinking cli/hotswap/trial/arya cli/hotswap/trial
[[ $? -ne 0 ]] && exit 1
cli/hotswap/hotswap build --staticLinking cli/hotswap/trial/snow cli/hotswap/trial
[[ $? -ne 0 ]] && exit 1
cli/hotswap/hotswap build --staticLinking cli/hotswap/trial/stubborn cli/hotswap/trial
[[ $? -ne 0 ]] && exit 1
go test -trimpath -v "$@"