Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: pydir/wasm-run-torture-tests.py

Issue 1876413002: Subzero. WASM. Additional progress. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review feedback and merging with master Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fetch-torture-tests.sh ('k') | runtime/wasm-runtime.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #===-----------------------------------------------------------------------===//
11 11
12 import glob 12 import glob
13 import os 13 import os
14 import sys 14 import sys
15 15
16 success_count = 0 16 success_count = 0
17 fail_count = 0 17 fail_count = 0
18 failures = [] 18 failures = []
19 19
20 def run_test(test_file, verbose=False): 20 def run_test(test_file, verbose=False):
21 global success_count 21 global success_count
22 global fail_count 22 global fail_count
23 23
24 cmd = """LD_LIBRARY_PATH=../../../../v8/out/native/lib.target ./pnacl-sz \ 24 cmd = """LD_LIBRARY_PATH=../../../../v8/out/native/lib.target ./pnacl-sz \
25 -filetype=asm -target=arm32 {} -threads=0 -O2 \ 25 -filetype=asm -target=x8632 {} -threads=0 -O2 \
26 -verbose=wasm""".format(test_file) 26 -verbose=wasm""".format(test_file)
27 27
28 if not verbose: 28 if not verbose:
29 cmd += " &> /dev/null" 29 cmd += " &> /dev/null"
30 30
31 sys.stdout.write(test_file + "..."); 31 sys.stdout.write(test_file + " ...");
32 status = os.system(cmd); 32 status = os.system(cmd);
33 if status != 0: 33 if status != 0:
34 fail_count += 1 34 fail_count += 1
35 print('\033[1;31m[fail]\033[1;m') 35 print('\033[1;31m[fail]\033[1;m')
36 failures.append(test_file) 36 failures.append(test_file)
37 else: 37 else:
38 success_count += 1 38 success_count += 1
39 print('\033[1;32m[ok]\033[1;m') 39 print('\033[1;32m[ok]\033[1;m')
40 40
41 41
42 verbose = False 42 verbose = False
43 43
44 if len(sys.argv) > 1: 44 if len(sys.argv) > 1:
45 test_files = sys.argv[1:] 45 test_files = sys.argv[1:]
46 verbose = True 46 verbose = True
47 else: 47 else:
48 test_files = glob.glob("./torture-s2wasm-sexpr-wasm.old/*.wasm") 48 test_files = glob.glob("./torture-s2wasm-sexpr-wasm/*.wasm")
49 49
50 for test_file in test_files: 50 for test_file in test_files:
51 run_test(test_file, verbose) 51 run_test(test_file, verbose)
52 52
53 if len(failures) > 0: 53 if len(failures) > 0:
54 print("Failures:") 54 print("Failures:")
55 for f in failures: 55 for f in failures:
56 print(" \033[1;31m" + f + "\033[1;m") 56 print(" \033[1;31m" + f + "\033[1;m")
57 print("{} / {} tests passed".format(success_count, success_count + fail_count)) 57 print("{} / {} tests passed".format(success_count, success_count + fail_count))
OLDNEW
« no previous file with comments | « fetch-torture-tests.sh ('k') | runtime/wasm-runtime.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698