Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
IPDSnelting
spec.py
Commits
dfc0f6e5
Commit
dfc0f6e5
authored
Mar 21, 2011
by
Andreas Zwinkau
Browse files
Allow to specify certain programs
parent
bc531e67
Changes
1
Hide whitespace changes
Inline
Side-by-side
spec.py
View file @
dfc0f6e5
...
...
@@ -36,7 +36,7 @@ def identify_suite():
exit
(
-
1
)
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
,
help
=
"Just generate config file, but do not build or run"
)
parser
.
add_option
(
"--build-only"
,
action
=
"store_true"
,
default
=
False
,
...
...
@@ -344,8 +344,16 @@ BENCHMARK_LANGUAGES = [
(
"SPEC CPU2006"
,
"482.sphinx3"
,
"c"
),
]
def
filter_progs
(
options
):
for
suite
,
prog
,
langs
in
BENCHMARK_LANGUAGES
:
def
filter_progs
(
options
,
args
):
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
:
continue
if
options
.
no_cpp
and
"cpp"
in
langs
:
...
...
@@ -419,7 +427,7 @@ if __name__ == "__main__":
fh
.
close
()
if
options
.
config_only
:
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
os
.
system
(
cmd
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment