[autotest] diagnose_job() needs a server url for a job as a parameter

link_job() of autotest_lib.server.cros.dynamic_suite.reporting_utils looks
up a configuration file to get the url for a job when a second parameter
(i.e., instance_server) is None. The function reads the value of Section
"SERVER" and Key "hostname" which is "cautotest" by default.

diagnose_job() of autotest_lib.site_utils.diagnosis_utils calls link_job()
without the second parameter (i.e., instance_server) for incomplete jobs.
Therefore, the url for incomplete jobs could be printed incorrectly.

A second parameter is added to diagnose_job() such that the server url for
a job can be given, and it is passed to link_job().

BUG=chromium:370976
TEST=Ran run_suite.py and check if host name for incomplete jobs are shown
correctly.

Change-Id: If63a89daed67313f8f4991121531747865ca5155
Reviewed-on: https://chromium-review.googlesource.com/210680
Reviewed-by: Mungyung Ryu <mkryu@chromium.org>
Tested-by: Mungyung Ryu <mkryu@chromium.org>
Reviewed-by: Prashanth B <beeps@chromium.org>
Commit-Queue: Mungyung Ryu <mkryu@chromium.org>
2 files changed