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

Unified Diff: test/mjsunit/testcfg.py

Issue 3164023: Refactor the tools/test.py script and related testcfg.py files.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/message/testcfg.py ('k') | test/mozilla/testcfg.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/testcfg.py
===================================================================
--- test/mjsunit/testcfg.py (revision 5302)
+++ test/mjsunit/testcfg.py (working copy)
@@ -31,7 +31,6 @@
import re
import tempfile
-MJSUNIT_DEBUG_FLAGS = ['--enable-slow-asserts', '--debug-code', '--verify-heap']
FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")
FILES_PATTERN = re.compile(r"//\s+Files:(.*)")
SELF_SCRIPT_PATTERN = re.compile(r"//\s+Env: TEST_FILE_NAME")
@@ -40,10 +39,9 @@
class MjsunitTestCase(test.TestCase):
def __init__(self, path, file, mode, context, config):
- super(MjsunitTestCase, self).__init__(context, path)
+ super(MjsunitTestCase, self).__init__(context, path, mode)
self.file = file
self.config = config
- self.mode = mode
self.self_script = False
def GetLabel(self):
@@ -53,13 +51,11 @@
return self.path[-1]
def GetCommand(self):
- result = [self.config.context.GetVm(self.mode)]
+ result = self.config.context.GetVmCommand(self, self.mode)
source = open(self.file).read()
flags_match = FLAGS_PATTERN.search(source)
if flags_match:
result += flags_match.group(1).strip().split()
- if self.mode == 'debug':
- result += MJSUNIT_DEBUG_FLAGS
additional_files = []
files_match = FILES_PATTERN.search(source);
# Accept several lines of 'Files:'
@@ -94,8 +90,8 @@
self.self_script = self_script
return self_script
- def Cleanup(self):
- if self.self_script:
+ def AfterRun(self, result):
+ if self.self_script and (not result.HasPreciousOutput()):
test.CheckedUnlink(self.self_script)
class MjsunitTestConfiguration(test.TestConfiguration):
« no previous file with comments | « test/message/testcfg.py ('k') | test/mozilla/testcfg.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698