[llvm-commits] [zorg] r151022 - /zorg/trunk/lnt/lnt/tests/compile.py
Daniel Dunbar
daniel at zuster.org
Mon Feb 20 18:53:51 PST 2012
Author: ddunbar
Date: Mon Feb 20 20:53:51 2012
New Revision: 151022
URL: http://llvm.org/viewvc/llvm-project?rev=151022&view=rev
Log:
[lnt] lnt.tests.compile: Add a --flags-to-test option to replace the default list of flags to test (mostly useful for dropping the testing time).
Modified:
zorg/trunk/lnt/lnt/tests/compile.py
Modified: zorg/trunk/lnt/lnt/tests/compile.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/tests/compile.py?rev=151022&r1=151021&r2=151022&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/tests/compile.py (original)
+++ zorg/trunk/lnt/lnt/tests/compile.py Mon Feb 20 20:53:51 2012
@@ -220,11 +220,10 @@
g_output_dir = None
-def get_single_file_tests():
+def get_single_file_tests(flags_to_test):
all_inputs = [('Sketch/Sketch+Accessibility/SKTGraphicView.m', True, ()),
('403.gcc/combine.c', False, ('-DSPEC_CPU_MACOSX',))]
- flags_to_test = [('-O0',), ('-O0','-g',), ('-Os',)]
stages_to_test = ['driver', 'init', 'syntax', 'irgen_only', 'irgen',
'codegen', 'assembly']
for f in flags_to_test:
@@ -247,8 +246,8 @@
pch_input=pch_input, flags=f, stage=stage,
extra_flags=extra_flags)))
-def get_tests():
- for item in get_single_file_tests():
+def get_tests(flags_to_test):
+ for item in get_single_file_tests(flags_to_test):
yield item
###
@@ -351,6 +350,9 @@
group.add_option("", "--test", dest="tests", metavar="NAME",
help="Individual test to run",
action="append", default=[])
+ group.add_option("", "--flags-to-test", dest="flags_to_test",
+ help="Add a set of flags to test (space separated)",
+ metavar="FLAGLIST", action="append", default=[])
parser.add_option_group(group)
group = OptionGroup(parser, "Output Options")
@@ -447,8 +449,15 @@
msg = '\n\t'.join(['using run info:'] + format.splitlines())
note(msg)
+ # Compute the set of flags to test.
+ if not opts.flags_to_test:
+ flags_to_test = [('-O0',), ('-O0','-g',), ('-Os',)]
+ else:
+ flags_to_test = [string.split(' ')
+ for string in opts.flags_to_test]
+
# Compute the list of all tests.
- all_tests = get_tests()
+ all_tests = get_tests(flags_to_test)
# Show the tests, if requested.
if opts.show_tests:
More information about the llvm-commits
mailing list