Test for developer images using crossystem.
Previously, testing for developer builds was done by checking for
the existence of the file /root/.dev_mode. That file has been
deprecated for some time; the update engine is one of the last
hold-outs still using it.
This changes the IsOfficialBuild() test to use the crossystem
library to test for 'cros_debug' on the kernel command line.
Additionally, older callers that invoked the 'crossystem' command
as a subprocess have been converted to use the library instead
BUG=chromium:308678
TEST=run update_engine_client on a host without /root/.dev_mode.
TEST=unit tests
CQ-DEPEND=CL:175039
Change-Id: I7fd472e2f28f9c18d5fbdd3258632368f2b63313
Reviewed-on: https://chromium-review.googlesource.com/175050
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
2 files changed