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

Side by Side Diff: pydir/szbuild_spec2k.py

Issue 559723003: Subzero: Add a convenience script for Spec2K. Add the --stats argument. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Do an initial scan for unknown components Created 6 years, 3 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 | « pydir/szbuild.py ('k') | no next file » | 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 import argparse
4 import os
5 import sys
6
7 import szbuild
8
9 from utils import FindBaseNaCl
10
11 def main():
12 """Build native gcc-style executables for one or all Spec2K components.
13
14 Afterwards, the executables can be run from the
15 native_client/tests/spec2k/ directory as:
16 './run_all.sh RunBenchmarks SetupGccX8632Opt {train|ref} ...'
17 """
18 nacl_root = FindBaseNaCl()
19 components = [ '164.gzip', '175.vpr', '176.gcc', '177.mesa', '179.art',
20 '181.mcf', '183.equake', '186.crafty', '188.ammp',
21 '197.parser', '252.eon', '253.perlbmk', '254.gap',
22 '255.vortex', '256.bzip2', '300.twolf' ]
23
24 argparser = argparse.ArgumentParser(description=main.__doc__)
25 szbuild.AddOptionalArgs(argparser)
26 argparser.add_argument('comps', nargs='*', default=components)
27 args = argparser.parse_args()
28 bad = set(args.comps) - set(components)
29 if bad:
30 print 'Unknown component{s}: '.format(s='s' if len(bad) > 1 else '') + \
31 ' '.join(x for x in bad)
32 sys.exit(1)
33 for comp in args.comps:
34 name = os.path.splitext(comp)[1] or comp
35 if name[0] == '.':
36 name = name[1:]
37 szbuild.ProcessPexe(args,
38 ('{root}/tests/spec2k/{comp}/' +
39 '{name}.opt.stripped.pexe'
40 ).format(root=nacl_root, comp=comp, name=name),
41 ('{root}/tests/spec2k/{comp}/' +
42 '{name}.gcc.opt.x8632'
43 ).format(root=nacl_root, comp=comp, name=name))
44
45 if __name__ == '__main__':
46 main()
OLDNEW
« no previous file with comments | « pydir/szbuild.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698