forked from mongodb/mongo-hadoop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.sh
executable file
·52 lines (42 loc) · 821 Bytes
/
test.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
48
49
50
51
52
#! /bin/sh
alias g="./gradlew --daemon"
OPTS=test
while [ "$1" ]
do
case $1 in
"examples")
OPTS="historicalYield sensorData enronEmails"
;;
"all")
HV="all"
;;
esac
shift
done
echo Running \"$OPTS\"
function browser() {
while [ "$1" ]
do
[ -f $1 ] && open $1
shift
done
}
function run() {
#g clean jar testJar configureCluster test historicalYield sensorData enronEmails \
#-PclusterVersion=${HV} 2>&1 | tee -a test-${HV}.out
g clean jar testJar $OPTS --stacktrace 2>&1 | tee -a build/test.out
for i in "*/build/reports/tests/index.html"
do
if [ "`grep -i failed $i 2> /dev/null`" ]
then
echo "********** Found failing tests. Exiting."
browser $i
FAILED=true
fi
if [ $FAILED ]
then
exit
fi
done
}
run