Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: test/mozilla/testcfg.py

Issue 365001: Sort tests to increase predictability of mozilla test runs... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 def ListTests(self, current_path, path, mode): 96 def ListTests(self, current_path, path, mode):
97 tests = [] 97 tests = []
98 for test_dir in TEST_DIRS: 98 for test_dir in TEST_DIRS:
99 current_root = join(self.root, 'data', test_dir) 99 current_root = join(self.root, 'data', test_dir)
100 for root, dirs, files in os.walk(current_root): 100 for root, dirs, files in os.walk(current_root):
101 for dotted in [x for x in dirs if x.startswith('.')]: 101 for dotted in [x for x in dirs if x.startswith('.')]:
102 dirs.remove(dotted) 102 dirs.remove(dotted)
103 for excluded in EXCLUDED: 103 for excluded in EXCLUDED:
104 if excluded in dirs: 104 if excluded in dirs:
105 dirs.remove(excluded) 105 dirs.remove(excluded)
106 dirs.sort()
106 root_path = root[len(self.root):].split(os.path.sep) 107 root_path = root[len(self.root):].split(os.path.sep)
107 root_path = current_path + [x for x in root_path if x] 108 root_path = current_path + [x for x in root_path if x]
108 framework = [] 109 framework = []
109 for i in xrange(len(root_path)): 110 for i in xrange(len(root_path)):
110 if i == 0: dir = root_path[1:] 111 if i == 0: dir = root_path[1:]
111 else: dir = root_path[1:-i] 112 else: dir = root_path[1:-i]
112 script = join(self.root, reduce(join, dir, ''), 'shell.js') 113 script = join(self.root, reduce(join, dir, ''), 'shell.js')
113 if exists(script): 114 if exists(script):
114 framework.append(script) 115 framework.append(script)
115 framework.reverse() 116 framework.reverse()
117 files.sort()
116 for file in files: 118 for file in files:
117 if (not file in FRAMEWORK) and file.endswith('.js'): 119 if (not file in FRAMEWORK) and file.endswith('.js'):
118 full_path = root_path + [file[:-3]] 120 full_path = root_path + [file[:-3]]
119 full_path = [x for x in full_path if x != 'data'] 121 full_path = [x for x in full_path if x != 'data']
120 if self.Contains(path, full_path): 122 if self.Contains(path, full_path):
121 test = MozillaTestCase(join(root, file), full_path, self.context, 123 test = MozillaTestCase(join(root, file), full_path, self.context,
122 self.root, mode, framework) 124 self.root, mode, framework)
123 tests.append(test) 125 tests.append(test)
124 return tests 126 return tests
125 127
126 def GetBuildRequirements(self): 128 def GetBuildRequirements(self):
127 return ['sample', 'sample=shell'] 129 return ['sample', 'sample=shell']
128 130
129 def GetTestStatus(self, sections, defs): 131 def GetTestStatus(self, sections, defs):
130 status_file = join(self.root, 'mozilla.status') 132 status_file = join(self.root, 'mozilla.status')
131 if exists(status_file): 133 if exists(status_file):
132 test.ReadConfigurationInto(status_file, sections, defs) 134 test.ReadConfigurationInto(status_file, sections, defs)
133 135
134 136
135 def GetConfiguration(context, root): 137 def GetConfiguration(context, root):
136 return MozillaTestConfiguration(context, root) 138 return MozillaTestConfiguration(context, root)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698