[autotest] Force to collect /var/log if test is failed with device error.

When test running in DUT is aborted and does not get a chance to run post test
hooks, diff of /var/log can not be copied to resuts folder and autoserv will
not be able to collect any log from the DUT.

This CL saves the device error failure flag to job.failed_with_device_error.
Autoserv uses this flag to determine whether to collect crash info (through
server/control_segments/crashinfo), which will collect all files in /var/log.

BUG=chromium:271703
TEST=run autoserv in local setup. Manually reboot DUT during the middle of a
test, then confirm the results collected has content in crashinfo.[DUT name].

Change-Id: I1a3757b8933fe60deea75728e867033eeb86c7cd
Reviewed-on: https://gerrit.chromium.org/gerrit/66013
Commit-Queue: Dan Shi <dshi@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
4 files changed