diff options
author | android-build-prod (mdb) <android-build-team-robot@google.com> | 2021-04-22 20:06:57 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-04-22 20:06:57 +0000 |
commit | 4444fb5e5213dbb75f1df8978a59fd6d1fda3ae5 (patch) | |
tree | b29591f113b114603fc0d4a7ba10846f609dab90 | |
parent | 5cdc9141d34335251819d9b2aea5b893f121715a (diff) | |
parent | 1195361138790b5af40eefdd05b9a6258d1ffc9a (diff) | |
download | core-android-vts-10.0_r11.tar.gz |
Merge "Snap for 7303432 from 21ef3ae3fd1dd2076c3b97efa09b3d58e799ce9f to android10-tests-release" into android10-tests-releaseandroid-vts-10.0_r9android-vts-10.0_r8android-vts-10.0_r16android-vts-10.0_r15android-vts-10.0_r14android-vts-10.0_r13android-vts-10.0_r12android-vts-10.0_r11android-vts-10.0_r10android-cts-10.0_r9android-cts-10.0_r16android-cts-10.0_r15android-cts-10.0_r14android-cts-10.0_r13android-cts-10.0_r12android-cts-10.0_r11android-cts-10.0_r10android10-tests-release
-rw-r--r-- | fs_mgr/liblp/builder_test.cpp | 9 | ||||
-rw-r--r-- | fs_mgr/liblp/io_test.cpp | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/fs_mgr/liblp/builder_test.cpp b/fs_mgr/liblp/builder_test.cpp index 46bfe9238..328ac8719 100644 --- a/fs_mgr/liblp/builder_test.cpp +++ b/fs_mgr/liblp/builder_test.cpp @@ -18,12 +18,14 @@ #include <gmock/gmock.h> #include <gtest/gtest.h> #include <liblp/builder.h> +#include <android-base/properties.h> #include "utility.h" using namespace std; using namespace android::fs_mgr; using ::testing::ElementsAre; +using android::base::GetProperty; class Environment : public ::testing::Environment { public: @@ -442,6 +444,13 @@ TEST_F(BuilderTest, MetadataTooLarge) { } TEST_F(BuilderTest, block_device_info) { + //This test requires dynamic partition which is not mandatory for + //Automotive in Android Q or lower + std::string api_level = GetProperty("ro.build.version.sdk",""); + std::string hw_type = GetProperty("ro.hardware.type",""); + if (std::stoi(api_level) <= 29 && hw_type == "automotive") { + return; + } PartitionOpener opener; BlockDeviceInfo device_info; diff --git a/fs_mgr/liblp/io_test.cpp b/fs_mgr/liblp/io_test.cpp index fcef1f0d0..8e7a28890 100644 --- a/fs_mgr/liblp/io_test.cpp +++ b/fs_mgr/liblp/io_test.cpp @@ -21,6 +21,7 @@ #include <android-base/file.h> #include <android-base/unique_fd.h> +#include <android-base/properties.h> #include <fs_mgr.h> #include <fstab/fstab.h> #include <gtest/gtest.h> @@ -35,6 +36,7 @@ using namespace std; using namespace android::fs_mgr; using unique_fd = android::base::unique_fd; +using android::base::GetProperty; // Our tests assume a 128KiB disk with two 512 byte metadata slots. static const size_t kDiskSize = 131072; @@ -706,6 +708,13 @@ TEST(liblp, UpdateNonRetrofit) { } TEST(liblp, ReadSuperPartition) { + //This test requires dynamic partition which is not mandatory for + //Automotive in Android Q or lower + std::string api_level = GetProperty("ro.build.version.sdk",""); + std::string hw_type = GetProperty("ro.hardware.type",""); + if (std::stoi(api_level) <= 29 && hw_type == "automotive") { + return; + } auto slot_suffix = fs_mgr_get_slot_suffix(); auto slot_number = SlotNumberForSlotSuffix(slot_suffix); auto super_name = fs_mgr_get_super_partition_name(slot_number); |