diff options
author | Eli Bendersky <eli.bendersky@intel.com> | 2012-03-25 09:02:19 +0000 |
---|---|---|
committer | Eli Bendersky <eli.bendersky@intel.com> | 2012-03-25 09:02:19 +0000 |
commit | cc85160672e3b2d5ec363cc4e151e5b944a60454 (patch) | |
tree | ebf29a36f6da8574a843a41099843db92420a699 /test/lit.cfg | |
parent | d54f9a4c3bcdb247ea4aa311251c19242b03be63 (diff) |
Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnu
* Removed test/lib/llvm.exp - it is no longer needed
* Deleted the dg.exp reading code from test/lit.cfg. There are no dg.exp files
left in the test suite so this code is no longer required. test/lit.cfg is
now much shorter and clearer
* Removed a lot of duplicate code in lit.local.cfg files that need access to
the root configuration, by adding a "root" attribute to the TestingConfig
object. This attribute is dynamically computed to provide the same
information as was previously provided by the custom getRoot functions.
* Documented the config.root attribute in docs/CommandGuide/lit.pod
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lit.cfg')
-rw-r--r-- | test/lit.cfg | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/test/lit.cfg b/test/lit.cfg index acbe97aa6d..c58935956a 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -218,70 +218,6 @@ for pattern in [r"\bbugpoint\b(?!-)", r"(?<!/|-)\bclang\b(?!-)", break config.substitutions.append((pattern, substitution)) -excludes = [] - -# Provide llvm_supports_target for use in local configs. -targets = set(site_exp["TARGETS_TO_BUILD"].split()) -def llvm_supports_target(name): - return name in targets - -def llvm_supports_darwin_and_target(name): - return 'darwin' in config.target_triple and llvm_supports_target(name) - -bindings = set([s.strip() for s in site_exp['llvm_bindings'].split(',')]) -def llvm_supports_binding(name): - return name.strip() in bindings - -# Provide on_clone hook for reading 'dg.exp'. -import os -simpleLibData = re.compile(r"""load_lib llvm.exp - -RunLLVMTests \[lsort \[glob -nocomplain \$srcdir/\$subdir/\*\.(.*)\]\]""", - re.MULTILINE) -conditionalLibData = re.compile(r"""load_lib llvm.exp - -if.*\[ ?(llvm[^ ]*) ([^ ]*) ?\].*{ - *RunLLVMTests \[lsort \[glob -nocomplain \$srcdir/\$subdir/\*\.(.*)\]\] -\}""", re.MULTILINE) -def on_clone(parent, cfg, for_path): - def addSuffixes(match): - if match[0] == '{' and match[-1] == '}': - cfg.suffixes = ['.' + s for s in match[1:-1].split(',')] - else: - cfg.suffixes = ['.' + match] - - libPath = os.path.join(os.path.dirname(for_path), - 'dg.exp') - if not os.path.exists(libPath): - return - - # Reset unsupported, in case we inherited it. - cfg.unsupported = False - lib = open(libPath).read().strip() - - # Check for a simple library. - m = simpleLibData.match(lib) - if m: - addSuffixes(m.group(1)) - return - - # Check for a conditional test set. - m = conditionalLibData.match(lib) - if m: - funcname,arg,match = m.groups() - addSuffixes(match) - - func = globals().get(funcname) - if not func: - lit.error('unsupported predicate %r' % funcname) - elif not func(arg): - cfg.unsupported = True - return - # Otherwise, give up. - lit.error('unable to understand %r:\n%s' % (libPath, lib)) - -config.on_clone = on_clone - ### Features # Shell execution |