When the archiver fails for any reason, write a .archiver_failed file to the 
results dir.

Signed-off-by: Steve Howard <[email protected]>

--- autotest/scheduler/monitor_db.py    2010-01-13 12:58:42.000000000 -0800
+++ autotest/scheduler/monitor_db.py    2010-01-13 20:43:26.000000000 -0800
@@ -2497,6 +2497,8 @@
 
 
 class ArchiveResultsTask(SelfThrottledPostJobTask):
+    _ARCHIVING_FAILED_FILE = '.archiver_failed'
+
     def __init__(self, queue_entries):
         super(ArchiveResultsTask, self).__init__(queue_entries,
                                                  
log_file_name='.archiving.log')
@@ -2531,6 +2533,14 @@
 
     def epilog(self):
         super(ArchiveResultsTask, self).epilog()
+        if not self.success:
+            failed_file = os.path.join(self._working_directory(),
+                                       self._ARCHIVING_FAILED_FILE)
+            paired_process = self._paired_with_monitor().get_process()
+            _drone_manager.write_lines_to_file(
+                    failed_file, ['Archiving failed with exit code %s'
+                                  % self.monitor.exit_code()],
+                    paired_with_process=paired_process)
         self._set_all_statuses(self._final_status())
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to