summaryrefslogtreecommitdiffstats
path: root/test/sputnik/testcfg.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/sputnik/testcfg.py')
-rw-r--r--test/sputnik/testcfg.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/sputnik/testcfg.py b/test/sputnik/testcfg.py
index 65923822..f7a5edcc 100644
--- a/test/sputnik/testcfg.py
+++ b/test/sputnik/testcfg.py
@@ -36,9 +36,8 @@ import time
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 @@ class SputnikTestCase(test.TestCase):
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