[dragonegg] r188118 - [tests] Update to use lit_config and lit package, as appropriate.
Daniel Dunbar
daniel at zuster.org
Fri Aug 9 15:35:51 PDT 2013
Author: ddunbar
Date: Fri Aug 9 17:35:51 2013
New Revision: 188118
URL: http://llvm.org/viewvc/llvm-project?rev=188118&view=rev
Log:
[tests] Update to use lit_config and lit package, as appropriate.
Modified:
dragonegg/trunk/test/DEFormats.py
dragonegg/trunk/test/DETestRunner.py
dragonegg/trunk/test/compilator/compilator-lit.cfg
dragonegg/trunk/test/validator/validator-lit.cfg
Modified: dragonegg/trunk/test/DEFormats.py
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/test/DEFormats.py?rev=188118&r1=188117&r2=188118&view=diff
==============================================================================
--- dragonegg/trunk/test/DEFormats.py (original)
+++ dragonegg/trunk/test/DEFormats.py Fri Aug 9 17:35:51 2013
@@ -1,7 +1,7 @@
import DETestRunner
-from lit.TestFormats import FileBasedTest
+import lit.formats
-class CompilatorTest(FileBasedTest):
+class CompilatorTest(lit.formats.FileBasedTest):
def __init__(self, compilers, compiler_flags, language_flags, skip, xfails):
self.compilers = compilers
self.compiler_flags = compiler_flags
Modified: dragonegg/trunk/test/DETestRunner.py
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/test/DETestRunner.py?rev=188118&r1=188117&r2=188118&view=diff
==============================================================================
--- dragonegg/trunk/test/DETestRunner.py (original)
+++ dragonegg/trunk/test/DETestRunner.py Fri Aug 9 17:35:51 2013
@@ -2,7 +2,8 @@ import os
import StringIO
import DEUtils
-from lit import Test, Util
+from lit import Test
+import lit.util
def describeFailure(output, cmd, out, err, exitCode):
print >>output, "Command:",
@@ -110,7 +111,7 @@ def executeCompilatorTest(test, litConfi
execDir,execBase = os.path.split(execPath)
tmpDir = os.path.join(execDir, 'Output')
tmpDir = os.path.join(tmpDir, execBase)
- Util.mkdir_p(tmpDir)
+ lit.util.mkdir_p(tmpDir)
# Is this test expected to fail?
isXFail = test_path in xfails
Modified: dragonegg/trunk/test/compilator/compilator-lit.cfg
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/test/compilator/compilator-lit.cfg?rev=188118&r1=188117&r2=188118&view=diff
==============================================================================
--- dragonegg/trunk/test/compilator/compilator-lit.cfg (original)
+++ dragonegg/trunk/test/compilator/compilator-lit.cfg Fri Aug 9 17:35:51 2013
@@ -9,7 +9,7 @@ import DEUtils
config.name = 'The Compilator'
# Load common definitions.
-lit.load_config(config, lit.params['site'])
+lit_config.load_config(config, lit_config.params['site'])
# test_source_root: The root path where tests are located.
config.test_source_root = os.path.dirname(__file__)
Modified: dragonegg/trunk/test/validator/validator-lit.cfg
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/test/validator/validator-lit.cfg?rev=188118&r1=188117&r2=188118&view=diff
==============================================================================
--- dragonegg/trunk/test/validator/validator-lit.cfg (original)
+++ dragonegg/trunk/test/validator/validator-lit.cfg Fri Aug 9 17:35:51 2013
@@ -4,6 +4,8 @@ import platform
import re
import subprocess
+import lit.formats
+
# Allow import of our local utilities.
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
import DEUtils
@@ -12,15 +14,15 @@ import DEUtils
config.name = 'The Validator'
# Load common definitions.
-lit.load_config(config, lit.params['site'])
+lit_config.load_config(config, lit_config.params['site'])
# Tweak PATH for Win32
if platform.system() == 'Windows':
# Seek sane tools in directories and set to $PATH.
path = getattr(config, 'lit_tools_dir', None)
- path = lit.getToolsPath(path,
- config.environment['PATH'],
- ['cmp.exe', 'grep.exe', 'sed.exe'])
+ path = lit_config.getToolsPath(path,
+ config.environment['PATH'],
+ ['cmp.exe', 'grep.exe', 'sed.exe'])
if path is not None:
path = os.path.pathsep.join((path,
config.environment['PATH']))
@@ -35,7 +37,7 @@ config.environment['PATH'] = path
# For now we require '&&' between commands, until they get globally killed and
# the test runner updated.
execute_external = (platform.system() != 'Windows'
- or lit.getBashPath() not in [None, ""])
+ or lit_config.getBashPath() not in [None, ""])
config.test_format = lit.formats.ShTest(execute_external)
# suffixes: A list of file extensions to treat as test files.
@@ -51,7 +53,7 @@ config.test_exec_root = config.test_outp
# When running under valgrind, we mangle '-vg' onto the end of the triple so we
# can check it with XFAIL and XTARGET.
-if lit.useValgrind:
+if lit_config.useValgrind:
config.target_triple += '-vg'
# %dragonegg means: run dragonegg and output LLVM IR.
More information about the llvm-commits
mailing list