[autotest] Force dut to update package if test run is from test_that

test_that set use_package to False to avoid the dut to pull packages from
job_repo_url, which is set in autotest database. On the dut, autotest may not
update local package if the checksum of local cached package does not change.
The checksum is cached in [autodir]/packages.checksum.

This causes an issue for test_that. When autotest runs in dut, the test started
by test_that does not have job_repo_url, thus no new packages.checksum can be
pulled. Then the test decides that the local cache of test package's checksum
matches the existing packages.checksum, and will not pull new package from
autoserv.

This CL forces dut to use the new package from autoserv by deleting
packages.checksum file in the dut, if autotest client code is not updated using
packaging.

BUG=chromium:475261
TEST=local test_that run, make sure local test code change is used in dut.

Change-Id: Iae6bc6e2b62f2800b8f6df1561fd1f2c49047c93
Reviewed-on: https://chromium-review.googlesource.com/265833
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Puthikorn Voravootivat <puthik@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
3 files changed