aboutsummaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorColin Cross2019-05-14 18:05:20 -0500
committerColin Cross2019-05-17 10:43:36 -0500
commit815daf95b2a019cc997484841d318ee86e3f8c08 (patch)
treed1d141e594991c6349cbd724d4f94a71273edcdc /cc
parent0d99f7cd8419a16132dc0aa3a6f37697dc473aad (diff)
downloadplatform-build-soong-815daf95b2a019cc997484841d318ee86e3f8c08.tar.gz
platform-build-soong-815daf95b2a019cc997484841d318ee86e3f8c08.tar.xz
platform-build-soong-815daf95b2a019cc997484841d318ee86e3f8c08.zip
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
Diffstat (limited to 'cc')
-rw-r--r--cc/testing.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cc/testing.go b/cc/testing.go
index 162a7460..259fb19e 100644
--- a/cc/testing.go
+++ b/cc/testing.go
@@ -148,6 +148,12 @@ func GatherRequiredDepsForTest(os android.OsType) string {
148 } 148 }
149 149
150 cc_object { 150 cc_object {
151 name: "crtbegin_dynamic",
152 recovery_available: true,
153 vendor_available: true,
154 }
155
156 cc_object {
151 name: "crtbegin_static", 157 name: "crtbegin_static",
152 recovery_available: true, 158 recovery_available: true,
153 vendor_available: true, 159 vendor_available: true,
@@ -194,6 +200,7 @@ func CreateTestContext(bp string, fs map[string][]byte,
194 ctx.RegisterModuleType("cc_library_shared", android.ModuleFactoryAdaptor(LibrarySharedFactory)) 200 ctx.RegisterModuleType("cc_library_shared", android.ModuleFactoryAdaptor(LibrarySharedFactory))
195 ctx.RegisterModuleType("cc_library_static", android.ModuleFactoryAdaptor(LibraryStaticFactory)) 201 ctx.RegisterModuleType("cc_library_static", android.ModuleFactoryAdaptor(LibraryStaticFactory))
196 ctx.RegisterModuleType("cc_library_headers", android.ModuleFactoryAdaptor(LibraryHeaderFactory)) 202 ctx.RegisterModuleType("cc_library_headers", android.ModuleFactoryAdaptor(LibraryHeaderFactory))
203 ctx.RegisterModuleType("cc_test", android.ModuleFactoryAdaptor(TestFactory))
197 ctx.RegisterModuleType("toolchain_library", android.ModuleFactoryAdaptor(ToolchainLibraryFactory)) 204 ctx.RegisterModuleType("toolchain_library", android.ModuleFactoryAdaptor(ToolchainLibraryFactory))
198 ctx.RegisterModuleType("llndk_library", android.ModuleFactoryAdaptor(LlndkLibraryFactory)) 205 ctx.RegisterModuleType("llndk_library", android.ModuleFactoryAdaptor(LlndkLibraryFactory))
199 ctx.RegisterModuleType("llndk_headers", android.ModuleFactoryAdaptor(llndkHeadersFactory)) 206 ctx.RegisterModuleType("llndk_headers", android.ModuleFactoryAdaptor(llndkHeadersFactory))