Add bpf_test.go to build and fix tests
bpf_test.go was not listed in testSrcs, which meant it was not run
during the build, but ran and failed with go test android/soong/...
Don't redeclare the cc module types and mutators, use exported
functions from cc/testing.go instead, which contain a new
dependency needed by cc modules.
This reapplies I4542640e8ff08e71565ed50617dbe67d86b29b69 after
fixes for mac tests.
Test: m
Test: go test android/soong/...
Change-Id: I3dc3fdedbd7063df4a2e0cadf2a4e0711b1823ad
diff --git a/cc/testing.go b/cc/testing.go
index 162a746..259fb19 100644
--- a/cc/testing.go
+++ b/cc/testing.go
@@ -148,6 +148,12 @@
}
cc_object {
+ name: "crtbegin_dynamic",
+ recovery_available: true,
+ vendor_available: true,
+ }
+
+ cc_object {
name: "crtbegin_static",
recovery_available: true,
vendor_available: true,
@@ -194,6 +200,7 @@
ctx.RegisterModuleType("cc_library_shared", android.ModuleFactoryAdaptor(LibrarySharedFactory))
ctx.RegisterModuleType("cc_library_static", android.ModuleFactoryAdaptor(LibraryStaticFactory))
ctx.RegisterModuleType("cc_library_headers", android.ModuleFactoryAdaptor(LibraryHeaderFactory))
+ ctx.RegisterModuleType("cc_test", android.ModuleFactoryAdaptor(TestFactory))
ctx.RegisterModuleType("toolchain_library", android.ModuleFactoryAdaptor(ToolchainLibraryFactory))
ctx.RegisterModuleType("llndk_library", android.ModuleFactoryAdaptor(LlndkLibraryFactory))
ctx.RegisterModuleType("llndk_headers", android.ModuleFactoryAdaptor(llndkHeadersFactory))