summaryrefslogtreecommitdiff
path: root/apex/apex_test.go
diff options
context:
space:
mode:
author Mark Chien <markchien@google.com> 2020-09-04 08:58:21 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2020-09-04 08:58:21 +0000
commit66a0ae60f81391880dbc9cd13b4ea52aec4b63ff (patch)
treebd44b5e5a2dbd6d0b80daf9663942d34af14dbf2 /apex/apex_test.go
parentbfb98ece495afc551c34ba78e35f324f42cc5eff (diff)
parent2f59ec98d16cb41d0e46e5662019032deaaeaac1 (diff)
Merge "Include bpf program in APEXes"
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r--apex/apex_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go
index 391fca0aa..2950c6a4e 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -27,6 +27,7 @@ import (
"github.com/google/blueprint/proptools"
"android/soong/android"
+ "android/soong/bpf"
"android/soong/cc"
"android/soong/dexpreopt"
prebuilt_etc "android/soong/etc"
@@ -257,6 +258,7 @@ func testApexContext(_ *testing.T, bp string, handlers ...testCustomizer) (*andr
java.RegisterAppBuildComponents(ctx)
java.RegisterSdkLibraryBuildComponents(ctx)
ctx.RegisterSingletonType("apex_keys_text", apexKeysTextFactory)
+ ctx.RegisterModuleType("bpf", bpf.BpfFactory)
ctx.PreDepsMutators(RegisterPreDepsMutators)
ctx.PostDepsMutators(RegisterPostDepsMutators)
@@ -606,6 +608,7 @@ func TestDefaults(t *testing.T) {
java_libs: ["myjar"],
apps: ["AppFoo"],
rros: ["rro"],
+ bpfs: ["bpf"],
}
prebuilt_etc {
@@ -652,6 +655,11 @@ func TestDefaults(t *testing.T) {
theme: "blue",
}
+ bpf {
+ name: "bpf",
+ srcs: ["bpf.c", "bpf2.c"],
+ }
+
`)
ensureExactContents(t, ctx, "myapex", "android_common_myapex_image", []string{
"etc/myetc",
@@ -659,6 +667,8 @@ func TestDefaults(t *testing.T) {
"lib64/mylib.so",
"app/AppFoo/AppFoo.apk",
"overlay/blue/rro.apk",
+ "etc/bpf/bpf.o",
+ "etc/bpf/bpf2.o",
})
}