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

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

Issue 6821069: Revert 7581, you can't have try except finally toghetter until python 2.5 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 8 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/sputnik/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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 'value': value.replace('\\', '\\\\').replace('\'', '\\\'') } 100 'value': value.replace('\\', '\\\\').replace('\'', '\\\'') }
101 try: 101 try:
102 os.write(fd_self_script, MakeJsConst('TEST_FILE_NAME', self.file)) 102 os.write(fd_self_script, MakeJsConst('TEST_FILE_NAME', self.file))
103 except IOError, e: 103 except IOError, e:
104 test.PrintError("write() " + str(e)) 104 test.PrintError("write() " + str(e))
105 os.close(fd_self_script) 105 os.close(fd_self_script)
106 self.self_script = self_script 106 self.self_script = self_script
107 return self_script 107 return self_script
108 108
109 def AfterRun(self, result): 109 def AfterRun(self, result):
110 if self.self_script and (result is None or (not result.HasPreciousOutput())) : 110 if self.self_script and (not result.HasPreciousOutput()):
111 test.CheckedUnlink(self.self_script) 111 test.CheckedUnlink(self.self_script)
112 112
113 class MjsunitTestConfiguration(test.TestConfiguration): 113 class MjsunitTestConfiguration(test.TestConfiguration):
114 114
115 def __init__(self, context, root): 115 def __init__(self, context, root):
116 super(MjsunitTestConfiguration, self).__init__(context, root) 116 super(MjsunitTestConfiguration, self).__init__(context, root)
117 117
118 def Ls(self, path): 118 def Ls(self, path):
119 def SelectTest(name): 119 def SelectTest(name):
120 return name.endswith('.js') and name != 'mjsunit.js' 120 return name.endswith('.js') and name != 'mjsunit.js'
(...skipping 26 matching lines...) Expand all
147 147
148 def GetTestStatus(self, sections, defs): 148 def GetTestStatus(self, sections, defs):
149 status_file = join(self.root, 'mjsunit.status') 149 status_file = join(self.root, 'mjsunit.status')
150 if exists(status_file): 150 if exists(status_file):
151 test.ReadConfigurationInto(status_file, sections, defs) 151 test.ReadConfigurationInto(status_file, sections, defs)
152 152
153 153
154 154
155 def GetConfiguration(context, root): 155 def GetConfiguration(context, root):
156 return MjsunitTestConfiguration(context, root) 156 return MjsunitTestConfiguration(context, root)
OLDNEW
« no previous file with comments | « no previous file | test/sputnik/testcfg.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698