Merge "Prohibit static executable in APEX" am: d8a3513155
am: 7986f564b6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1779746 Change-Id: Iefdcf93ceb0d0b9654afffe0c03be28af33a9eaf
This commit is contained in:
@@ -374,7 +374,6 @@ func TestBasicApex(t *testing.T) {
|
||||
symlinks: ["foo_link_"],
|
||||
symlink_preferred_arch: true,
|
||||
system_shared_libs: [],
|
||||
static_executable: true,
|
||||
stl: "none",
|
||||
apex_available: [ "myapex", "com.android.gki.*" ],
|
||||
}
|
||||
@@ -2492,7 +2491,6 @@ func TestFilesInSubDir(t *testing.T) {
|
||||
srcs: ["mylib.cpp"],
|
||||
relative_install_path: "foo/bar",
|
||||
system_shared_libs: [],
|
||||
static_executable: true,
|
||||
stl: "none",
|
||||
apex_available: [ "myapex" ],
|
||||
}
|
||||
@@ -2552,7 +2550,6 @@ func TestFilesInSubDirWhenNativeBridgeEnabled(t *testing.T) {
|
||||
name: "mybin",
|
||||
relative_install_path: "foo/bar",
|
||||
system_shared_libs: [],
|
||||
static_executable: true,
|
||||
stl: "none",
|
||||
apex_available: [ "myapex" ],
|
||||
native_bridge_supported: true,
|
||||
@@ -8038,6 +8035,33 @@ func TestApexJavaCoverage(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestProhibitStaticExecutable(t *testing.T) {
|
||||
testApexError(t, `executable mybin is static`, `
|
||||
apex {
|
||||
name: "myapex",
|
||||
key: "myapex.key",
|
||||
binaries: ["mybin"],
|
||||
min_sdk_version: "29",
|
||||
}
|
||||
|
||||
apex_key {
|
||||
name: "myapex.key",
|
||||
public_key: "testkey.avbpubkey",
|
||||
private_key: "testkey.pem",
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "mybin",
|
||||
srcs: ["mylib.cpp"],
|
||||
relative_install_path: "foo/bar",
|
||||
static_executable: true,
|
||||
system_shared_libs: [],
|
||||
stl: "none",
|
||||
apex_available: [ "myapex" ],
|
||||
}
|
||||
`)
|
||||
}
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
Reference in New Issue
Block a user