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