Set testModule to true in cc.NewTest().
This Cl sets testModule field to True in cc.NewTest(). This will cover "cc_test", "cc_test_host" and "art_cc_test".
Ignore-AOSP-First: CPing test_spec rule to udc-mainline-prod to support migration of test targets. Cherry pick of:aosp/2841416
Change-Id: I4a8db86835b195db34fd9f86560e7bf9321fbd7d
Merged-In: I4a8db86835b195db34fd9f86560e7bf9321fbd7d
diff --git a/cc/test.go b/cc/test.go
index e239133..db78d6c 100644
--- a/cc/test.go
+++ b/cc/test.go
@@ -137,7 +137,6 @@
func TestFactory() android.Module {
module := NewTest(android.HostAndDeviceSupported, true)
module.bazelHandler = &ccTestBazelHandler{module: module}
- module.testModule = true
return module.Init()
}
@@ -162,7 +161,6 @@
// cc_test_host compiles a test host binary.
func TestHostFactory() android.Module {
module := NewTest(android.HostSupported, true)
- module.testModule = true
return module.Init()
}
@@ -485,6 +483,7 @@
module, binary := newBinary(hod, bazelable)
module.bazelable = bazelable
module.multilib = android.MultilibBoth
+ module.testModule = true
binary.baseInstaller = NewTestInstaller()
test := &testBinary{