OLD | NEW |
1 # Copyright 2013 the V8 project authors. All rights reserved. | 1 # Copyright 2013 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 28 matching lines...) Expand all Loading... |
39 def ListTests(self, context): | 39 def ListTests(self, context): |
40 tests = [] | 40 tests = [] |
41 for dirname, dirs, files in os.walk(self.root): | 41 for dirname, dirs, files in os.walk(self.root): |
42 for dotted in [x for x in dirs if x.startswith('.')]: | 42 for dotted in [x for x in dirs if x.startswith('.')]: |
43 dirs.remove(dotted) | 43 dirs.remove(dotted) |
44 dirs.sort() | 44 dirs.sort() |
45 files.sort() | 45 files.sort() |
46 for filename in files: | 46 for filename in files: |
47 if (filename.endswith(".js") and filename != "assert.js" and | 47 if (filename.endswith(".js") and filename != "assert.js" and |
48 filename != "utils.js"): | 48 filename != "utils.js"): |
49 testname = os.path.join(dirname[len(self.root) + 1:], filename[:-3]) | 49 fullpath = os.path.join(dirname, filename) |
| 50 relpath = fullpath[len(self.root) + 1 : -3] |
| 51 testname = relpath.replace(os.path.sep, "/") |
50 test = testcase.TestCase(self, testname) | 52 test = testcase.TestCase(self, testname) |
51 tests.append(test) | 53 tests.append(test) |
52 return tests | 54 return tests |
53 | 55 |
54 def GetFlagsForTestCase(self, testcase, context): | 56 def GetFlagsForTestCase(self, testcase, context): |
55 flags = ["--allow-natives-syntax"] + context.mode_flags | 57 flags = ["--allow-natives-syntax"] + context.mode_flags |
56 | 58 |
57 files = [] | 59 files = [] |
58 files.append(os.path.join(self.root, "assert.js")) | 60 files.append(os.path.join(self.root, "assert.js")) |
59 files.append(os.path.join(self.root, "utils.js")) | 61 files.append(os.path.join(self.root, "utils.js")) |
60 files.append(os.path.join(self.root, testcase.path + self.suffix())) | 62 files.append(os.path.join(self.root, testcase.path + self.suffix())) |
61 | 63 |
62 flags += files | 64 flags += files |
63 if context.isolates: | 65 if context.isolates: |
64 flags.append("--isolate") | 66 flags.append("--isolate") |
65 flags += files | 67 flags += files |
66 | 68 |
67 return testcase.flags + flags | 69 return testcase.flags + flags |
68 | 70 |
69 | 71 |
70 def GetSuite(name, root): | 72 def GetSuite(name, root): |
71 return IntlTestSuite(name, root) | 73 return IntlTestSuite(name, root) |
OLD | NEW |