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

Unified Diff: test/sputnik/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/mozilla/testcfg.py ('k') | tools/test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/sputnik/testcfg.py
===================================================================
--- test/sputnik/testcfg.py (revision 5302)
+++ test/sputnik/testcfg.py (working copy)
@@ -36,9 +36,8 @@
class SputnikTestCase(test.TestCase):
def __init__(self, case, path, context, mode):
- super(SputnikTestCase, self).__init__(context, path)
+ super(SputnikTestCase, self).__init__(context, path, mode)
self.case = case
- self.mode = mode
self.tmpfile = None
self.source = None
@@ -56,12 +55,13 @@
self.tmpfile.Write(self.GetSource())
self.tmpfile.Close()
- def AfterRun(self):
- self.tmpfile.Dispose()
+ def AfterRun(self, result):
+ # Dispose the temporary file if everything looks okay.
+ if not result.HasPreciousOutput(): self.tmpfile.Dispose()
self.tmpfile = None
def GetCommand(self):
- result = [self.context.GetVm(self.mode)]
+ result = self.context.GetVmCommand(self, self.mode)
result.append(self.tmpfile.name)
return result
« no previous file with comments | « test/mozilla/testcfg.py ('k') | tools/test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698