Commit 83f957a1 by Jim Stichnoth

Subzero: Add "szbuild_spec2k.py --run" option.

This makes it easier to do bisection debugging. Note that this could be used to simplify "make -f Makefile.standalone check-spec", but I chose not to do that because shellcmd() buffers all of the stdout until completion, which is not a great user experience (at least for this user). BUG= none R=sehr@chromium.org Review URL: https://codereview.chromium.org/1472833006 .
parent 98cc08ca
......@@ -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()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment