Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnu
authorEli Bendersky <eli.bendersky@intel.com>
Sun, 25 Mar 2012 09:02:19 +0000 (09:02 +0000)
committerEli Bendersky <eli.bendersky@intel.com>
Sun, 25 Mar 2012 09:02:19 +0000 (09:02 +0000)
* 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153408 91177308-0d34-0410-b5e6-96231b3b80d8

40 files changed:
docs/CommandGuide/lit.pod
test/Bindings/Ocaml/lit.local.cfg
test/CodeGen/ARM/lit.local.cfg
test/CodeGen/CBackend/X86/lit.local.cfg
test/CodeGen/CBackend/lit.local.cfg
test/CodeGen/CPP/lit.local.cfg
test/CodeGen/CellSPU/lit.local.cfg
test/CodeGen/Hexagon/lit.local.cfg
test/CodeGen/MBlaze/lit.local.cfg
test/CodeGen/MSP430/lit.local.cfg
test/CodeGen/Mips/lit.local.cfg
test/CodeGen/PTX/lit.local.cfg
test/CodeGen/PowerPC/lit.local.cfg
test/CodeGen/SPARC/lit.local.cfg
test/CodeGen/Thumb/lit.local.cfg
test/CodeGen/Thumb2/lit.local.cfg
test/CodeGen/X86/GC/lit.local.cfg
test/CodeGen/X86/lit.local.cfg
test/CodeGen/XCore/lit.local.cfg
test/DebugInfo/X86/lit.local.cfg
test/MC/ARM/lit.local.cfg
test/MC/AsmParser/lit.local.cfg
test/MC/COFF/lit.local.cfg
test/MC/Disassembler/ARM/lit.local.cfg
test/MC/Disassembler/MBlaze/lit.local.cfg
test/MC/Disassembler/X86/lit.local.cfg
test/MC/ELF/lit.local.cfg
test/MC/MBlaze/lit.local.cfg
test/MC/MachO/ARM/lit.local.cfg
test/MC/MachO/lit.local.cfg
test/MC/Mips/lit.local.cfg
test/Object/X86/lit.local.cfg
test/Other/X86/lit.local.cfg
test/Transforms/LoopStrengthReduce/ARM/lit.local.cfg
test/Transforms/LoopStrengthReduce/X86/lit.local.cfg
test/Transforms/TailDup/X86/lit.local.cfg
test/Transforms/TailDup/lit.local.cfg
test/lib/llvm.exp [deleted file]
test/lit.cfg
utils/lit/lit/TestingConfig.py

index e0b1a8c57f18c06ee2dd799e21ca3bd019b2c568..5eeee118a636130f766e6d99248bb8bee53d5fe1 100644 (file)
@@ -301,6 +301,9 @@ reported as unsupported. Used by: I<ShTest>, I<TclTest>.
 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
index 127c3d56305387b3900667b1e6d163581cb33067..640c58d2f3d6e8938be6799bcfa15f5d3daf9777 100644 (file)
@@ -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
 
index dd6c50d4fe48928d5391064b41a108c0a981536b..cb77b09ef4adbcf6481e27d0577855a7e17a8c36 100644 (file)
@@ -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
 
index 037d8c3910d01c91d10e636ba3444f7065503c67..f2d1cc7d7b0759c0aafa072a9244cc2997576eac 100644 (file)
@@ -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
 
index 0dce1702a794972214bffee5b8e6cf7451fc9cbf..869e52962f65e43d4b7e43d1d8578455c0d7c221 100644 (file)
@@ -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
 
index 96596d85f6e43c9a608e29e053c57b16b6289eea..4d4b4a4a7e21c1272e6411cace339a13796b7c64 100644 (file)
@@ -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
 
index 6ae0972b66cb2bccdddef324e7b73b6bbf788253..ea00867701b2274a50b6cc338a1de8da141f5b37 100644 (file)
@@ -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
 
index ea12f68870e73ef1e563ce7ef4ad2590519d305f..24324b2792e386aefa7fc7622592575c97e08138 100644 (file)
@@ -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
 
index e43df89e1966654f6c74e394029a9e6287445343..e236200d75726825df9220c65b16b45c50175c3e 100644 (file)
@@ -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
 
index b9b654deba5cee822dfa63368854cef3c43dc251..972732ebad3015f9040ef2e21d7bcd678ac394f0 100644 (file)
@@ -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
 
index e1cd73a3786a623a4f340e8792971c2e055b138d..0587d3243e6b207053f1f35682465c333d1726f4 100644 (file)
@@ -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
 
index 73990890766e87e6cd073d8889aa100af0058b8b..e748f7f05b31860018e95d607af6a075d1bea7b7 100644 (file)
@@ -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
 
index 5c7f2677f3506ffe1ce0048c43c072e4f78a3d5d..4019eca0bb88f9d2d741be6e5d5b1aec3965e291 100644 (file)
@@ -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
 
index ba81a16057c56fb5c7986f13d179007e16b9c1a7..786fee9e6610b179bd3600780e9bd160ee3f58ff 100644 (file)
@@ -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
 
index dd6c50d4fe48928d5391064b41a108c0a981536b..cb77b09ef4adbcf6481e27d0577855a7e17a8c36 100644 (file)
@@ -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
 
index dd6c50d4fe48928d5391064b41a108c0a981536b..cb77b09ef4adbcf6481e27d0577855a7e17a8c36 100644 (file)
@@ -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
 
index b05ed3c77c166e52612e41e07dccba3fbac87e8b..a8ad0f1a28b23766c81a5a49d05536859b8226bf 100644 (file)
@@ -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
 
index b05ed3c77c166e52612e41e07dccba3fbac87e8b..a8ad0f1a28b23766c81a5a49d05536859b8226bf 100644 (file)
@@ -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
 
index c697912418e301234b72ed44fa9471e03a779f3a..f8726af57f7996a7a9639ed313cdee5481bb187c 100644 (file)
@@ -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
 
index 2092c29db37a541387d1f17f7d0b0477c0c0dd21..0d694da8df5a347241221f697122d9919784a1fb 100644 (file)
@@ -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
index 92d3ff359302587dadbf6870ef4f051747521a31..57009139616f6e0164bd08f719fb2f156f688112 100644 (file)
@@ -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
 
index 1f53769b7b9c6816363934179238f124cfcc8f72..6c49f08b7496de4427c088baafd0bb242b8a42ac 100644 (file)
@@ -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
 
index ec8d4d33d262a7f7651d9acf95fe068a2de77a76..41a8434f99939c4a7ebf9421796d2b1c25f40cab 100644 (file)
@@ -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
 
index c5dd3fb51ac5d3734b0e93749ec1f99a82dfb51b..22a76e5cab2d072d047e06719f17a76b9db40e74 100644 (file)
@@ -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
 
index 766b9801132b49ef93014a78d0ef71cc2e8a442f..3955b4e167a547c4a0458712afbf6e928c4840cb 100644 (file)
@@ -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
 
index 5f3ae7de9a946068aa26ea2ae28ccda6b1247065..6211b3e538537ac61aedc34d323d608d3f2e3bb3 100644 (file)
@@ -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
 
index 461c6f4f2b348fe31969af3cde1b9ab7090fdce3..56bf00859572ea9eb8fd5c92474e897912286063 100644 (file)
@@ -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
 
index 6f92d8744e09ead2a725063ffcd490fe0fe342d4..b0e1d850ff96ffc02e22a5ec8c77166dc4ab6f93 100644 (file)
@@ -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
 
index 871e2b5cc4e0d564f77a9b93758b517de49db80c..89764637feb0be657236e4432a025e3ed3085a4c 100644 (file)
@@ -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
 
index 1f53769b7b9c6816363934179238f124cfcc8f72..6c49f08b7496de4427c088baafd0bb242b8a42ac 100644 (file)
@@ -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
 
index ecc61ea595a56bae3c45bea2b19bedd4b116d8d7..d2e3b28dbd863759e5eaabb68310a5bf70b23d91 100644 (file)
@@ -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
 
index bbffb847bdfbe827d3d368fd57351ba1b8ac8f03..6a29e9250f3c6d4deca16b895d11ea5ae4812f06 100644 (file)
@@ -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
 
index 84bd88ca33342784a5ef5198367739ed1932b457..da2db5a45f9c6f855b64dd9e7362e1681c3fae6b 100644 (file)
@@ -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
 
index d622529cad137bcf5c118897925bb68e316fbc2d..bac2ffab31d92d836cc058b16e6fbf6bf1e8b407 100644 (file)
@@ -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
 
index 84bd88ca33342784a5ef5198367739ed1932b457..da2db5a45f9c6f855b64dd9e7362e1681c3fae6b 100644 (file)
@@ -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
 
index 84bd88ca33342784a5ef5198367739ed1932b457..da2db5a45f9c6f855b64dd9e7362e1681c3fae6b 100644 (file)
@@ -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
 
index 39c803900e556091c487762f9fdc84c0139230e6..18c604aba5672ea96628c75be8fc74c6e6c5ad46 100644 (file)
@@ -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
diff --git a/test/lib/llvm.exp b/test/lib/llvm.exp
deleted file mode 100644 (file)
index e69de29..0000000
index acbe97aa6de2f21d7d217d0c88c311c493a14204..c58935956a4f99f9624efaf868aaeb741e502184 100644 (file)
@@ -218,70 +218,6 @@ for pattern in [r"\bbugpoint\b(?!-)",   r"(?<!/|-)\bclang\b(?!-)",
              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
index 78bf268f101d1244b866cd2ed4570bbe634c9d54..e4980b353bd1fd663c397463b956a2bf88dd88b5 100644 (file)
@@ -114,3 +114,9 @@ class TestingConfig:
             # 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
+