Deprecate Vendor Overlay when VNDK is deprecated
Vendor overlay was introduced to enable system-only update with small changes on the vendor, but this is no longer required with same reason of VNDK deprecation - more frequent Vendor update than expected, and makes system-vendor interface unstable. This change adds more comments to explain that Vendor overlay will be deprecated along with VNDK, and skip test if VNDK is deprecated. Bug: 307925435 Bug: 307902290 Test: fs_mgr_vendor_overlay_test passed with CF trunk-staging device Change-Id: I7b9359a5754e8740e749c48f6265a1b0f92f13af
This commit is contained in:
parent
3f214d7a09
commit
260e48f07e
2 changed files with 7 additions and 4 deletions
|
@ -112,6 +112,7 @@ bool fs_mgr_vendor_overlay_mount_all() {
|
|||
// properties are loaded.
|
||||
static const auto vndk_version = android::base::GetProperty(kVndkVersionPropertyName, "");
|
||||
if (vndk_version.empty()) {
|
||||
// Vendor overlay is disabled from VNDK deprecated devices.
|
||||
LINFO << "vendor overlay: vndk version not defined";
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -21,10 +21,8 @@ import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
|
|||
import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;
|
||||
import com.android.tradefed.util.CommandResult;
|
||||
import com.android.tradefed.util.CommandStatus;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Assume;
|
||||
|
@ -38,9 +36,15 @@ import org.junit.runner.RunWith;
|
|||
@RunWith(DeviceJUnit4ClassRunner.class)
|
||||
public class VendorOverlayHostTest extends BaseHostJUnit4Test {
|
||||
boolean wasRoot = false;
|
||||
String vndkVersion = null;
|
||||
|
||||
@Before
|
||||
public void setup() throws DeviceNotAvailableException {
|
||||
vndkVersion = getDevice().executeShellV2Command("getprop ro.vndk.version").getStdout();
|
||||
Assume.assumeTrue(
|
||||
"Vendor Overlay is disabled for VNDK deprecated devices",
|
||||
vndkVersion != null && !vndkVersion.trim().isEmpty());
|
||||
|
||||
wasRoot = getDevice().isAdbRoot();
|
||||
if (!wasRoot) {
|
||||
Assume.assumeTrue("Test requires root", getDevice().enableAdbRoot());
|
||||
|
@ -74,8 +78,6 @@ public class VendorOverlayHostTest extends BaseHostJUnit4Test {
|
|||
*/
|
||||
@Test
|
||||
public void testVendorOverlay() throws DeviceNotAvailableException {
|
||||
String vndkVersion = getDevice().executeShellV2Command("getprop ro.vndk.version").getStdout();
|
||||
|
||||
// Create files and modify policy
|
||||
CommandResult result = getDevice().executeShellV2Command(
|
||||
"echo '/(product|system/product)/vendor_overlay/" + vndkVersion +
|
||||
|
|
Loading…
Reference in a new issue