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 26 matching lines...) Expand all Loading... |
37 class CcTestSuite(testsuite.TestSuite): | 37 class CcTestSuite(testsuite.TestSuite): |
38 | 38 |
39 def __init__(self, name, root): | 39 def __init__(self, name, root): |
40 super(CcTestSuite, self).__init__(name, root) | 40 super(CcTestSuite, self).__init__(name, root) |
41 if utils.IsWindows(): | 41 if utils.IsWindows(): |
42 build_dir = "build" | 42 build_dir = "build" |
43 else: | 43 else: |
44 build_dir = "out" | 44 build_dir = "out" |
45 self.serdes_dir = os.path.normpath( | 45 self.serdes_dir = os.path.normpath( |
46 os.path.join(root, "..", "..", build_dir, ".serdes")) | 46 os.path.join(root, "..", "..", build_dir, ".serdes")) |
| 47 |
| 48 def global_initialization(self): |
| 49 # This is only called once per machine, while init above is called once per |
| 50 # process. |
47 if os.path.exists(self.serdes_dir): | 51 if os.path.exists(self.serdes_dir): |
48 shutil.rmtree(self.serdes_dir, True) | 52 shutil.rmtree(self.serdes_dir, True) |
49 os.makedirs(self.serdes_dir) | 53 os.makedirs(self.serdes_dir) |
50 | 54 |
51 def ListTests(self, context): | 55 def ListTests(self, context): |
52 shell = os.path.abspath(os.path.join(context.shell_dir, self.shell())) | 56 shell = os.path.abspath(os.path.join(context.shell_dir, self.shell())) |
53 if utils.IsWindows(): | 57 if utils.IsWindows(): |
54 shell += ".exe" | 58 shell += ".exe" |
55 output = commands.Execute(context.command_prefix + | 59 output = commands.Execute(context.command_prefix + |
56 [shell, "--list"] + | 60 [shell, "--list"] + |
(...skipping 24 matching lines...) Expand all Loading... |
81 serialization_file += ''.join(testcase.flags).replace('-', '_') | 85 serialization_file += ''.join(testcase.flags).replace('-', '_') |
82 return (testcase.flags + [testcase.path] + context.mode_flags + | 86 return (testcase.flags + [testcase.path] + context.mode_flags + |
83 ["--testing_serialization_file=" + serialization_file]) | 87 ["--testing_serialization_file=" + serialization_file]) |
84 | 88 |
85 def shell(self): | 89 def shell(self): |
86 return "cctest" | 90 return "cctest" |
87 | 91 |
88 | 92 |
89 def GetSuite(name, root): | 93 def GetSuite(name, root): |
90 return CcTestSuite(name, root) | 94 return CcTestSuite(name, root) |
OLD | NEW |