| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 | 2 |
| 3 # TODO: Retire this script and move the individual tests into the lit | 3 # TODO: Retire this script and move the individual tests into the lit |
| 4 # framework, to leverage parallel testing and other lit goodness. | 4 # framework, to leverage parallel testing and other lit goodness. |
| 5 | 5 |
| 6 set -eux | 6 set -eux |
| 7 | 7 |
| 8 # TODO(stichnot): Use FindBaseNaCl so that the script can be run from | 8 # TODO(stichnot): Use FindBaseNaCl so that the script can be run from |
| 9 # anywhere within the native_client directory. | 9 # anywhere within the native_client directory. |
| 10 PATH="../pydir:${PATH}" | 10 PATH="../pydir:${PATH}" |
| 11 OPTLEVELS="m1 2" | 11 OPTLEVELS="m1 2" |
| 12 ATTRIBUTES="sse2 sse4.1" | 12 ATTRIBUTES="sse2 sse4.1" |
| 13 SANDBOX="0 1" |
| 13 OUTDIR=Output | 14 OUTDIR=Output |
| 14 # Clean the output directory to avoid reusing stale results. | 15 # Clean the output directory to avoid reusing stale results. |
| 15 rm -rf "${OUTDIR}" | 16 rm -rf "${OUTDIR}" |
| 16 mkdir -p "${OUTDIR}" | 17 mkdir -p "${OUTDIR}" |
| 17 | 18 |
| 18 for optlevel in ${OPTLEVELS} ; do | 19 for sb in ${SANDBOX} ; do |
| 20 for optlevel in ${OPTLEVELS} ; do |
| 19 for attribute in ${ATTRIBUTES} ; do | 21 for attribute in ${ATTRIBUTES} ; do |
| 20 | 22 |
| 21 crosstest.py -O${optlevel} --mattr ${attribute} \ | 23 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 22 --prefix=Subzero_ \ | 24 --prefix=Subzero_ \ |
| 23 --target=x8632 \ | 25 --target=x8632 \ |
| 24 --dir="${OUTDIR}" \ | 26 --sandbox=${sb} \ |
| 25 --test=simple_loop.c \ | 27 --dir="${OUTDIR}" \ |
| 26 --driver=simple_loop_main.c \ | 28 --test=simple_loop.c \ |
| 27 --output=simple_loop_O${optlevel}_${attribute} | 29 --driver=simple_loop_main.c \ |
| 30 --output=simple_loop_sb${sb}_O${optlevel}_${attribute} |
| 28 | 31 |
| 29 crosstest.py -O${optlevel} --mattr ${attribute} \ | 32 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 30 --prefix=Subzero_ \ | 33 --prefix=Subzero_ \ |
| 31 --target=x8632 \ | 34 --target=x8632 \ |
| 32 --dir="${OUTDIR}" \ | 35 --sandbox=${sb} \ |
| 33 --test=mem_intrin.cpp \ | 36 --dir="${OUTDIR}" \ |
| 34 --driver=mem_intrin_main.cpp \ | 37 --test=mem_intrin.cpp \ |
| 35 --output=mem_intrin_O${optlevel}_${attribute} | 38 --driver=mem_intrin_main.cpp \ |
| 39 --output=mem_intrin_sb${sb}_O${optlevel}_${attribute} |
| 36 | 40 |
| 37 crosstest.py -O${optlevel} --mattr ${attribute} \ | 41 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 38 --prefix=Subzero_ \ | 42 --prefix=Subzero_ \ |
| 39 --target=x8632 \ | 43 --target=x8632 \ |
| 40 --dir="${OUTDIR}" \ | 44 --sandbox=${sb} \ |
| 41 --test=test_arith.cpp \ | 45 --dir="${OUTDIR}" \ |
| 42 --test=test_arith_frem.ll \ | 46 --test=test_arith.cpp \ |
| 43 --test=test_arith_sqrt.ll \ | 47 --test=test_arith_frem.ll \ |
| 44 --driver=test_arith_main.cpp \ | 48 --test=test_arith_sqrt.ll \ |
| 45 --output=test_arith_O${optlevel}_${attribute} | 49 --driver=test_arith_main.cpp \ |
| 50 --output=test_arith_sb${sb}_O${optlevel}_${attribute} |
| 46 | 51 |
| 47 crosstest.py -O${optlevel} --mattr ${attribute} \ | 52 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 48 --prefix=Subzero_ \ | 53 --prefix=Subzero_ \ |
| 49 --target=x8632 \ | 54 --target=x8632 \ |
| 50 --dir="${OUTDIR}" \ | 55 --sandbox=${sb} \ |
| 51 --test=test_bitmanip.cpp --test=test_bitmanip_intrin.ll \ | 56 --dir="${OUTDIR}" \ |
| 52 --driver=test_bitmanip_main.cpp \ | 57 --test=test_bitmanip.cpp --test=test_bitmanip_intrin.ll \ |
| 53 --output=test_bitmanip_O${optlevel}_${attribute} | 58 --driver=test_bitmanip_main.cpp \ |
| 59 --output=test_bitmanip_sb${sb}_O${optlevel}_${attribute} |
| 54 | 60 |
| 55 crosstest.py -O${optlevel} --mattr ${attribute} \ | 61 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 56 --prefix=Subzero_ --target=x8632 \ | 62 --prefix=Subzero_ --target=x8632 \ |
| 57 --dir="${OUTDIR}" \ | 63 --sandbox=${sb} \ |
| 58 --test=test_calling_conv.cpp \ | 64 --dir="${OUTDIR}" \ |
| 59 --driver=test_calling_conv_main.cpp \ | 65 --test=test_calling_conv.cpp \ |
| 60 --output=test_calling_conv_O${optlevel}_${attribute} | 66 --driver=test_calling_conv_main.cpp \ |
| 67 --output=test_calling_conv_sb${sb}_O${optlevel}_${attribute} |
| 61 | 68 |
| 62 crosstest.py -O${optlevel} --mattr ${attribute} \ | 69 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 63 --prefix=Subzero_ \ | 70 --prefix=Subzero_ \ |
| 64 --target=x8632 \ | 71 --target=x8632 \ |
| 65 --dir="${OUTDIR}" \ | 72 --sandbox=${sb} \ |
| 66 --test=test_cast.cpp --test=test_cast_to_u1.ll \ | 73 --dir="${OUTDIR}" \ |
| 67 --test=test_cast_vectors.ll \ | 74 --test=test_cast.cpp --test=test_cast_to_u1.ll \ |
| 68 --driver=test_cast_main.cpp \ | 75 --test=test_cast_vectors.ll \ |
| 69 --output=test_cast_O${optlevel}_${attribute} | 76 --driver=test_cast_main.cpp \ |
| 77 --output=test_cast_sb${sb}_O${optlevel}_${attribute} |
| 70 | 78 |
| 71 crosstest.py -O${optlevel} --mattr ${attribute} \ | 79 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 72 --prefix=Subzero_ \ | 80 --prefix=Subzero_ \ |
| 73 --target=x8632 \ | 81 --target=x8632 \ |
| 74 --dir="${OUTDIR}" \ | 82 --sandbox=${sb} \ |
| 75 --test=test_fcmp.pnacl.ll \ | 83 --dir="${OUTDIR}" \ |
| 76 --driver=test_fcmp_main.cpp \ | 84 --test=test_fcmp.pnacl.ll \ |
| 77 --output=test_fcmp_O${optlevel}_${attribute} | 85 --driver=test_fcmp_main.cpp \ |
| 86 --output=test_fcmp_sb${sb}_O${optlevel}_${attribute} |
| 78 | 87 |
| 79 crosstest.py -O${optlevel} --mattr ${attribute} \ | 88 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 80 --prefix=Subzero_ \ | 89 --prefix=Subzero_ \ |
| 81 --target=x8632 \ | 90 --target=x8632 \ |
| 82 --dir="${OUTDIR}" \ | 91 --sandbox=${sb} \ |
| 83 --test=test_global.cpp \ | 92 --dir="${OUTDIR}" \ |
| 84 --driver=test_global_main.cpp \ | 93 --test=test_global.cpp \ |
| 85 --output=test_global_O${optlevel}_${attribute} | 94 --driver=test_global_main.cpp \ |
| 95 --output=test_global_sb${sb}_O${optlevel}_${attribute} |
| 86 | 96 |
| 87 crosstest.py -O${optlevel} --mattr ${attribute} \ | 97 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 88 --prefix=Subzero_ \ | 98 --prefix=Subzero_ \ |
| 89 --target=x8632 \ | 99 --target=x8632 \ |
| 90 --dir="${OUTDIR}" \ | 100 --sandbox=${sb} \ |
| 91 --test=test_icmp.cpp --test=test_icmp_i1vec.ll \ | 101 --dir="${OUTDIR}" \ |
| 92 --driver=test_icmp_main.cpp \ | 102 --test=test_icmp.cpp --test=test_icmp_i1vec.ll \ |
| 93 --output=test_icmp_O${optlevel}_${attribute} | 103 --driver=test_icmp_main.cpp \ |
| 104 --output=test_icmp_sb${sb}_O${optlevel}_${attribute} |
| 94 | 105 |
| 95 crosstest.py -O${optlevel} --mattr ${attribute} \ | 106 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 96 --prefix=Subzero_ \ | 107 --prefix=Subzero_ \ |
| 97 --target=x8632 \ | 108 --target=x8632 \ |
| 98 --dir="${OUTDIR}" \ | 109 --sandbox=${sb} \ |
| 99 --test=test_select.ll \ | 110 --dir="${OUTDIR}" \ |
| 100 --driver=test_select_main.cpp \ | 111 --test=test_select.ll \ |
| 101 --output=test_select_O${optlevel}_${attribute} | 112 --driver=test_select_main.cpp \ |
| 113 --output=test_select_sb${sb}_O${optlevel}_${attribute} |
| 102 | 114 |
| 103 crosstest.py -O${optlevel} --mattr ${attribute} \ | 115 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 104 --prefix=Subzero_ \ | 116 --prefix=Subzero_ \ |
| 105 --target=x8632 \ | 117 --target=x8632 \ |
| 106 --dir="${OUTDIR}" \ | 118 --sandbox=${sb} \ |
| 107 --test=test_stacksave.c \ | 119 --dir="${OUTDIR}" \ |
| 108 --driver=test_stacksave_main.c \ | 120 --test=test_stacksave.c \ |
| 109 --output=test_stacksave_O${optlevel}_${attribute} | 121 --driver=test_stacksave_main.c \ |
| 122 --output=test_stacksave_sb${sb}_O${optlevel}_${attribute} |
| 110 | 123 |
| 111 # Compile the non-subzero object files straight from source | 124 # Compile the non-subzero object files straight from source |
| 112 # since the native LLVM backend does not understand how to | 125 # since the native LLVM backend does not understand how to |
| 113 # lower NaCl-specific intrinsics. | 126 # lower NaCl-specific intrinsics. |
| 114 crosstest.py -O${optlevel} --mattr ${attribute} \ | 127 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 115 --prefix=Subzero_ \ | 128 --prefix=Subzero_ \ |
| 116 --target=x8632 \ | 129 --target=x8632 \ |
| 117 --dir="${OUTDIR}" \ | 130 --sandbox=${sb} \ |
| 118 --test=test_sync_atomic.cpp \ | 131 --dir="${OUTDIR}" \ |
| 119 --crosstest-bitcode=0 \ | 132 --test=test_sync_atomic.cpp \ |
| 120 --driver=test_sync_atomic_main.cpp \ | 133 --crosstest-bitcode=0 \ |
| 121 --output=test_sync_atomic_O${optlevel}_${attribute} | 134 --driver=test_sync_atomic_main.cpp \ |
| 135 --output=test_sync_atomic_sb${sb}_O${optlevel}_${attribute} |
| 122 | 136 |
| 123 crosstest.py -O${optlevel} --mattr ${attribute} \ | 137 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 124 --prefix=Subzero_ --target=x8632 \ | 138 --prefix=Subzero_ \ |
| 125 --dir="${OUTDIR}" \ | 139 --target=x8632 \ |
| 126 --test=test_vector_ops.ll \ | 140 --sandbox=${sb} \ |
| 127 --driver=test_vector_ops_main.cpp \ | 141 --dir="${OUTDIR}" \ |
| 128 --output=test_vector_ops_O${optlevel}_${attribute} | 142 --test=test_vector_ops.ll \ |
| 143 --driver=test_vector_ops_main.cpp \ |
| 144 --output=test_vector_ops_sb${sb}_O${optlevel}_${attribute} |
| 129 | 145 |
| 130 done | 146 done |
| 147 done |
| 131 done | 148 done |
| 132 | 149 |
| 133 for optlevel in ${OPTLEVELS} ; do | 150 for sb in ${SANDBOX} ; do |
| 151 if [ $sb = 0 ] ; then |
| 152 PREFIX= |
| 153 else |
| 154 PREFIX="../../../../run.py -q" |
| 155 fi |
| 156 for optlevel in ${OPTLEVELS} ; do |
| 134 for attribute in ${ATTRIBUTES}; do | 157 for attribute in ${ATTRIBUTES}; do |
| 135 "${OUTDIR}"/simple_loop_O${optlevel}_${attribute} | 158 ${PREFIX} "${OUTDIR}"/simple_loop_sb${sb}_O${optlevel}_${attribute} |
| 136 "${OUTDIR}"/mem_intrin_O${optlevel}_${attribute} | 159 ${PREFIX} "${OUTDIR}"/mem_intrin_sb${sb}_O${optlevel}_${attribute} |
| 137 "${OUTDIR}"/test_arith_O${optlevel}_${attribute} | 160 ${PREFIX} "${OUTDIR}"/test_arith_sb${sb}_O${optlevel}_${attribute} |
| 138 "${OUTDIR}"/test_bitmanip_O${optlevel}_${attribute} | 161 ${PREFIX} "${OUTDIR}"/test_bitmanip_sb${sb}_O${optlevel}_${attribute} |
| 139 "${OUTDIR}"/test_calling_conv_O${optlevel}_${attribute} | 162 ${PREFIX} "${OUTDIR}"/test_calling_conv_sb${sb}_O${optlevel}_${attribute} |
| 140 "${OUTDIR}"/test_cast_O${optlevel}_${attribute} | 163 ${PREFIX} "${OUTDIR}"/test_cast_sb${sb}_O${optlevel}_${attribute} |
| 141 "${OUTDIR}"/test_fcmp_O${optlevel}_${attribute} | 164 ${PREFIX} "${OUTDIR}"/test_fcmp_sb${sb}_O${optlevel}_${attribute} |
| 142 "${OUTDIR}"/test_global_O${optlevel}_${attribute} | 165 ${PREFIX} "${OUTDIR}"/test_global_sb${sb}_O${optlevel}_${attribute} |
| 143 "${OUTDIR}"/test_icmp_O${optlevel}_${attribute} | 166 ${PREFIX} "${OUTDIR}"/test_icmp_sb${sb}_O${optlevel}_${attribute} |
| 144 "${OUTDIR}"/test_select_O${optlevel}_${attribute} | 167 ${PREFIX} "${OUTDIR}"/test_select_sb${sb}_O${optlevel}_${attribute} |
| 145 "${OUTDIR}"/test_stacksave_O${optlevel}_${attribute} | 168 ${PREFIX} "${OUTDIR}"/test_stacksave_sb${sb}_O${optlevel}_${attribute} |
| 146 "${OUTDIR}"/test_sync_atomic_O${optlevel}_${attribute} | 169 ${PREFIX} "${OUTDIR}"/test_sync_atomic_sb${sb}_O${optlevel}_${attribute} |
| 147 "${OUTDIR}"/test_vector_ops_O${optlevel}_${attribute} | 170 ${PREFIX} "${OUTDIR}"/test_vector_ops_sb${sb}_O${optlevel}_${attribute} |
| 148 done | 171 done |
| 172 done |
| 149 done | 173 done |
| OLD | NEW |