-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun-tests.sh
executable file
·48 lines (42 loc) · 1.04 KB
/
run-tests.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
#!/bin/bash
declare -a implementations=(sagittarius@0.9.4 chez@v9.5)
declare -a test_files=(test/tcp)
echo "Preparing for Chez Scheme"
cd test-deps/testing
./setup.sh
cd ../../
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
for impl in ${implementations[@]}; do
echo Testing with ${impl}
for file in ${test_files[@]}; do
scheme-env run ${impl} \
--loadpath lib \
--loadpath deps/pffi/src --loadpath deps/psystem/lib \
--standard r6rs --program ${file}-server.scm &
# wait until the server is running
sleep 1
scheme-env run ${impl} \
--loadpath lib \
--loadpath deps/pffi/src --loadpath deps/psystem/lib \
--loadpath test-deps/testing/lib \
--standard r6rs --program ${file}.scm 2>&1 | check_output
case ${EXIT_STATUS} in
0) EXIT_STATUS=$? ;;
esac
done
echo Done!
echo
done
echo Library test status ${EXIT_STATUS}
exit ${EXIT_STATUS}