From 4981a6ca97aac2b5a491895cdfd87c44f98bd7a0 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 9 Aug 2013 21:39:17 +0000 Subject: [PATCH] [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 --- utils/lit/tests/Inputs/discovery/lit.cfg | 1 + utils/lit/tests/Inputs/discovery/subsuite/lit.cfg | 1 + utils/lit/tests/Inputs/exec-discovery-in-tree/lit.cfg | 4 +++- .../lit/tests/Inputs/exec-discovery-in-tree/obj/lit.site.cfg | 2 +- utils/lit/tests/Inputs/exec-discovery/lit.site.cfg | 2 +- utils/lit/tests/Inputs/progress-bar/lit.cfg | 1 + .../tests/Inputs/shtest-format/external_shell/lit.local.cfg | 1 + utils/lit/tests/Inputs/shtest-format/lit.cfg | 1 + utils/lit/tests/Inputs/shtest-shell/lit.cfg | 1 + utils/lit/tests/Inputs/unittest-adaptor/lit.cfg | 1 + utils/lit/tests/lit.cfg | 4 +++- 11 files changed, 15 insertions(+), 4 deletions(-) diff --git a/utils/lit/tests/Inputs/discovery/lit.cfg b/utils/lit/tests/Inputs/discovery/lit.cfg index 4049ab16f9c..1c5436be534 100644 --- a/utils/lit/tests/Inputs/discovery/lit.cfg +++ b/utils/lit/tests/Inputs/discovery/lit.cfg @@ -1,3 +1,4 @@ +import lit.formats config.name = 'top-level-suite' config.suffixes = ['.txt'] config.test_format = lit.formats.ShTest() diff --git a/utils/lit/tests/Inputs/discovery/subsuite/lit.cfg b/utils/lit/tests/Inputs/discovery/subsuite/lit.cfg index 0c2979d74ad..b49329abfde 100644 --- a/utils/lit/tests/Inputs/discovery/subsuite/lit.cfg +++ b/utils/lit/tests/Inputs/discovery/subsuite/lit.cfg @@ -1,3 +1,4 @@ +import lit.formats config.name = 'sub-suite' config.suffixes = ['.txt'] config.test_format = lit.formats.ShTest() diff --git a/utils/lit/tests/Inputs/exec-discovery-in-tree/lit.cfg b/utils/lit/tests/Inputs/exec-discovery-in-tree/lit.cfg index 342b2fdd3c8..ae25b4f4acb 100644 --- a/utils/lit/tests/Inputs/exec-discovery-in-tree/lit.cfg +++ b/utils/lit/tests/Inputs/exec-discovery-in-tree/lit.cfg @@ -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'] diff --git a/utils/lit/tests/Inputs/exec-discovery-in-tree/obj/lit.site.cfg b/utils/lit/tests/Inputs/exec-discovery-in-tree/obj/lit.site.cfg index de9a3d0c6df..4061c894072 100644 --- a/utils/lit/tests/Inputs/exec-discovery-in-tree/obj/lit.site.cfg +++ b/utils/lit/tests/Inputs/exec-discovery-in-tree/obj/lit.site.cfg @@ -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")) \ No newline at end of file +lit_config.load_config(config, os.path.join(config.test_source_root, "lit.cfg")) \ No newline at end of file diff --git a/utils/lit/tests/Inputs/exec-discovery/lit.site.cfg b/utils/lit/tests/Inputs/exec-discovery/lit.site.cfg index 796569a301b..ac273c797c5 100644 --- a/utils/lit/tests/Inputs/exec-discovery/lit.site.cfg +++ b/utils/lit/tests/Inputs/exec-discovery/lit.site.cfg @@ -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")) diff --git a/utils/lit/tests/Inputs/progress-bar/lit.cfg b/utils/lit/tests/Inputs/progress-bar/lit.cfg index 4878b656096..7f31129ad11 100644 --- a/utils/lit/tests/Inputs/progress-bar/lit.cfg +++ b/utils/lit/tests/Inputs/progress-bar/lit.cfg @@ -1,3 +1,4 @@ +import lit.formats config.name = 'shtest-shell' config.suffixes = ['.txt'] config.test_format = lit.formats.ShTest() diff --git a/utils/lit/tests/Inputs/shtest-format/external_shell/lit.local.cfg b/utils/lit/tests/Inputs/shtest-format/external_shell/lit.local.cfg index d14d1479772..5e87c729919 100644 --- a/utils/lit/tests/Inputs/shtest-format/external_shell/lit.local.cfg +++ b/utils/lit/tests/Inputs/shtest-format/external_shell/lit.local.cfg @@ -1 +1,2 @@ +import lit.formats config.test_format = lit.formats.ShTest(execute_external=True) diff --git a/utils/lit/tests/Inputs/shtest-format/lit.cfg b/utils/lit/tests/Inputs/shtest-format/lit.cfg index 78dd1bfb2e3..9b47985a3d8 100644 --- a/utils/lit/tests/Inputs/shtest-format/lit.cfg +++ b/utils/lit/tests/Inputs/shtest-format/lit.cfg @@ -1,3 +1,4 @@ +import lit.formats config.name = 'shtest-format' config.suffixes = ['.txt'] config.test_format = lit.formats.ShTest() diff --git a/utils/lit/tests/Inputs/shtest-shell/lit.cfg b/utils/lit/tests/Inputs/shtest-shell/lit.cfg index 4878b656096..7f31129ad11 100644 --- a/utils/lit/tests/Inputs/shtest-shell/lit.cfg +++ b/utils/lit/tests/Inputs/shtest-shell/lit.cfg @@ -1,3 +1,4 @@ +import lit.formats config.name = 'shtest-shell' config.suffixes = ['.txt'] config.test_format = lit.formats.ShTest() diff --git a/utils/lit/tests/Inputs/unittest-adaptor/lit.cfg b/utils/lit/tests/Inputs/unittest-adaptor/lit.cfg index 52de7096624..9e08a8629a4 100644 --- a/utils/lit/tests/Inputs/unittest-adaptor/lit.cfg +++ b/utils/lit/tests/Inputs/unittest-adaptor/lit.cfg @@ -1,3 +1,4 @@ +import lit.formats config.name = 'unittest-adaptor' config.suffixes = ['.txt'] config.test_format = lit.formats.ShTest() diff --git a/utils/lit/tests/lit.cfg b/utils/lit/tests/lit.cfg index 32760ceb273..f148c911aac 100644 --- a/utils/lit/tests/lit.cfg +++ b/utils/lit/tests/lit.cfg @@ -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") -- 2.34.1