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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pydir/szbuild.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pydir/szbuild_spec2k.py
diff --git a/pydir/szbuild_spec2k.py b/pydir/szbuild_spec2k.py
new file mode 100755
index 0000000000000000000000000000000000000000..fb4321ff4ee275820e436adef090c46511c328f8
--- /dev/null
+++ b/pydir/szbuild_spec2k.py
@@ -0,0 +1,46 @@
+#!/usr/bin/env python2
+
+import argparse
+import os
+import sys
+
+import szbuild
+
+from utils import FindBaseNaCl
+
+def main():
+ """Build native gcc-style executables for one or all Spec2K components.
+
+ Afterwards, the executables can be run from the
+ native_client/tests/spec2k/ directory as:
+ './run_all.sh RunBenchmarks SetupGccX8632Opt {train|ref} ...'
+ """
+ nacl_root = FindBaseNaCl()
+ components = [ '164.gzip', '175.vpr', '176.gcc', '177.mesa', '179.art',
+ '181.mcf', '183.equake', '186.crafty', '188.ammp',
+ '197.parser', '252.eon', '253.perlbmk', '254.gap',
+ '255.vortex', '256.bzip2', '300.twolf' ]
+
+ argparser = argparse.ArgumentParser(description=main.__doc__)
+ szbuild.AddOptionalArgs(argparser)
+ argparser.add_argument('comps', nargs='*', default=components)
+ args = argparser.parse_args()
+ bad = set(args.comps) - set(components)
+ if bad:
+ print 'Unknown component{s}: '.format(s='s' if len(bad) > 1 else '') + \
+ ' '.join(x for x in bad)
+ sys.exit(1)
+ for comp in args.comps:
+ name = os.path.splitext(comp)[1] or comp
+ if name[0] == '.':
+ name = name[1:]
+ szbuild.ProcessPexe(args,
+ ('{root}/tests/spec2k/{comp}/' +
+ '{name}.opt.stripped.pexe'
+ ).format(root=nacl_root, comp=comp, name=name),
+ ('{root}/tests/spec2k/{comp}/' +
+ '{name}.gcc.opt.x8632'
+ ).format(root=nacl_root, comp=comp, name=name))
+
+if __name__ == '__main__':
+ main()
« 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