aboutsummaryrefslogtreecommitdiff
path: root/src/com/android/tradefed/targetprep
diff options
context:
space:
mode:
authorJed Estep <jestep@google.com>2016-09-27 17:42:01 -0700
committerJed Estep <jestep@google.com>2016-09-27 17:42:01 -0700
commit6c12b917c22036dcb93bdbb907351fa603d40961 (patch)
tree51bbbfdcff38e9073a4e7153d2b851a020dffcd2 /src/com/android/tradefed/targetprep
parent04c21e1506190cd094c1b19260829de2134d2203 (diff)
downloadtradefederation-6c12b917c22036dcb93bdbb907351fa603d40961.tar.gz
Enable OTA build info to report its target build
For some OTA tests, the instance of OtaDeviceBuildInfo needs to report its 'primary' build as the target build rather than the source build. Bug: 31777654 Change-Id: I6ed7f93e558fe740d85b2bbe1c91e6064c40e177
Diffstat (limited to 'src/com/android/tradefed/targetprep')
-rw-r--r--src/com/android/tradefed/targetprep/DeviceFlashPreparer.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/com/android/tradefed/targetprep/DeviceFlashPreparer.java b/src/com/android/tradefed/targetprep/DeviceFlashPreparer.java
index c0276b7a2..ed265017d 100644
--- a/src/com/android/tradefed/targetprep/DeviceFlashPreparer.java
+++ b/src/com/android/tradefed/targetprep/DeviceFlashPreparer.java
@@ -70,6 +70,13 @@ public abstract class DeviceFlashPreparer implements ITargetCleaner {
"specify if system flavor should not be checked after flash")
private boolean mSkipPostFlashFlavorCheck = false;
+ /*
+ * Used for update testing
+ */
+ @Option(name = "skip-post-flash-build-id-check", description =
+ "specify if build ID should not be checked after flash")
+ private boolean mSkipPostFlashBuildIdCheck = false;
+
@Option(name = "wipe-skip-list", description =
"list of /data subdirectories to NOT wipe when doing UserDataFlashOption.TESTS_ZIP")
private Collection<String> mDataWipeSkipList = new ArrayList<>();
@@ -304,8 +311,10 @@ public abstract class DeviceFlashPreparer implements ITargetCleaner {
// Need to use deviceBuild.getDeviceBuildId instead of getBuildId because the build info
// could be an AppBuildInfo and return app build id. Need to be more explicit that we
// check for the device build here.
- checkBuildAttribute(deviceBuild.getDeviceBuildId(), device.getBuildId(),
- device.getSerialNumber());
+ if (!mSkipPostFlashBuildIdCheck) {
+ checkBuildAttribute(deviceBuild.getDeviceBuildId(), device.getBuildId(),
+ device.getSerialNumber());
+ }
if (!mSkipPostFlashFlavorCheck) {
checkBuildAttribute(deviceBuild.getDeviceBuildFlavor(), device.getBuildFlavor(),
device.getSerialNumber());