Commit c2ec3bb4 authored by Guido van Rossum's avatar Guido van Rossum

main(): automatically add "-m" option to the driver command line when

the test input filename contains the substring "metal".
parent 9ff83db7
...@@ -140,6 +140,9 @@ def main(): ...@@ -140,6 +140,9 @@ def main():
sys.exit(1) sys.exit(1)
errors = 0 errors = 0
for arg in args: for arg in args:
locopts = []
if string.find(arg, "metal") >= 0 and "-m" not in opts:
locopts.append("-m")
if not unittesting: if not unittesting:
print arg, print arg,
sys.stdout.flush() sys.stdout.flush()
...@@ -147,7 +150,7 @@ def main(): ...@@ -147,7 +150,7 @@ def main():
try: try:
try: try:
sys.stdout = stdout = StringIO() sys.stdout = stdout = StringIO()
sys.argv = [""] + opts + [arg] sys.argv = [""] + opts + locopts + [arg]
driver.main() driver.main()
finally: finally:
sys.stdout, sys.argv = save sys.stdout, sys.argv = save
......
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