In retrospect, this sounds stupid. But when I "cros flash" a test build to a DUT and then "cros deploy" fails the next day, my first thought is cros tools functionality has been broken.
"Something Bad"(tm) happened to the stateful partition and /usr/local/bin is stored on the stateful partition - that's not obvious unless one has looked at /proc/mount carefully before. I know (and incorrectly assumed only) /var is the mount point for stateful partition.
powerwash and factory-reset-like operations will blow away everything stateful. That's expected behavior. But if the target is a test build, that needs to be somehow restored in order to run python or emerge (locally) on the DUT.
"cros deploy" and other tools (e.g. test_that) can bridge this ignorance gap by just telling the caller when /usr/local/bin is missing and how to restore it for the build flavor that is installed (perhaps even verify there is a test-build installed on the machine as indicated by /etc/lsb-release).
Comment 1 by aut...@google.com
, Feb 9 2017