[llvm-commits] [zorg] r150596 - /zorg/trunk/lnt/lnt/tests/compile.py
Daniel Dunbar
daniel at zuster.org
Wed Feb 15 10:01:21 PST 2012
Author: ddunbar
Date: Wed Feb 15 12:01:20 2012
New Revision: 150596
URL: http://llvm.org/viewvc/llvm-project?rev=150596&view=rev
Log:
[lnt] lnt.tests.compile: Test inputs are part of the LLVM test suite externals now.
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=150596&r1=150595&r2=150596&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/tests/compile.py (original)
+++ zorg/trunk/lnt/lnt/tests/compile.py Wed Feb 15 12:01:20 2012
@@ -54,8 +54,9 @@
return data
# Test functions.
-def get_input_path(*names):
- return os.path.join(g_input_dir, *names)
+def get_input_path(opts, *names):
+ return os.path.join(opts.test_suite_externals, "lnt-compile-suite-src",
+ *names)
def get_output_path(name):
return os.path.join(g_output_dir, name)
@@ -90,7 +91,7 @@
extra_flags, has_output=True, ignore_stderr=False,
can_memprof=True):
info = { 'flags' : repr(flags) }
- input = get_input_path(input)
+ input = get_input_path(opts, input)
output = get_output_path(output)
cmd = [variables.get('cc')]
@@ -194,7 +195,7 @@
assert pch_input.endswith('.gch')
extra_flags.extend(['-include', get_output_path(pch_input[:-4])])
- extra_flags.extend(['-I', os.path.dirname(get_input_path(input))])
+ extra_flags.extend(['-I', os.path.dirname(get_input_path(opts, input))])
return test_cc_command(name, run_info, variables, input, output, flags,
extra_flags, has_output, ignore_stderr, can_memprof)
@@ -203,8 +204,6 @@
def curry(fn, **kw_args):
return lambda *args: fn(*args, **kw_args)
-g_input_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)),
- 'Inputs')
g_output_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'Output')
all_inputs = [('Sketch/Sketch+Accessibility/SKTGraphicView.m', True, ()),
@@ -455,6 +454,9 @@
group.add_option("", "--cc", dest="cc", type='str',
help="Compiler under test",
action="store", default='/Developer/usr/bin/clang')
+ group.add_option("", "--test-externals", dest="test_suite_externals",
+ help="Path to the LLVM test-suite externals",
+ type=str, default=None, metavar="PATH")
group.add_option("", "--machine-param", dest="machine_parameters",
metavar="NAME=VAL",
help="Add 'NAME' = 'VAL' to the machine parameters",
@@ -496,6 +498,10 @@
if len(args) != 0:
parser.error("invalid number of arguments")
+ # Validate options.
+ if opts.test_suite_externals is None:
+ parser.error("--test-externals option is required")
+
# Collect machine and run information.
#
# FIXME: Include information on test source versions.
More information about the llvm-commits
mailing list