Commit dfc0f6e5 authored by Andreas Zwinkau's avatar Andreas Zwinkau
Browse files

Allow to specify certain programs

parent bc531e67
...@@ -36,7 +36,7 @@ def identify_suite(): ...@@ -36,7 +36,7 @@ def identify_suite():
exit(-1) exit(-1)
SPEC_SUITE = identify_suite() SPEC_SUITE = identify_suite()
parser = optparse.OptionParser(version=SCRIPT_VERSION) parser = optparse.OptionParser(version=SCRIPT_VERSION, usage="Usage: %prog [options] [programs]")
parser.add_option("--config-only", action="store_true", default=False, parser.add_option("--config-only", action="store_true", default=False,
help="Just generate config file, but do not build or run") help="Just generate config file, but do not build or run")
parser.add_option("--build-only", action="store_true", default=False, parser.add_option("--build-only", action="store_true", default=False,
...@@ -344,8 +344,16 @@ BENCHMARK_LANGUAGES = [ ...@@ -344,8 +344,16 @@ BENCHMARK_LANGUAGES = [
("SPEC CPU2006", "482.sphinx3", "c"), ("SPEC CPU2006", "482.sphinx3", "c"),
] ]
def filter_progs(options): def filter_progs(options,args):
for suite, prog, langs in BENCHMARK_LANGUAGES: if args:
programs = list()
for progt in BENCHMARK_LANGUAGES:
suite, prog, langs = progt
if prog in args:
programs.append(progt)
else:
programs = BENCHMARK_LANGUAGES
for suite, prog, langs in programs:
if suite != SPEC_SUITE: if suite != SPEC_SUITE:
continue continue
if options.no_cpp and "cpp" in langs: if options.no_cpp and "cpp" in langs:
...@@ -419,7 +427,7 @@ if __name__ == "__main__": ...@@ -419,7 +427,7 @@ if __name__ == "__main__":
fh.close() fh.close()
if options.config_only: if options.config_only:
exit(0) exit(0)
progs = " ".join(filter_progs(options)) progs = " ".join(filter_progs(options,args))
cmd = "env bash -l -c 'source shrc && runspec %s -c generated'" % progs cmd = "env bash -l -c 'source shrc && runspec %s -c generated'" % progs
os.system(cmd) os.system(cmd)
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