diff options
| author | 2021-08-03 07:52:17 +0000 | |
|---|---|---|
| committer | 2021-08-03 07:52:17 +0000 | |
| commit | 192600a7d0c512315da01e93c677805e6c2d3b82 (patch) | |
| tree | 11e2d54b4cede9d9c581b25a2e85e9a49620c44c /apex/apex_test.go | |
| parent | 2125aab5043c05953505563ed505a7e64fc9f668 (diff) | |
Revert "Revert "Prohibit static executable in APEX""
This reverts commit 2125aab5043c05953505563ed505a7e64fc9f668.
Reason for revert: relanding along with a forward fix
Change-Id: Ib0283ca6beefa2f3073860287d00553ad0af6317
Diffstat (limited to 'apex/apex_test.go')
| -rw-r--r-- | apex/apex_test.go | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go index f58bf6cc5..1645c9978 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -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.*" ], } @@ -2494,7 +2493,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" ], } @@ -2554,7 +2552,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, @@ -8188,6 +8185,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()) } |