aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Desprez <jdesprez@google.com>2024-02-19 20:08:41 -0800
committerTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2024-02-20 06:59:23 +0000
commit63598edc929c8ffa0b7f10e12f1acef2fd19a615 (patch)
tree253ab09d677719339f5bf39d626cda4526596321
parent9ddd2e56dc3a5aac52ad9ca8a09a801d6b18f4b6 (diff)
downloadtradefederation-63598edc929c8ffa0b7f10e12f1acef2fd19a615.tar.gz
In case of same build flashing, still clean up files
When we skip update due to same build, ensure we still clean up the files. Test: presubmit Bug: 323764900 Change-Id: I9afefba61188aa42de2bd57300533e6e8406e0e4
-rw-r--r--src/com/android/tradefed/util/image/IncrementalImageUtil.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/com/android/tradefed/util/image/IncrementalImageUtil.java b/src/com/android/tradefed/util/image/IncrementalImageUtil.java
index 57e16c4ac..3d0c33abe 100644
--- a/src/com/android/tradefed/util/image/IncrementalImageUtil.java
+++ b/src/com/android/tradefed/util/image/IncrementalImageUtil.java
@@ -464,6 +464,15 @@ public class IncrementalImageUtil {
FileUtil.deleteFile(mSrcBootloader);
FileUtil.deleteFile(mSrcBaseband);
}
+ // In case of same build flashing, we should clean the setup operation
+ if (mParallelSetup != null) {
+ try {
+ mParallelSetup.join();
+ } catch (InterruptedException e) {
+ CLog.e(e);
+ }
+ mParallelSetup.cleanUpFiles();
+ }
}
private void blockCompare(File srcImage, File targetImage, File workDir) {