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

Unified Diff: client/site_tests/logging_CrashSender/logging_CrashSender.py

Issue 5763003: autotest: Test that logs can be sent when processes crash (Closed) Base URL: http://git.chromium.org/git/autotest.git@master
Patch Set: Respond to review Created 10 years 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 | « client/bin/site_crash_test.py ('k') | client/site_tests/logging_UserCrash/logging_UserCrash.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/site_tests/logging_CrashSender/logging_CrashSender.py
diff --git a/client/site_tests/logging_CrashSender/logging_CrashSender.py b/client/site_tests/logging_CrashSender/logging_CrashSender.py
index 40586ab7e01cf8b7356ba722a2689b5d2ed60abb..72fc5c07e33dc192d43e9f2f42420f3207c841d2 100644
--- a/client/site_tests/logging_CrashSender/logging_CrashSender.py
+++ b/client/site_tests/logging_CrashSender/logging_CrashSender.py
@@ -32,7 +32,7 @@ class logging_CrashSender(site_crash_test.CrashTest):
raise error.TestFail('Expected hwclass %s in output' % hwclass)
- def _check_simple_minidump_send(self, report):
+ def _check_simple_minidump_send(self, report, log_path=None):
result = self._call_sender_one_crash(report=report)
if (result['report_exists'] or
result['rate_count'] != 1 or
@@ -45,6 +45,8 @@ class logging_CrashSender(site_crash_test.CrashTest):
result['exec_name'] != 'fake' or
not 'Version: my_ver' in result['output']):
raise error.TestFail('Simple minidump send failed')
+ if log_path and not ('log: @%s' % log_path) in result['output']:
+ raise error.TestFail('Minidump send missing log')
self._check_hardware_info(result)
@@ -53,6 +55,15 @@ class logging_CrashSender(site_crash_test.CrashTest):
self._check_simple_minidump_send(None)
+ def _test_sender_simple_minidump_with_log(self):
+ """Test that a minidump report with an auxiliary log is sent."""
+ dmp_path = self.write_crash_dir_entry('fake.dmp', '')
+ log_path = self.write_crash_dir_entry('fake.log', '')
+ meta_path = self.write_fake_meta('fake.meta', 'fake', dmp_path,
+ log=log_path)
+ self._check_simple_minidump_send(meta_path, log_path)
+
+
def _shift_file_mtime(self, path, delta):
statinfo = os.stat(path)
os.utime(path, (statinfo.st_atime,
@@ -262,6 +273,7 @@ class logging_CrashSender(site_crash_test.CrashTest):
self.run_crash_tests([
'sender_simple_minidump',
'sender_simple_old_minidump',
+ 'sender_simple_minidump_with_log',
'sender_simple_kernel_crash',
'sender_pausing',
'sender_reports_disabled',
« no previous file with comments | « client/bin/site_crash_test.py ('k') | client/site_tests/logging_UserCrash/logging_UserCrash.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698