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

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

Issue 1837663002: Initial Subzero WASM prototype. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review feedback and merging 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 | « README-wasm.md ('k') | src/IceBuildDefs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python2
2
3 #===- subzero/wasm-run-torture-tests.py - Subzero WASM Torture Test Driver ===//
4 #
5 # The Subzero Code Generator
6 #
7 # This file is distributed under the University of Illinois Open Source
8 # License. See LICENSE.TXT for details.
9 #
10 #===-----------------------------------------------------------------------===//
11
12 import glob
13 import os
14 import sys
15
16 success_count = 0
17 fail_count = 0
18 failures = []
19
20 def run_test(test_file, verbose=False):
21 global success_count
22 global fail_count
23
24 cmd = """LD_LIBRARY_PATH=../../../../v8/out/native/lib.target ./pnacl-sz \
25 -filetype=asm -target=arm32 {} -threads=0 -O2 \
26 -verbose=wasm""".format(test_file)
27
28 if not verbose:
29 cmd += " &> /dev/null"
30
31 sys.stdout.write(test_file + "...");
32 status = os.system(cmd);
33 if status != 0:
34 fail_count += 1
35 print('\033[1;31m[fail]\033[1;m')
36 failures.append(test_file)
37 else:
38 success_count += 1
39 print('\033[1;32m[ok]\033[1;m')
40
41
42 verbose = False
43
44 if len(sys.argv) > 1:
45 test_files = sys.argv[1:]
46 verbose = True
47 else:
48 test_files = glob.glob("./torture-s2wasm-sexpr-wasm.old/*.wasm")
49
50 for test_file in test_files:
51 run_test(test_file, verbose)
52
53 if len(failures) > 0:
54 print("Failures:")
55 for f in failures:
56 print(" \033[1;31m" + f + "\033[1;m")
57 print("{} / {} tests passed".format(success_count, success_count + fail_count))
OLDNEW
« no previous file with comments | « README-wasm.md ('k') | src/IceBuildDefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698