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

Unified Diff: pydir/szbuild_spec2k.py

Issue 1472833006: Subzero: Add "szbuild_spec2k.py --run" option. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | 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
index 7acf789d0c5d1b1e0e1d3f2a41f7e9cc91490614..de92f1e10c04707e0f452592e75757d56f9746ea 100755
--- a/pydir/szbuild_spec2k.py
+++ b/pydir/szbuild_spec2k.py
@@ -6,7 +6,7 @@ import sys
import szbuild
-from utils import FindBaseNaCl
+from utils import FindBaseNaCl, shellcmd
def main():
"""Build native gcc-style executables for one or all Spec2K components.
@@ -26,6 +26,8 @@ def main():
argparser = argparse.ArgumentParser(description=main.__doc__)
szbuild.AddOptionalArgs(argparser)
+ argparser.add_argument('--run', dest='run', action='store_true',
+ help='Run after building')
argparser.add_argument('comps', nargs='*', default=components)
args = argparser.parse_args()
bad = set(args.comps) - set(components)
@@ -57,6 +59,15 @@ def main():
'{name}.{suffix}'
).format(root=nacl_root, comp=comp, name=name,
suffix=suffix))
+ if args.run:
+ os.chdir('{root}/tests/spec2k'.format(root=FindBaseNaCl()))
+ setup = 'SetupGcc' + {
+ 'arm32': 'Arm',
+ 'x8632': 'X8632'}[args.target] + 'Opt'
+ shellcmd(['./run_all.sh',
+ 'RunTimedBenchmarks',
+ setup,
+ 'train'] + args.comps)
if __name__ == '__main__':
main()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698