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

Unified Diff: client/cros/crash_test.py

Issue 6557003: Modify autotest to support preserving minidumps generated during tests. (Closed) Base URL: http://git.chromium.org/git/autotest.git@master
Patch Set: Addressed code review feedbacks. Created 9 years, 10 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 | « no previous file | server/site_crashcollect.py » ('j') | server/site_crashcollect.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/cros/crash_test.py
diff --git a/client/cros/crash_test.py b/client/cros/crash_test.py
index 774f5bbf9050e0d221b343345ccb8ac98a75bbf9..069fdde62a3ecdf20026480a38291ba9b3816b46 100644
--- a/client/cros/crash_test.py
+++ b/client/cros/crash_test.py
@@ -17,6 +17,7 @@ class CrashTest(test.test):
_CRASH_SENDER_PATH = '/sbin/crash_sender'
_CRASH_SENDER_RATE_DIR = '/var/lib/crash_sender'
_CRASH_SENDER_RUN_PATH = '/var/run/crash_sender.pid'
+ _CRASH_TEST_IN_PROGRESS = '/tmp/crash-test-in-progress'
_MOCK_CRASH_SENDING = '/tmp/mock-crash-sending'
_PAUSE_FILE = '/var/lib/crash_sender_paused'
_SYSTEM_CRASH_DIR = '/var/spool/crash'
@@ -81,6 +82,14 @@ class CrashTest(test.test):
utils.system('rm -f "%s"' % (self._CONSENT_FILE))
+ def _set_crash_test_in_progress(self, in_progress):
+ if in_progress:
+ utils.open_write_close(self._CRASH_TEST_IN_PROGRESS, 'in-progress')
+ logging.info('Created ' + self._CRASH_TEST_IN_PROGRESS)
+ else:
+ utils.system('rm -f "%s"' % (self._CRASH_TEST_IN_PROGRESS))
+
+
def _get_pushed_consent_file_path(self):
return os.path.join(self.bindir, 'pushed_consent')
@@ -313,6 +322,7 @@ class CrashTest(test.test):
self._leave_crash_sending = True
self._automatic_consent_saving = True
self.enable_crash_filtering('none')
+ self._set_crash_test_in_progress(True)
def cleanup(self):
@@ -323,6 +333,7 @@ class CrashTest(test.test):
if self._automatic_consent_saving:
self._pop_consent()
self.disable_crash_filtering()
+ self._set_crash_test_in_progress(False)
test.test.cleanup(self)
« no previous file with comments | « no previous file | server/site_crashcollect.py » ('j') | server/site_crashcollect.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698