toolchain-utils: Delete temporary chroot image after verification step.

When a local image is outside the chroot, it is temporarily copied into the
chroot so that it can be mounted by chroot scripts. Changed the logic to
delay the cleanup of the temporary copy until after the verification step.
The image needs to be mounted once again during verification.

Didn't catch this bug earlier, as the images were cached inside the chroot by
previous failed runs.

BUG=b:79376118
TEST=Tested with crosperf, two local images and a clean chroot without any
cached images.

Change-Id: I700f9aa0d9827aa349e75ef7b6b22618baf26fa9
Reviewed-on: https://chromium-review.googlesource.com/1062330
Commit-Ready: Gabriel Marin <gmx@chromium.org>
Tested-by: Gabriel Marin <gmx@chromium.org>
Reviewed-by: Gabriel Marin <gmx@chromium.org>
Reviewed-by: Yunlian Jiang <yunlian@chromium.org>
1 file changed