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 fullpath = os.path.join(dirname, filename) | 49 testname = os.path.join(dirname[len(self.root) + 1:], filename[:-3]) |
50 relpath = fullpath[len(self.root) + 1 : -3] | |
51 testname = relpath.replace(os.path.sep, "/") | |
52 test = testcase.TestCase(self, testname) | 50 test = testcase.TestCase(self, testname) |
53 tests.append(test) | 51 tests.append(test) |
54 return tests | 52 return tests |
55 | 53 |
56 def GetFlagsForTestCase(self, testcase, context): | 54 def GetFlagsForTestCase(self, testcase, context): |
57 flags = ["--allow-natives-syntax"] + context.mode_flags | 55 flags = ["--allow-natives-syntax"] + context.mode_flags |
58 | 56 |
59 files = [] | 57 files = [] |
60 files.append(os.path.join(self.root, "assert.js")) | 58 files.append(os.path.join(self.root, "assert.js")) |
61 files.append(os.path.join(self.root, "utils.js")) | 59 files.append(os.path.join(self.root, "utils.js")) |
62 files.append(os.path.join(self.root, testcase.path + self.suffix())) | 60 files.append(os.path.join(self.root, testcase.path + self.suffix())) |
63 | 61 |
64 flags += files | 62 flags += files |
65 if context.isolates: | 63 if context.isolates: |
66 flags.append("--isolate") | 64 flags.append("--isolate") |
67 flags += files | 65 flags += files |
68 | 66 |
69 return testcase.flags + flags | 67 return testcase.flags + flags |
70 | 68 |
71 | 69 |
72 def GetSuite(name, root): | 70 def GetSuite(name, root): |
73 return IntlTestSuite(name, root) | 71 return IntlTestSuite(name, root) |
OLD | NEW |