Bug 1057046 - Remove temporary local folder used for storing minidumps by B2GDeviceRunner. r=ahalberstadt
authorDave Hunt <dave.hunt@gmail.com>
Thu, 21 Aug 2014 14:05:00 +0200
changeset 201414 7efb9d88a60ec0b1f286c1bd67cc74d2df05a13b
parent 201413 f66f7b5533f9cc3862e3075316d66d5707c19bea
child 201415 7a3ee3395e46be54a4643fb0acad8e8da1108d56
push id27369
push userryanvm@gmail.com
push dateMon, 25 Aug 2014 20:25:41 +0000
treeherdermozilla-central@18901d4f3edd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahalberstadt
bugs1057046
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1057046 - Remove temporary local folder used for storing minidumps by B2GDeviceRunner. r=ahalberstadt
testing/mozbase/mozrunner/mozrunner/base/device.py
--- a/testing/mozbase/mozrunner/mozrunner/base/device.py
+++ b/testing/mozbase/mozrunner/mozrunner/base/device.py
@@ -6,16 +6,18 @@ from __future__ import print_function
 
 import datetime
 import re
 import signal
 import sys
 import tempfile
 import time
 
+import mozfile
+
 from .runner import BaseRunner
 from ..devices import Emulator
 
 class DeviceRunner(BaseRunner):
     """
     The base runner class used for running gecko on
     remote devices (or emulators), such as B2G.
     """
@@ -123,13 +125,16 @@ class DeviceRunner(BaseRunner):
         print(msg % (self.last_test, timeout))
         self.check_for_crashes()
 
     def on_finish(self):
         self.check_for_crashes()
 
     def check_for_crashes(self):
         dump_dir = self.device.pull_minidumps()
-        BaseRunner.check_for_crashes(self, dump_directory=dump_dir, test_name=self.last_test)
+        crashed = BaseRunner.check_for_crashes(self, dump_directory=dump_dir,
+                                               test_name=self.last_test)
+        mozfile.remove(dump_dir)
+        return crashed
 
     def cleanup(self, *args, **kwargs):
         BaseRunner.cleanup(self, *args, **kwargs)
         self.device.cleanup()