Include bpf program in APEXes
bpf program is put to an APEX via 'bpfs' property. It is
placed under etc/bpf directory in it.
Fix: 167530625
Test: m
Change-Id: Ia36b486f0cffb619ecc4f7a318cde881abc5baf4
diff --git a/apex/apex_test.go b/apex/apex_test.go
index 70464fc..33966ce 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -27,6 +27,7 @@
"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 @@
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 @@
java_libs: ["myjar"],
apps: ["AppFoo"],
rros: ["rro"],
+ bpfs: ["bpf"],
}
prebuilt_etc {
@@ -652,6 +655,11 @@
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 @@
"lib64/mylib.so",
"app/AppFoo/AppFoo.apk",
"overlay/blue/rro.apk",
+ "etc/bpf/bpf.o",
+ "etc/bpf/bpf2.o",
})
}