3 if [ ! -z "$srcdir" ]; then
4 compare_ir
=`pwd`/tests
/compare_ir
6 compare_ir
=.
/compare_ir
12 echo "====== Generating tests ======"
13 for dir
in tests
/*/; do
14 if [ -e "${dir}create_test_cases.py" ]; then
15 cd $dir; $PYTHON2 create_test_cases.py
; cd ..
20 echo "====== Testing optimization passes ======"
21 for test in `find . -iname '*.opt_test'`; do
22 echo -n "Testing $test..."
23 (cd `dirname "$test"`; .
/`basename "$test"`) > "$test.out" 2>&1
25 if $PYTHON2 $PYTHON_FLAGS $compare_ir "$test.expected" "$test.out" >/dev
/null
2>&1; then
30 $PYTHON2 $PYTHON_FLAGS $compare_ir "$test.expected" "$test.out"
35 echo "$pass/$total tests returned correct results"
38 if [[ $pass == $total ]]; then