Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: test/cctest/testcfg.py

Issue 186006: Add verification flags to debug mjsunit test runs. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/testcfg.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 13 matching lines...) Expand all
24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 import test 28 import test
29 import os 29 import os
30 from os.path import join, dirname, exists 30 from os.path import join, dirname, exists
31 import platform 31 import platform
32 import utils 32 import utils
33 33
34 DEBUG_FLAGS = ['--enable-slow-asserts', '--debug-code', '--verify-heap'] 34 CCTEST_DEBUG_FLAGS = ['--enable-slow-asserts', '--debug-code', '--verify-heap']
35 35
36 36
37 class CcTestCase(test.TestCase): 37 class CcTestCase(test.TestCase):
38 38
39 def __init__(self, path, executable, mode, raw_name, dependency, context): 39 def __init__(self, path, executable, mode, raw_name, dependency, context):
40 super(CcTestCase, self).__init__(context, path) 40 super(CcTestCase, self).__init__(context, path)
41 self.executable = executable 41 self.executable = executable
42 self.mode = mode 42 self.mode = mode
43 self.raw_name = raw_name 43 self.raw_name = raw_name
44 self.dependency = dependency 44 self.dependency = dependency
45 45
46 def GetLabel(self): 46 def GetLabel(self):
47 return "%s %s %s" % (self.mode, self.path[-2], self.path[-1]) 47 return "%s %s %s" % (self.mode, self.path[-2], self.path[-1])
48 48
49 def GetName(self): 49 def GetName(self):
50 return self.path[-1] 50 return self.path[-1]
51 51
52 def BuildCommand(self, name): 52 def BuildCommand(self, name):
53 serialization_file = join('obj', 'test', self.mode, 'serdes') 53 serialization_file = join('obj', 'test', self.mode, 'serdes')
54 serialization_file += '_' + self.GetName() 54 serialization_file += '_' + self.GetName()
55 serialization_option = '--testing_serialization_file=' + serialization_file 55 serialization_option = '--testing_serialization_file=' + serialization_file
56 result = [ self.executable, name, serialization_option ] 56 result = [ self.executable, name, serialization_option ]
57 if self.mode == 'debug': 57 if self.mode == 'debug':
58 result += DEBUG_FLAGS 58 result += CCTEST_DEBUG_FLAGS
59 return result 59 return result
60 60
61 def GetCommand(self): 61 def GetCommand(self):
62 return self.BuildCommand(self.raw_name) 62 return self.BuildCommand(self.raw_name)
63 63
64 def Run(self): 64 def Run(self):
65 if self.dependency != '': 65 if self.dependency != '':
66 dependent_command = self.BuildCommand(self.dependency) 66 dependent_command = self.BuildCommand(self.dependency)
67 output = self.RunCommand(dependent_command) 67 output = self.RunCommand(dependent_command)
68 if output.HasFailed(): 68 if output.HasFailed():
(...skipping 30 matching lines...) Expand all
99 return result 99 return result
100 100
101 def GetTestStatus(self, sections, defs): 101 def GetTestStatus(self, sections, defs):
102 status_file = join(self.root, 'cctest.status') 102 status_file = join(self.root, 'cctest.status')
103 if exists(status_file): 103 if exists(status_file):
104 test.ReadConfigurationInto(status_file, sections, defs) 104 test.ReadConfigurationInto(status_file, sections, defs)
105 105
106 106
107 def GetConfiguration(context, root): 107 def GetConfiguration(context, root):
108 return CcTestConfiguration(context, root) 108 return CcTestConfiguration(context, root)
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/testcfg.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698