Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # TODO: Retire this script and move the individual tests into the lit |
| 4 | # framework, to leverage parallel testing and other lit goodness. |
| 5 | |
| 6 | set -eux |
| 7 | |
Jim Stichnoth | d97c7df | 2014-06-04 11:57:08 -0700 | [diff] [blame] | 8 | OPTLEVELS="m1 2" |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 9 | OUTDIR=Output |
| 10 | # Clean the output directory to avoid reusing stale results. |
| 11 | rm -rf "${OUTDIR}" |
| 12 | mkdir -p "${OUTDIR}" |
| 13 | |
| 14 | for optlevel in ${OPTLEVELS} ; do |
| 15 | |
| 16 | ./crosstest.py -O${optlevel} --prefix=Subzero_ --target=x8632 \ |
| 17 | --dir="${OUTDIR}" \ |
| 18 | --llvm-bin-path="${LLVM_BIN_PATH}" \ |
| 19 | --test=simple_loop.c \ |
| 20 | --driver=simple_loop_main.c \ |
| 21 | --output=simple_loop_O${optlevel} |
| 22 | |
| 23 | ./crosstest.py -O${optlevel} --prefix=Subzero_ --target=x8632 \ |
| 24 | --dir="${OUTDIR}" \ |
| 25 | --llvm-bin-path="${LLVM_BIN_PATH}" \ |
Jan Voung | 3bd9f1a | 2014-06-18 10:50:57 -0700 | [diff] [blame] | 26 | --test=mem_intrin.cpp \ |
| 27 | --driver=mem_intrin_main.cpp \ |
| 28 | --output=mem_intrin_O${optlevel} |
| 29 | |
| 30 | ./crosstest.py -O${optlevel} --prefix=Subzero_ --target=x8632 \ |
| 31 | --dir="${OUTDIR}" \ |
| 32 | --llvm-bin-path="${LLVM_BIN_PATH}" \ |
| 33 | --test=test_arith.cpp --test=test_arith_frem.ll \ |
| 34 | --driver=test_arith_main.cpp \ |
| 35 | --output=test_arith_O${optlevel} |
| 36 | |
| 37 | ./crosstest.py -O${optlevel} --prefix=Subzero_ --target=x8632 \ |
| 38 | --dir="${OUTDIR}" \ |
| 39 | --llvm-bin-path="${LLVM_BIN_PATH}" \ |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 40 | --test=test_cast.cpp --test=test_cast_to_u1.ll \ |
| 41 | --driver=test_cast_main.cpp \ |
| 42 | --output=test_cast_O${optlevel} |
| 43 | |
| 44 | ./crosstest.py -O${optlevel} --prefix=Subzero_ --target=x8632 \ |
| 45 | --dir="${OUTDIR}" \ |
| 46 | --llvm-bin-path="${LLVM_BIN_PATH}" \ |
| 47 | --test=test_fcmp.pnacl.ll \ |
| 48 | --driver=test_fcmp_main.cpp \ |
| 49 | --output=test_fcmp_O${optlevel} |
| 50 | |
| 51 | ./crosstest.py -O${optlevel} --prefix=Subzero_ --target=x8632 \ |
| 52 | --dir="${OUTDIR}" \ |
| 53 | --llvm-bin-path="${LLVM_BIN_PATH}" \ |
Jim Stichnoth | de4ca71 | 2014-06-29 08:13:48 -0700 | [diff] [blame^] | 54 | --test=test_global.cpp \ |
| 55 | --driver=test_global_main.cpp \ |
| 56 | --output=test_global_O${optlevel} |
| 57 | |
| 58 | ./crosstest.py -O${optlevel} --prefix=Subzero_ --target=x8632 \ |
| 59 | --dir="${OUTDIR}" \ |
| 60 | --llvm-bin-path="${LLVM_BIN_PATH}" \ |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 61 | --test=test_icmp.cpp \ |
| 62 | --driver=test_icmp_main.cpp \ |
| 63 | --output=test_icmp_O${optlevel} |
| 64 | |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 65 | done |
| 66 | |
| 67 | for optlevel in ${OPTLEVELS} ; do |
| 68 | "${OUTDIR}"/simple_loop_O${optlevel} |
Jan Voung | 3bd9f1a | 2014-06-18 10:50:57 -0700 | [diff] [blame] | 69 | "${OUTDIR}"/mem_intrin_O${optlevel} |
| 70 | "${OUTDIR}"/test_arith_O${optlevel} |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 71 | "${OUTDIR}"/test_cast_O${optlevel} |
| 72 | "${OUTDIR}"/test_fcmp_O${optlevel} |
Jim Stichnoth | de4ca71 | 2014-06-29 08:13:48 -0700 | [diff] [blame^] | 73 | "${OUTDIR}"/test_global_O${optlevel} |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 74 | "${OUTDIR}"/test_icmp_O${optlevel} |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 75 | done |