[llvm-commits] [llvm] r153408 - in /llvm/trunk: docs/CommandGuide/ test/ test/Bindings/Ocaml/ test/CodeGen/ARM/ test/CodeGen/CBackend/ test/CodeGen/CBackend/X86/ test/CodeGen/CPP/ test/CodeGen/CellSPU/ test/CodeGen/Hexagon/ test/CodeGen/MBlaze/ test/CodeGen/MSP430/ test/CodeGen/Mips/ test/CodeGen/PTX/ test/CodeGen/PowerPC/ test/CodeGen/SPARC/ test/CodeGen/Thumb/ test/CodeGen/Thumb2/ test/CodeGen/X86/ test/CodeGen/X86/GC/ test/CodeGen/XCore/ test/DebugInfo/X86/ test/MC/ARM/ test/MC/AsmParser/ test/MC/COFF/ test/MC/Disas...
Eli Bendersky
eli.bendersky at intel.com
Sun Mar 25 02:02:20 PDT 2012
Author: eliben
Date: Sun Mar 25 04:02:19 2012
New Revision: 153408
URL: http://llvm.org/viewvc/llvm-project?rev=153408&view=rev
Log:
Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnu
* Removed test/lib/llvm.exp - it is no longer needed
* Deleted the dg.exp reading code from test/lit.cfg. There are no dg.exp files
left in the test suite so this code is no longer required. test/lit.cfg is
now much shorter and clearer
* Removed a lot of duplicate code in lit.local.cfg files that need access to
the root configuration, by adding a "root" attribute to the TestingConfig
object. This attribute is dynamically computed to provide the same
information as was previously provided by the custom getRoot functions.
* Documented the config.root attribute in docs/CommandGuide/lit.pod
Removed:
llvm/trunk/test/lib/llvm.exp
Modified:
llvm/trunk/docs/CommandGuide/lit.pod
llvm/trunk/test/Bindings/Ocaml/lit.local.cfg
llvm/trunk/test/CodeGen/ARM/lit.local.cfg
llvm/trunk/test/CodeGen/CBackend/X86/lit.local.cfg
llvm/trunk/test/CodeGen/CBackend/lit.local.cfg
llvm/trunk/test/CodeGen/CPP/lit.local.cfg
llvm/trunk/test/CodeGen/CellSPU/lit.local.cfg
llvm/trunk/test/CodeGen/Hexagon/lit.local.cfg
llvm/trunk/test/CodeGen/MBlaze/lit.local.cfg
llvm/trunk/test/CodeGen/MSP430/lit.local.cfg
llvm/trunk/test/CodeGen/Mips/lit.local.cfg
llvm/trunk/test/CodeGen/PTX/lit.local.cfg
llvm/trunk/test/CodeGen/PowerPC/lit.local.cfg
llvm/trunk/test/CodeGen/SPARC/lit.local.cfg
llvm/trunk/test/CodeGen/Thumb/lit.local.cfg
llvm/trunk/test/CodeGen/Thumb2/lit.local.cfg
llvm/trunk/test/CodeGen/X86/GC/lit.local.cfg
llvm/trunk/test/CodeGen/X86/lit.local.cfg
llvm/trunk/test/CodeGen/XCore/lit.local.cfg
llvm/trunk/test/DebugInfo/X86/lit.local.cfg
llvm/trunk/test/MC/ARM/lit.local.cfg
llvm/trunk/test/MC/AsmParser/lit.local.cfg
llvm/trunk/test/MC/COFF/lit.local.cfg
llvm/trunk/test/MC/Disassembler/ARM/lit.local.cfg
llvm/trunk/test/MC/Disassembler/MBlaze/lit.local.cfg
llvm/trunk/test/MC/Disassembler/X86/lit.local.cfg
llvm/trunk/test/MC/ELF/lit.local.cfg
llvm/trunk/test/MC/MBlaze/lit.local.cfg
llvm/trunk/test/MC/MachO/ARM/lit.local.cfg
llvm/trunk/test/MC/MachO/lit.local.cfg
llvm/trunk/test/MC/Mips/lit.local.cfg
llvm/trunk/test/Object/X86/lit.local.cfg
llvm/trunk/test/Other/X86/lit.local.cfg
llvm/trunk/test/Transforms/LoopStrengthReduce/ARM/lit.local.cfg
llvm/trunk/test/Transforms/LoopStrengthReduce/X86/lit.local.cfg
llvm/trunk/test/Transforms/TailDup/X86/lit.local.cfg
llvm/trunk/test/Transforms/TailDup/lit.local.cfg
llvm/trunk/test/lit.cfg
llvm/trunk/utils/lit/lit/TestingConfig.py
Modified: llvm/trunk/docs/CommandGuide/lit.pod
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/lit.pod?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/docs/CommandGuide/lit.pod (original)
+++ llvm/trunk/docs/CommandGuide/lit.pod Sun Mar 25 04:02:19 2012
@@ -301,6 +301,9 @@
B<parent> The parent configuration, this is the config object for the directory
containing the test suite, or None.
+B<root> The root configuration. This is the top-most B<lit> configuration in
+the project.
+
B<on_clone> The config is actually cloned for every subdirectory inside a test
suite, to allow local configuration on a per-directory basis. The I<on_clone>
variable can be set to a Python function which will be called whenever a
Modified: llvm/trunk/test/Bindings/Ocaml/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bindings/Ocaml/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/Bindings/Ocaml/lit.local.cfg (original)
+++ llvm/trunk/test/Bindings/Ocaml/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp', '.ml']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-bindings = set([s.strip() for s in root.llvm_bindings.split(',')])
+bindings = set([s.strip() for s in config.root.llvm_bindings.split(',')])
if not 'ocaml' in bindings:
config.unsupported = True
Modified: llvm/trunk/test/CodeGen/ARM/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/lit.local.cfg (original)
+++ llvm/trunk/test/CodeGen/ARM/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
config.unsupported = True
Modified: llvm/trunk/test/CodeGen/CBackend/X86/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CBackend/X86/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/CBackend/X86/lit.local.cfg (original)
+++ llvm/trunk/test/CodeGen/CBackend/X86/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'CBackend' in targets or not 'X86' in targets:
config.unsupported = True
Modified: llvm/trunk/test/CodeGen/CBackend/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CBackend/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/CBackend/lit.local.cfg (original)
+++ llvm/trunk/test/CodeGen/CBackend/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'CBackend' in targets:
config.unsupported = True
Modified: llvm/trunk/test/CodeGen/CPP/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CPP/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/CPP/lit.local.cfg (original)
+++ llvm/trunk/test/CodeGen/CPP/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'CppBackend' in targets:
config.unsupported = True
Modified: llvm/trunk/test/CodeGen/CellSPU/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CellSPU/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/CellSPU/lit.local.cfg (original)
+++ llvm/trunk/test/CodeGen/CellSPU/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'CellSPU' in targets:
config.unsupported = True
Modified: llvm/trunk/test/CodeGen/Hexagon/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Hexagon/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Hexagon/lit.local.cfg (original)
+++ llvm/trunk/test/CodeGen/Hexagon/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'Hexagon' in targets:
config.unsupported = True
Modified: llvm/trunk/test/CodeGen/MBlaze/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MBlaze/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/MBlaze/lit.local.cfg (original)
+++ llvm/trunk/test/CodeGen/MBlaze/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'MBlaze' in targets:
config.unsupported = True
Modified: llvm/trunk/test/CodeGen/MSP430/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MSP430/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/MSP430/lit.local.cfg (original)
+++ llvm/trunk/test/CodeGen/MSP430/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'MSP430' in targets:
config.unsupported = True
Modified: llvm/trunk/test/CodeGen/Mips/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/lit.local.cfg (original)
+++ llvm/trunk/test/CodeGen/Mips/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'Mips' in targets:
config.unsupported = True
Modified: llvm/trunk/test/CodeGen/PTX/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PTX/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PTX/lit.local.cfg (original)
+++ llvm/trunk/test/CodeGen/PTX/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'PTX' in targets:
config.unsupported = True
Modified: llvm/trunk/test/CodeGen/PowerPC/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/lit.local.cfg (original)
+++ llvm/trunk/test/CodeGen/PowerPC/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'PowerPC' in targets:
config.unsupported = True
Modified: llvm/trunk/test/CodeGen/SPARC/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/SPARC/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/SPARC/lit.local.cfg (original)
+++ llvm/trunk/test/CodeGen/SPARC/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'Sparc' in targets:
config.unsupported = True
Modified: llvm/trunk/test/CodeGen/Thumb/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Thumb/lit.local.cfg (original)
+++ llvm/trunk/test/CodeGen/Thumb/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
config.unsupported = True
Modified: llvm/trunk/test/CodeGen/Thumb2/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb2/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Thumb2/lit.local.cfg (original)
+++ llvm/trunk/test/CodeGen/Thumb2/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
config.unsupported = True
Modified: llvm/trunk/test/CodeGen/X86/GC/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/GC/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/GC/lit.local.cfg (original)
+++ llvm/trunk/test/CodeGen/X86/GC/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
config.unsupported = True
Modified: llvm/trunk/test/CodeGen/X86/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/lit.local.cfg (original)
+++ llvm/trunk/test/CodeGen/X86/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
config.unsupported = True
Modified: llvm/trunk/test/CodeGen/XCore/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/XCore/lit.local.cfg (original)
+++ llvm/trunk/test/CodeGen/XCore/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'XCore' in targets:
config.unsupported = True
Modified: llvm/trunk/test/DebugInfo/X86/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/lit.local.cfg (original)
+++ llvm/trunk/test/DebugInfo/X86/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,12 +1,5 @@
config.suffixes = ['.ll']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
config.unsupported = True
Modified: llvm/trunk/test/MC/ARM/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/lit.local.cfg (original)
+++ llvm/trunk/test/MC/ARM/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp', '.s']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
config.unsupported = True
Modified: llvm/trunk/test/MC/AsmParser/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/lit.local.cfg (original)
+++ llvm/trunk/test/MC/AsmParser/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.s']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
config.unsupported = True
Modified: llvm/trunk/test/MC/COFF/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/COFF/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/MC/COFF/lit.local.cfg (original)
+++ llvm/trunk/test/MC/COFF/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.s', '.ll']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
config.unsupported = True
Modified: llvm/trunk/test/MC/Disassembler/ARM/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/ARM/lit.local.cfg (original)
+++ llvm/trunk/test/MC/Disassembler/ARM/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.txt']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
config.unsupported = True
Modified: llvm/trunk/test/MC/Disassembler/MBlaze/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/MBlaze/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/MBlaze/lit.local.cfg (original)
+++ llvm/trunk/test/MC/Disassembler/MBlaze/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.txt']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'MBlaze' in targets:
config.unsupported = True
Modified: llvm/trunk/test/MC/Disassembler/X86/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/X86/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/X86/lit.local.cfg (original)
+++ llvm/trunk/test/MC/Disassembler/X86/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.txt']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
config.unsupported = True
Modified: llvm/trunk/test/MC/ELF/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/lit.local.cfg (original)
+++ llvm/trunk/test/MC/ELF/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.s']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
config.unsupported = True
Modified: llvm/trunk/test/MC/MBlaze/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MBlaze/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/MC/MBlaze/lit.local.cfg (original)
+++ llvm/trunk/test/MC/MBlaze/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp', '.s']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'MBlaze' in targets:
config.unsupported = True
Modified: llvm/trunk/test/MC/MachO/ARM/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/ARM/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/ARM/lit.local.cfg (original)
+++ llvm/trunk/test/MC/MachO/ARM/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.s']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
config.unsupported = True
Modified: llvm/trunk/test/MC/MachO/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/lit.local.cfg (original)
+++ llvm/trunk/test/MC/MachO/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.s']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
config.unsupported = True
Modified: llvm/trunk/test/MC/Mips/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/lit.local.cfg (original)
+++ llvm/trunk/test/MC/Mips/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll', '.c', '.cpp', '.s']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'Mips' in targets:
config.unsupported = True
Modified: llvm/trunk/test/Object/X86/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/X86/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/Object/X86/lit.local.cfg (original)
+++ llvm/trunk/test/Object/X86/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.test']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
config.unsupported = True
Modified: llvm/trunk/test/Other/X86/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/X86/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/Other/X86/lit.local.cfg (original)
+++ llvm/trunk/test/Other/X86/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
config.unsupported = True
Modified: llvm/trunk/test/Transforms/LoopStrengthReduce/ARM/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopStrengthReduce/ARM/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LoopStrengthReduce/ARM/lit.local.cfg (original)
+++ llvm/trunk/test/Transforms/LoopStrengthReduce/ARM/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
config.unsupported = True
Modified: llvm/trunk/test/Transforms/LoopStrengthReduce/X86/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopStrengthReduce/X86/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LoopStrengthReduce/X86/lit.local.cfg (original)
+++ llvm/trunk/test/Transforms/LoopStrengthReduce/X86/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
config.unsupported = True
Modified: llvm/trunk/test/Transforms/TailDup/X86/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/TailDup/X86/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/TailDup/X86/lit.local.cfg (original)
+++ llvm/trunk/test/Transforms/TailDup/X86/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,13 +1,6 @@
config.suffixes = ['.ll']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
config.unsupported = True
Modified: llvm/trunk/test/Transforms/TailDup/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/TailDup/lit.local.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/TailDup/lit.local.cfg (original)
+++ llvm/trunk/test/Transforms/TailDup/lit.local.cfg Sun Mar 25 04:02:19 2012
@@ -1,12 +1,5 @@
config.suffixes = ['.ll', '.c', '.cpp']
-def getRoot(config):
- if not config.parent:
- return config
- return getRoot(config.parent)
-
-root = getRoot(config)
-
-targets = set(root.targets_to_build.split())
+targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
config.unsupported = True
Removed: llvm/trunk/test/lib/llvm.exp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lib/llvm.exp?rev=153407&view=auto
==============================================================================
(empty)
Modified: llvm/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/test/lit.cfg (original)
+++ llvm/trunk/test/lit.cfg Sun Mar 25 04:02:19 2012
@@ -218,70 +218,6 @@
break
config.substitutions.append((pattern, substitution))
-excludes = []
-
-# Provide llvm_supports_target for use in local configs.
-targets = set(site_exp["TARGETS_TO_BUILD"].split())
-def llvm_supports_target(name):
- return name in targets
-
-def llvm_supports_darwin_and_target(name):
- return 'darwin' in config.target_triple and llvm_supports_target(name)
-
-bindings = set([s.strip() for s in site_exp['llvm_bindings'].split(',')])
-def llvm_supports_binding(name):
- return name.strip() in bindings
-
-# Provide on_clone hook for reading 'dg.exp'.
-import os
-simpleLibData = re.compile(r"""load_lib llvm.exp
-
-RunLLVMTests \[lsort \[glob -nocomplain \$srcdir/\$subdir/\*\.(.*)\]\]""",
- re.MULTILINE)
-conditionalLibData = re.compile(r"""load_lib llvm.exp
-
-if.*\[ ?(llvm[^ ]*) ([^ ]*) ?\].*{
- *RunLLVMTests \[lsort \[glob -nocomplain \$srcdir/\$subdir/\*\.(.*)\]\]
-\}""", re.MULTILINE)
-def on_clone(parent, cfg, for_path):
- def addSuffixes(match):
- if match[0] == '{' and match[-1] == '}':
- cfg.suffixes = ['.' + s for s in match[1:-1].split(',')]
- else:
- cfg.suffixes = ['.' + match]
-
- libPath = os.path.join(os.path.dirname(for_path),
- 'dg.exp')
- if not os.path.exists(libPath):
- return
-
- # Reset unsupported, in case we inherited it.
- cfg.unsupported = False
- lib = open(libPath).read().strip()
-
- # Check for a simple library.
- m = simpleLibData.match(lib)
- if m:
- addSuffixes(m.group(1))
- return
-
- # Check for a conditional test set.
- m = conditionalLibData.match(lib)
- if m:
- funcname,arg,match = m.groups()
- addSuffixes(match)
-
- func = globals().get(funcname)
- if not func:
- lit.error('unsupported predicate %r' % funcname)
- elif not func(arg):
- cfg.unsupported = True
- return
- # Otherwise, give up.
- lit.error('unable to understand %r:\n%s' % (libPath, lib))
-
-config.on_clone = on_clone
-
### Features
# Shell execution
Modified: llvm/trunk/utils/lit/lit/TestingConfig.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestingConfig.py?rev=153408&r1=153407&r2=153408&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/TestingConfig.py (original)
+++ llvm/trunk/utils/lit/lit/TestingConfig.py Sun Mar 25 04:02:19 2012
@@ -114,3 +114,9 @@
# files. Should we distinguish them?
self.test_source_root = str(self.test_source_root)
self.excludes = set(self.excludes)
+
+ @property
+ def root(self):
+ """root attribute - The root configuration for the test suite."""
+ return self if self.parent is None else self.parent.root
+
More information about the llvm-commits
mailing list