diff options
author | Daniel Dunbar <daniel@zuster.org> | 2013-08-21 22:26:26 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2013-08-21 22:26:26 +0000 |
commit | 7b0cdf7bf44e626977d607279a933e45346aeac8 (patch) | |
tree | 1362681c056a93fc956d07c9371209791f28d97a /utils/lit | |
parent | bf9d6e5c3743e873164765cbe38cc1bd10ee18ab (diff) | |
download | external_llvm-7b0cdf7bf44e626977d607279a933e45346aeac8.zip external_llvm-7b0cdf7bf44e626977d607279a933e45346aeac8.tar.gz external_llvm-7b0cdf7bf44e626977d607279a933e45346aeac8.tar.bz2 |
[lit] Extract TestFormat base class, for future use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188945 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/lit')
-rw-r--r-- | utils/lit/lit/Test.py | 6 | ||||
-rw-r--r-- | utils/lit/lit/formats/__init__.py | 2 | ||||
-rw-r--r-- | utils/lit/lit/formats/base.py | 9 | ||||
-rw-r--r-- | utils/lit/lit/formats/googletest.py | 3 |
4 files changed, 10 insertions, 10 deletions
diff --git a/utils/lit/lit/Test.py b/utils/lit/lit/Test.py index cf12425..dc2a435 100644 --- a/utils/lit/lit/Test.py +++ b/utils/lit/lit/Test.py @@ -20,12 +20,6 @@ UNSUPPORTED = TestResult('UNSUPPORTED', False) # Test classes. -class TestFormat: - """TestFormat - Test information provider.""" - - def __init__(self, name): - self.name = name - class TestSuite: """TestSuite - Information on a group of tests. diff --git a/utils/lit/lit/formats/__init__.py b/utils/lit/lit/formats/__init__.py index f4a303c..6862708 100644 --- a/utils/lit/lit/formats/__init__.py +++ b/utils/lit/lit/formats/__init__.py @@ -1,4 +1,4 @@ from __future__ import absolute_import -from lit.formats.base import FileBasedTest, OneCommandPerFileTest +from lit.formats.base import TestFormat, FileBasedTest, OneCommandPerFileTest from lit.formats.googletest import GoogleTest from lit.formats.shtest import ShTest diff --git a/utils/lit/lit/formats/base.py b/utils/lit/lit/formats/base.py index b384ec2..9e5420b 100644 --- a/utils/lit/lit/formats/base.py +++ b/utils/lit/lit/formats/base.py @@ -5,7 +5,12 @@ import sys import lit.Test import lit.util -class FileBasedTest(object): +class TestFormat(object): + pass + +### + +class FileBasedTest(TestFormat): def getTestsInDirectory(self, testSuite, path_in_suite, litConfig, localConfig): source_path = testSuite.getSourcePath(path_in_suite) @@ -27,7 +32,7 @@ class FileBasedTest(object): import re import tempfile -class OneCommandPerFileTest: +class OneCommandPerFileTest(TestFormat): # FIXME: Refactor into generic test for running some command on a directory # of inputs. diff --git a/utils/lit/lit/formats/googletest.py b/utils/lit/lit/formats/googletest.py index 8465a0b..b77e184 100644 --- a/utils/lit/lit/formats/googletest.py +++ b/utils/lit/lit/formats/googletest.py @@ -5,10 +5,11 @@ import sys import lit.Test import lit.TestRunner import lit.util +from .base import TestFormat kIsWindows = sys.platform in ['win32', 'cygwin'] -class GoogleTest(object): +class GoogleTest(TestFormat): def __init__(self, test_sub_dir, test_suffix): self.test_sub_dir = os.path.normcase(str(test_sub_dir)).split(';') self.test_suffix = str(test_suffix) |