[lit] Update lit's own tests to use lit_config and lit package, as appropriate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188107 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2013-08-09 21:39:17 +00:00
parent 1e07de3529
commit 4981a6ca97
11 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,4 @@
import lit.formats
config.name = 'top-level-suite'
config.suffixes = ['.txt']
config.test_format = lit.formats.ShTest()

View File

@ -1,3 +1,4 @@
import lit.formats
config.name = 'sub-suite'
config.suffixes = ['.txt']
config.test_format = lit.formats.ShTest()

View File

@ -1,6 +1,8 @@
import lit.formats
# Verify that the site configuration was loaded.
if config.test_source_root is None or config.test_exec_root is None:
lit.fatal("No site specific configuration")
lit_config.fatal("No site specific configuration")
config.name = 'exec-discovery-in-tree-suite'
config.suffixes = ['.txt']

View File

@ -1,4 +1,4 @@
import os
config.test_exec_root = os.path.dirname(__file__)
config.test_source_root = os.path.dirname(config.test_exec_root)
lit.load_config(config, os.path.join(config.test_source_root, "lit.cfg"))
lit_config.load_config(config, os.path.join(config.test_source_root, "lit.cfg"))

View File

@ -2,4 +2,4 @@
import os
config.test_exec_root = os.path.dirname(__file__)
config.test_source_root = os.path.join(os.path.dirname(config.test_exec_root), "discovery")
lit.load_config(config, os.path.join(config.test_source_root, "lit.cfg"))
lit_config.load_config(config, os.path.join(config.test_source_root, "lit.cfg"))

View File

@ -1,3 +1,4 @@
import lit.formats
config.name = 'shtest-shell'
config.suffixes = ['.txt']
config.test_format = lit.formats.ShTest()

View File

@ -1 +1,2 @@
import lit.formats
config.test_format = lit.formats.ShTest(execute_external=True)

View File

@ -1,3 +1,4 @@
import lit.formats
config.name = 'shtest-format'
config.suffixes = ['.txt']
config.test_format = lit.formats.ShTest()

View File

@ -1,3 +1,4 @@
import lit.formats
config.name = 'shtest-shell'
config.suffixes = ['.txt']
config.test_format = lit.formats.ShTest()

View File

@ -1,3 +1,4 @@
import lit.formats
config.name = 'unittest-adaptor'
config.suffixes = ['.txt']
config.test_format = lit.formats.ShTest()

View File

@ -2,6 +2,8 @@
import os
import lit.formats
# Configuration file for the 'lit' test runner.
# name: The name of this test suite.
@ -31,6 +33,6 @@ config.substitutions.append(('%{lit}', os.path.join(src_root, 'lit.py')))
# Enable coverage.py reporting, assuming the coverage module has been installed
# and sitecustomize.py in the virtualenv has been modified appropriately.
if lit.params.get('check-coverage', None):
if lit_config.params.get('check-coverage', None):
config.environment['COVERAGE_PROCESS_START'] = os.path.join(
os.path.dirname(__file__), ".coveragerc")