OLD | NEW |
1 #!/usr/bin/env python2 | 1 #!/usr/bin/env python2 |
2 | 2 |
3 #===- subzero/wasm-run-torture-tests.py - Subzero WASM Torture Test Driver ===// | 3 #===- subzero/wasm-run-torture-tests.py - Subzero WASM Torture Test Driver ===// |
4 # | 4 # |
5 # The Subzero Code Generator | 5 # The Subzero Code Generator |
6 # | 6 # |
7 # This file is distributed under the University of Illinois Open Source | 7 # This file is distributed under the University of Illinois Open Source |
8 # License. See LICENSE.TXT for details. | 8 # License. See LICENSE.TXT for details. |
9 # | 9 # |
10 #===-----------------------------------------------------------------------===// | 10 #===-----------------------------------------------------------------------===// |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 status = os.system(cmd); | 156 status = os.system(cmd); |
157 if status != 0: | 157 if status != 0: |
158 print('\033[1;31m[compile fail]\033[1;m', file=out) | 158 print('\033[1;31m[compile fail]\033[1;m', file=out) |
159 with results_lock: | 159 with results_lock: |
160 compile_failures.append(test_file) | 160 compile_failures.append(test_file) |
161 else: | 161 else: |
162 compile_count += 1 | 162 compile_count += 1 |
163 | 163 |
164 # Try to link and run the program. | 164 # Try to link and run the program. |
165 cmd = "clang -g -m32 {} -o {} " + \ | 165 cmd = "clang -g -m32 {} -o {} " + \ |
166 "./runtime/szrt.c ./runtime/wasm-runtime.cpp -lm" | 166 "./runtime/szrt.c ./runtime/wasm-runtime.cpp -lm -lstdc++" |
167 cmd = cmd.format(obj_file, exe_file) | 167 cmd = cmd.format(obj_file, exe_file) |
168 | 168 |
169 if not run_test or os.system(cmd) == 0: | 169 if not run_test or os.system(cmd) == 0: |
170 if not run_test or os.system(exe_file) == 0: | 170 if not run_test or os.system(exe_file) == 0: |
171 with results_lock: | 171 with results_lock: |
172 run_count += 1 | 172 run_count += 1 |
173 print('\033[1;32m[ok]\033[1;m', file=out) | 173 print('\033[1;32m[ok]\033[1;m', file=out) |
174 else: | 174 else: |
175 with results_lock: | 175 with results_lock: |
176 run_failures.append(test_file) | 176 run_failures.append(test_file) |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 if len(run_failures) > 0: | 220 if len(run_failures) > 0: |
221 print() | 221 print() |
222 print("Run failures:") | 222 print("Run failures:") |
223 print("=============\n") | 223 print("=============\n") |
224 for f in run_failures: | 224 for f in run_failures: |
225 print(" \033[1;33m" + f + "\033[1;m") | 225 print(" \033[1;33m" + f + "\033[1;m") |
226 | 226 |
227 print("\n\033[1;32m{}\033[1;m / \033[1;33m{}\033[1;m / {} tests passed" | 227 print("\n\033[1;32m{}\033[1;m / \033[1;33m{}\033[1;m / {} tests passed" |
228 .format(run_count, compile_count - run_count, | 228 .format(run_count, compile_count - run_count, |
229 run_count + len(compile_failures) + len(run_failures))) | 229 run_count + len(compile_failures) + len(run_failures))) |
OLD | NEW |