cheets_CTS/GTS: Offload also for WARN/FAIL jobs.

We use WARN as PASS with retries, so those result are also
valid inputs for APFE submission. FAIL results are also
useful for the CTS dashboard to track pass/fail history.


Change-Id: Ice8d8c8e9a55ce3e074ac81c99228f3e7220e3cc
Commit-Queue: Kazuhiro Inaba <>
Commit-Queue: Rohit Makasana <>
Tested-by: Kazuhiro Inaba <>
Auto-Submit: Kazuhiro Inaba <>
Reviewed-by: Rohit Makasana <>
(cherry picked from commit d0a49057e5284c62f486f6ce4fb2e0e64f185d78)
Tested-by: Rohit Makasana <>
diff --git a/server/cros/tradefed/ b/server/cros/tradefed/
index d56c958..ab0de92 100644
--- a/server/cros/tradefed/
+++ b/server/cros/tradefed/
@@ -176,11 +176,6 @@
         self._hard_reboot_on_failure = hard_reboot_on_failure
-    def postprocess(self):
-        """Postprocess: synchronous offloads and performance data"""
-        self._output_perf()
-        self._prepare_synchronous_offloads()
     def _output_perf(self):
         """Output performance values."""
         base = self._default_tradefed_base_dir()
@@ -229,6 +224,13 @@
     def cleanup(self):
         """Cleans up any dirtied state."""
+        # We also run a postprocess result and performance data
+        # offloading here so that WARN and FAIL runs also run the
+        # steps. postprocess() method only runs for PASSing jobs.
+        self._prepare_synchronous_offloads()
+        self._output_perf()
             # Clean up test data that may not be deletable on previous
             # ChromeOS versions. See b/170276268.