Daniel Dunbar | 1db467f | 2009-07-31 05:54:17 +0000 | [diff] [blame] | 1 | class TestingConfig: |
| 2 | """" |
| 3 | TestingConfig - Information on a how to run a group of tests. |
| 4 | """ |
| 5 | |
| 6 | @staticmethod |
| 7 | def frompath(path): |
| 8 | data = {} |
| 9 | f = open(path) |
| 10 | exec f in {},data |
| 11 | |
| 12 | return TestingConfig(suffixes = data.get('suffixes', []), |
| 13 | environment = data.get('environment', {})) |
| 14 | |
| 15 | def __init__(self, suffixes, environment): |
Daniel Dunbar | 1db467f | 2009-07-31 05:54:17 +0000 | [diff] [blame] | 16 | self.suffixes = set(suffixes) |
| 17 | self.environment = dict(environment) |
Daniel Dunbar | 1db467f | 2009-07-31 05:54:17 +0000 | [diff] [blame] | 18 | |
Daniel Dunbar | 5928ccd | 2009-08-01 04:06:02 +0000 | [diff] [blame] | 19 | # Variables set internally. |
| 20 | self.root = None |
| 21 | self.useValgrind = None |
Daniel Dunbar | 1db467f | 2009-07-31 05:54:17 +0000 | [diff] [blame] | 22 | |
Daniel Dunbar | 5928ccd | 2009-08-01 04:06:02 +0000 | [diff] [blame] | 23 | # FIXME: These need to move into a substitutions mechanism. |
| 24 | self.clang = None |
| 25 | self.clangcc = None |