mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-22 10:29:35 +00:00
[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
This commit is contained in:
parent
bf9d6e5c37
commit
7b0cdf7bf4
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user