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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 for dirname, dirs, files in os.walk(current_root): | 74 for dirname, dirs, files in os.walk(current_root): |
75 for dotted in [x for x in dirs if x.startswith(".")]: | 75 for dotted in [x for x in dirs if x.startswith(".")]: |
76 dirs.remove(dotted) | 76 dirs.remove(dotted) |
77 for excluded in EXCLUDED: | 77 for excluded in EXCLUDED: |
78 if excluded in dirs: | 78 if excluded in dirs: |
79 dirs.remove(excluded) | 79 dirs.remove(excluded) |
80 dirs.sort() | 80 dirs.sort() |
81 files.sort() | 81 files.sort() |
82 for filename in files: | 82 for filename in files: |
83 if filename.endswith(".js") and not filename in FRAMEWORK: | 83 if filename.endswith(".js") and not filename in FRAMEWORK: |
84 testname = os.path.join(dirname[len(self.testroot) + 1:], | 84 fullpath = os.path.join(dirname, filename) |
85 filename[:-3]) | 85 relpath = fullpath[len(self.testroot) + 1 : -3] |
| 86 testname = relpath.replace(os.path.sep, "/") |
86 case = testcase.TestCase(self, testname) | 87 case = testcase.TestCase(self, testname) |
87 tests.append(case) | 88 tests.append(case) |
88 return tests | 89 return tests |
89 | 90 |
90 def GetFlagsForTestCase(self, testcase, context): | 91 def GetFlagsForTestCase(self, testcase, context): |
91 result = [] | 92 result = [] |
92 result += context.mode_flags | 93 result += context.mode_flags |
93 result += ["--expose-gc"] | 94 result += ["--expose-gc"] |
94 result += [os.path.join(self.root, "mozilla-shell-emulation.js")] | 95 result += [os.path.join(self.root, "mozilla-shell-emulation.js")] |
95 testfilename = testcase.path + ".js" | 96 testfilename = testcase.path + ".js" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 shutil.rmtree("mozilla") | 158 shutil.rmtree("mozilla") |
158 with tarfile.open(archive_file, "w:gz") as tar: | 159 with tarfile.open(archive_file, "w:gz") as tar: |
159 tar.add("data") | 160 tar.add("data") |
160 with open(versionfile, "w") as f: | 161 with open(versionfile, "w") as f: |
161 f.write(MOZILLA_VERSION) | 162 f.write(MOZILLA_VERSION) |
162 os.chdir(old_cwd) | 163 os.chdir(old_cwd) |
163 | 164 |
164 | 165 |
165 def GetSuite(name, root): | 166 def GetSuite(name, root): |
166 return MozillaTestSuite(name, root) | 167 return MozillaTestSuite(name, root) |
OLD | NEW |