| 910 | |
| 911 | |
| 912 | class LiteralTestSuite(TestSuite): |
| 913 | def __init__(self, tests_repos, test_root): |
| 914 | super(LiteralTestSuite, self).__init__('root') |
| 915 | self.tests_repos = tests_repos |
| 916 | self.test_root = test_root |
| 917 | |
| 918 | def GetBuildRequirements(self, path, context): |
| 919 | (name, rest) = CarCdr(path) |
| 920 | result = [ ] |
| 921 | for test in self.tests_repos: |
| 922 | if not name or name.match(test.GetName()): |
| 923 | result += test.GetBuildRequirements(rest, context) |
| 924 | return result |
| 925 | |
| 926 | def ListTests(self, current_path, path, context, arch, mode): |
| 927 | (name, _rest) = CarCdr(path) |
| 928 | result = [ ] |
| 929 | for test in self.tests_repos: |
| 930 | test_name = test.GetName() |
| 931 | if not name or name.match(test_name): |
| 932 | full_path = current_path + [test_name] |
| 933 | test.AddTestsToList(result, full_path, path, context, arch, mode) |
| 934 | result.sort(key=lambda x: x.GetName()) |
| 935 | return result |
| 936 | |
| 937 | def GetTestStatus(self, context, sections, defs): |
| 938 | # Just read the test configuration from root_path/root.status. |
| 939 | root = TestConfiguration(context, self.test_root, 'root') |
| 940 | root.GetTestStatus(sections, defs) |
| 941 | for tests_repos in self.tests_repos: |
| 942 | tests_repos.GetTestStatus(context, sections, defs) |
| 943 | |
| 944 | |
| 945 | TIMEOUT_SCALEFACTOR = { |