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 fullpath = os.path.join(dirname, filename) | 84 testname = os.path.join(dirname[len(self.testroot) + 1:], |
85 relpath = fullpath[len(self.testroot) + 1 : -3] | 85 filename[:-3]) |
86 testname = relpath.replace(os.path.sep, "/") | |
87 case = testcase.TestCase(self, testname) | 86 case = testcase.TestCase(self, testname) |
88 tests.append(case) | 87 tests.append(case) |
89 return tests | 88 return tests |
90 | 89 |
91 def GetFlagsForTestCase(self, testcase, context): | 90 def GetFlagsForTestCase(self, testcase, context): |
92 result = [] | 91 result = [] |
93 result += context.mode_flags | 92 result += context.mode_flags |
94 result += ["--expose-gc"] | 93 result += ["--expose-gc"] |
95 result += [os.path.join(self.root, "mozilla-shell-emulation.js")] | 94 result += [os.path.join(self.root, "mozilla-shell-emulation.js")] |
96 testfilename = testcase.path + ".js" | 95 testfilename = testcase.path + ".js" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 shutil.rmtree("mozilla") | 157 shutil.rmtree("mozilla") |
159 with tarfile.open(archive_file, "w:gz") as tar: | 158 with tarfile.open(archive_file, "w:gz") as tar: |
160 tar.add("data") | 159 tar.add("data") |
161 with open(versionfile, "w") as f: | 160 with open(versionfile, "w") as f: |
162 f.write(MOZILLA_VERSION) | 161 f.write(MOZILLA_VERSION) |
163 os.chdir(old_cwd) | 162 os.chdir(old_cwd) |
164 | 163 |
165 | 164 |
166 def GetSuite(name, root): | 165 def GetSuite(name, root): |
167 return MozillaTestSuite(name, root) | 166 return MozillaTestSuite(name, root) |
OLD | NEW |