| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 shell += ".exe" | 58 shell += ".exe" |
| 59 output = commands.Execute(context.command_prefix + | 59 output = commands.Execute(context.command_prefix + |
| 60 [shell, "--list"] + | 60 [shell, "--list"] + |
| 61 context.extra_flags) | 61 context.extra_flags) |
| 62 if output.exit_code != 0: | 62 if output.exit_code != 0: |
| 63 print output.stdout | 63 print output.stdout |
| 64 print output.stderr | 64 print output.stderr |
| 65 return [] | 65 return [] |
| 66 tests = [] | 66 tests = [] |
| 67 for test_desc in output.stdout.strip().split(): | 67 for test_desc in output.stdout.strip().split(): |
| 68 if test_desc.find('<') < 0: | 68 test = testcase.TestCase(self, test_desc) |
| 69 # Native Client output can contain a few non-test arguments | |
| 70 # before the tests. Skip these. | |
| 71 continue | |
| 72 raw_test, dependency = test_desc.split('<') | |
| 73 if dependency != '': | |
| 74 dependency = raw_test.split('/')[0] + '/' + dependency | |
| 75 else: | |
| 76 dependency = None | |
| 77 test = testcase.TestCase(self, raw_test, dependency=dependency) | |
| 78 tests.append(test) | 69 tests.append(test) |
| 79 tests.sort() | 70 tests.sort() |
| 80 return tests | 71 return tests |
| 81 | 72 |
| 82 def GetFlagsForTestCase(self, testcase, context): | 73 def GetFlagsForTestCase(self, testcase, context): |
| 83 testname = testcase.path.split(os.path.sep)[-1] | 74 testname = testcase.path.split(os.path.sep)[-1] |
| 84 serialization_file = os.path.join(self.serdes_dir, "serdes_" + testname) | 75 serialization_file = os.path.join(self.serdes_dir, "serdes_" + testname) |
| 85 serialization_file += ''.join(testcase.flags).replace('-', '_') | 76 serialization_file += ''.join(testcase.flags).replace('-', '_') |
| 86 return (testcase.flags + [testcase.path] + context.mode_flags + | 77 return (testcase.flags + [testcase.path] + context.mode_flags + |
| 87 ["--testing_serialization_file=" + serialization_file]) | 78 ["--testing_serialization_file=" + serialization_file]) |
| 88 | 79 |
| 89 def shell(self): | 80 def shell(self): |
| 90 return "cctest" | 81 return "cctest" |
| 91 | 82 |
| 92 | 83 |
| 93 def GetSuite(name, root): | 84 def GetSuite(name, root): |
| 94 return CcTestSuite(name, root) | 85 return CcTestSuite(name, root) |
| OLD | NEW |