[autotest] Make provision failures bubble up the reason they failed.

This is relying on some very weird semantics to get the SERVER_JOB
ignored, but this is the best that I can figure out how to do without
massive code changes.  Proper solutions would be to either:
1) Add some way for a job.run_test() to return the reason
2) Change the scheduler to decide success/failure for a special task
by running the parser on the status.log.

The second would likely be cleaner, but also would be a non-trivial
adjustment to the scheduler, would impact run times, and would nearly
add a Parsing state in between all of the normal state transitions.

status.log now looks like:
START ----  provision timestamp=1386286285  localtime=Dec 05 15:31:25
  START provision_AutoUpdate  provision_AutoUpdate  timestamp=1386286285 localtime=Dec 05 15:31:25
    FAIL  provision_AutoUpdate  provision_AutoUpdate timestamp=1386286310  localtime=Dec 05 15:31:50 A large potato fell on the DUT
  END FAIL  provision_AutoUpdate  provision_AutoUpdate timestamp=1386286310  localtime=Dec 05 15:31:50
END FAIL  ----  provision timestamp=1386286310  localtime=Dec 05 15:31:50
INFO  ----  ----  timestamp=1386286310  job_abort_reason= localtime=Dec 05 15:31:50

run_suite output of provision_AutoUpdate raising an exception:
Suite prep   [ PASSED ]
provision    [ FAILED ]
provision      FAIL: A large potato fell on the DUT

BUG=chromium:317719
TEST=Modified provision_AutoUpdate to raise an exception, and ran a
suite that would cause provisioning.  Test results came back with the
exception message that was raised from within provision_AutoUpdate.

Change-Id: If1a1b1a9a854f327c94f8ca7b3d1bc759599fedf
Reviewed-on: https://chromium-review.googlesource.com/179010
Reviewed-by: Alex Miller <milleral@chromium.org>
Tested-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>
1 file changed