-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathtest_32.sh
executable file
·47 lines (39 loc) · 1.34 KB
/
test_32.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
#!/bin/bash
# Test script for 32 bit inputs
# Portably find the directory containing this script.
HERE=$(cd `dirname $0`; pwd)
# Assuming it lives in Scripts/, set ROOT to the root directory of the
# project.
ROOT=$HERE/..
# Now set the PYTHONPATH so we don't have to worry about the CWD
# whenever we invoke python scripts.
export PYTHONPATH=$ROOT:$PYTHONPATH
while getopts sCm:c:n opt; do
case $opt in
s) test_opts="-s"; compile_opts="$compile_opts -s" ;;
c) compile_opts="$compile_opts -c $OPTARG" ;;
n) compile_opts="$compile_opts -n" ;;
esac
done
shift $[OPTIND-1]
run_test() {
test=$1
shift
printf "\n\n\n\n\n\n\n\n\n\n"
echo "$test"
$ROOT/compile.py --dead-code-elimination $compile_opts $* Programs/$test || exit 1
Scripts/run-online.sh Programs/$test || exit 1
python Scripts/test-result.py $test_opts $test || exit 1
}
if test "$1"; then
test=$1
shift
run_test $test $*
else
test_opts="-s"
compile_opts="--stop"
# We do not run sfix, float, math, sqrt and custom_array tests for 32 bit inputs
for test in test_all test_array test_branch test_branching test_comparison test_count test_empty_tape test_flex test_for_range_multithread test_function test_idle_threads test_lib test_loop test_map_reduce test_mem_order test_new_threads test_threads test_vector; do
run_test $test
done
fi