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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 files_list += files_match.group(1).strip().split() | 70 files_list += files_match.group(1).strip().split() |
71 files_match = FILES_PATTERN.search(source, files_match.end()) | 71 files_match = FILES_PATTERN.search(source, files_match.end()) |
72 else: | 72 else: |
73 break | 73 break |
74 files = [ os.path.normpath(os.path.join(self.root, '..', '..', f)) | 74 files = [ os.path.normpath(os.path.join(self.root, '..', '..', f)) |
75 for f in files_list ] | 75 for f in files_list ] |
76 testfilename = os.path.join(self.root, testcase.path + self.suffix()) | 76 testfilename = os.path.join(self.root, testcase.path + self.suffix()) |
77 if SELF_SCRIPT_PATTERN.search(source): | 77 if SELF_SCRIPT_PATTERN.search(source): |
78 env = ["-e", "TEST_FILE_NAME=\"%s\"" % testfilename.replace("\\", "\\\\")] | 78 env = ["-e", "TEST_FILE_NAME=\"%s\"" % testfilename.replace("\\", "\\\\")] |
79 files = env + files | 79 files = env + files |
80 files.append(os.path.join(self.root, "mjsunit.js")) | 80 |
| 81 if not context.no_harness: |
| 82 files.append(os.path.join(self.root, "mjsunit.js")) |
81 files.append(testfilename) | 83 files.append(testfilename) |
82 | 84 |
83 flags += files | 85 flags += files |
84 if context.isolates: | 86 if context.isolates: |
85 flags.append("--isolate") | 87 flags.append("--isolate") |
86 flags += files | 88 flags += files |
87 | 89 |
88 return testcase.flags + flags | 90 return testcase.flags + flags |
89 | 91 |
90 def GetSourceForTest(self, testcase): | 92 def GetSourceForTest(self, testcase): |
91 filename = os.path.join(self.root, testcase.path + self.suffix()) | 93 filename = os.path.join(self.root, testcase.path + self.suffix()) |
92 with open(filename) as f: | 94 with open(filename) as f: |
93 return f.read() | 95 return f.read() |
94 | 96 |
95 | 97 |
96 def GetSuite(name, root): | 98 def GetSuite(name, root): |
97 return MjsunitTestSuite(name, root) | 99 return MjsunitTestSuite(name, root) |
OLD | NEW |