| OLD | NEW |
| 1 # Copyright 2008 the V8 project authors. All rights reserved. | 1 # Copyright 2008 the V8 project authors. All rights reserved. |
| 2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
| 3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
| 4 # met: | 4 # met: |
| 5 # | 5 # |
| 6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
| 7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
| 8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
| 9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
| 10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 def GetSource(self): | 86 def GetSource(self): |
| 87 return open(self.filename).read() | 87 return open(self.filename).read() |
| 88 | 88 |
| 89 | 89 |
| 90 class MozillaTestConfiguration(test.TestConfiguration): | 90 class MozillaTestConfiguration(test.TestConfiguration): |
| 91 | 91 |
| 92 def __init__(self, context, root): | 92 def __init__(self, context, root): |
| 93 super(MozillaTestConfiguration, self).__init__(context, root) | 93 super(MozillaTestConfiguration, self).__init__(context, root) |
| 94 | 94 |
| 95 def ListTests(self, current_path, path, mode): | 95 def ListTests(self, current_path, path, mode, variant_flags): |
| 96 tests = [] | 96 tests = [] |
| 97 for test_dir in TEST_DIRS: | 97 for test_dir in TEST_DIRS: |
| 98 current_root = join(self.root, 'data', test_dir) | 98 current_root = join(self.root, 'data', test_dir) |
| 99 for root, dirs, files in os.walk(current_root): | 99 for root, dirs, files in os.walk(current_root): |
| 100 for dotted in [x for x in dirs if x.startswith('.')]: | 100 for dotted in [x for x in dirs if x.startswith('.')]: |
| 101 dirs.remove(dotted) | 101 dirs.remove(dotted) |
| 102 for excluded in EXCLUDED: | 102 for excluded in EXCLUDED: |
| 103 if excluded in dirs: | 103 if excluded in dirs: |
| 104 dirs.remove(excluded) | 104 dirs.remove(excluded) |
| 105 dirs.sort() | 105 dirs.sort() |
| (...skipping 22 matching lines...) Expand all Loading... |
| 128 return ['sample', 'sample=shell'] | 128 return ['sample', 'sample=shell'] |
| 129 | 129 |
| 130 def GetTestStatus(self, sections, defs): | 130 def GetTestStatus(self, sections, defs): |
| 131 status_file = join(self.root, 'mozilla.status') | 131 status_file = join(self.root, 'mozilla.status') |
| 132 if exists(status_file): | 132 if exists(status_file): |
| 133 test.ReadConfigurationInto(status_file, sections, defs) | 133 test.ReadConfigurationInto(status_file, sections, defs) |
| 134 | 134 |
| 135 | 135 |
| 136 def GetConfiguration(context, root): | 136 def GetConfiguration(context, root): |
| 137 return MozillaTestConfiguration(context, root) | 137 return MozillaTestConfiguration(context, root) |
| OLD | NEW |