-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-test.sh
executable file
·53 lines (43 loc) · 990 Bytes
/
run-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
53
#!/bin/bash
if [ ! -f '.deps' ]; then
./tools/setup-deps.sh
fi
echo "Preparing dependencies"
cd test-deps/testing
./setup.sh
cd ../../
if ! grep -q 'test-deps/testing/lib' '.deps'; then
echo " --loadpath test-deps/testing/lib" >> .deps
fi
declare -a implementations=([email protected] [email protected])
check_output() {
local status=0
while IFS= read -r LINE; do
echo $LINE
case $LINE in
*FAIL*) status=255 ;;
*Exception*) status=255 ;;
esac
done
return ${status}
}
EXIT_STATUS=0
loadpaths=`cat .deps`
for impl in ${implementations[@]}; do
echo Testing with ${impl}
for file in test/*; do
scheme-env run ${impl} --loadpath lib ${loadpaths} \
--standard r6rs --program ${file} 2>&1 | check_output
case ${EXIT_STATUS} in
0) EXIT_STATUS=$? ;;
esac
done
echo Done!
echo
done
echo Library test status ${EXIT_STATUS}
if [ ${EXIT_STATUS} != 0 ]; then
exit ${EXIT_STATUS}
fi
/bin/bash ./tools/run-contrib-test.sh
exit $?