autotest_SyncCount: Fix failure message
BUG=chromium:873220
TEST=None
Change-Id: I6368ef6ee82e1316048a50fd63c136ae12bae44c
Reviewed-on: https://chromium-review.googlesource.com/1171511
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Xixuan Wu <xixuan@chromium.org>
diff --git a/server/site_tests/autotest_SyncCount/control b/server/site_tests/autotest_SyncCount/control
index 95a0246..b1cc6cd 100644
--- a/server/site_tests/autotest_SyncCount/control
+++ b/server/site_tests/autotest_SyncCount/control
@@ -14,6 +14,7 @@
"""
from autotest_lib.server import utils as server_utils
+from autotest_lib.server import site_utils
def run(ntuple):
@@ -22,8 +23,9 @@
ntuples, failures = server_utils.form_ntuples_from_machines(
machines, SYNC_COUNT)
-for failure in failures:
- job.record('FAIL', None, str(failure))
+for machine, failure in failures:
+ hostname = site_utils.get_hostname_from_machine(machine)
+ job.record('FAIL', None, '%s:%s' % (hostname, failure))
# Use log=False in parallel_simple to avoid an exception in setting up
# the incremental parser when SYNC_COUNT > 1.