diff options
Diffstat (limited to 'cc')
-rw-r--r-- | cc/binary.go | 4 | ||||
-rw-r--r-- | cc/cc.go | 4 | ||||
-rw-r--r-- | cc/library.go | 4 | ||||
-rw-r--r-- | cc/object.go | 4 | ||||
-rw-r--r-- | cc/test.go | 20 |
5 files changed, 36 insertions, 0 deletions
diff --git a/cc/binary.go b/cc/binary.go index 627d5e560..608251afc 100644 --- a/cc/binary.go +++ b/cc/binary.go @@ -551,6 +551,10 @@ func (binary *binaryDecorator) moduleInfoJSON(ctx ModuleContext, moduleInfoJSON binary.baseLinker.moduleInfoJSON(ctx, moduleInfoJSON) } +func (binary *binaryDecorator) testSuiteInfo(ctx ModuleContext) { + // not a test +} + var _ overridable = (*binaryDecorator)(nil) func init() { @@ -797,6 +797,8 @@ type linker interface { defaultDistFiles() []android.Path moduleInfoJSON(ctx ModuleContext, moduleInfoJSON *android.ModuleInfoJSON) + + testSuiteInfo(ctx ModuleContext) } // specifiedDeps is a tuple struct representing dependencies of a linked binary owned by the linker. @@ -2408,6 +2410,8 @@ func (c *Module) GenerateAndroidBuildActions(actx android.ModuleContext) { name := v.ImplementationModuleName(ctx.OtherModuleName(c)) ccInfo.LinkerInfo.ImplementationModuleName = &name } + + c.linker.testSuiteInfo(ctx) } if c.library != nil { ccInfo.LibraryInfo = &LibraryInfo{ diff --git a/cc/library.go b/cc/library.go index b248224bd..5299771ca 100644 --- a/cc/library.go +++ b/cc/library.go @@ -1078,6 +1078,10 @@ func (library *libraryDecorator) moduleInfoJSON(ctx ModuleContext, moduleInfoJSO library.baseLinker.moduleInfoJSON(ctx, moduleInfoJSON) } +func (library *libraryDecorator) testSuiteInfo(ctx ModuleContext) { + // not a test +} + func (library *libraryDecorator) linkStatic(ctx ModuleContext, flags Flags, deps PathDeps, objs Objects) android.Path { diff --git a/cc/object.go b/cc/object.go index 95a8beb52..ea3ed6151 100644 --- a/cc/object.go +++ b/cc/object.go @@ -250,3 +250,7 @@ func (object *objectLinker) moduleInfoJSON(ctx ModuleContext, moduleInfoJSON *an object.baseLinker.moduleInfoJSON(ctx, moduleInfoJSON) moduleInfoJSON.Class = []string{"STATIC_LIBRARIES"} } + +func (object *objectLinker) testSuiteInfo(ctx ModuleContext) { + // not a test +} diff --git a/cc/test.go b/cc/test.go index 8b68c5563..9c276b81a 100644 --- a/cc/test.go +++ b/cc/test.go @@ -274,6 +274,12 @@ func (test *testDecorator) moduleInfoJSON(ctx android.ModuleContext, moduleInfoJ } } +func (test *testDecorator) testSuiteInfo(ctx ModuleContext) { + android.SetProvider(ctx, android.TestSuiteInfoProvider, android.TestSuiteInfo{ + TestSuites: test.InstallerProperties.Test_suites, + }) +} + func NewTestInstaller() *baseInstaller { return NewBaseInstaller("nativetest", "nativetest64", InstallInData) } @@ -342,6 +348,10 @@ func (test *testBinary) moduleInfoJSON(ctx ModuleContext, moduleInfoJSON *androi } +func (test *testBinary) testSuiteInfo(ctx ModuleContext) { + test.testDecorator.testSuiteInfo(ctx) +} + func (test *testBinary) installerProps() []interface{} { return append(test.baseInstaller.installerProps(), test.testDecorator.installerProps()...) } @@ -578,6 +588,10 @@ func (test *testLibrary) moduleInfoJSON(ctx ModuleContext, moduleInfoJSON *andro test.testDecorator.moduleInfoJSON(ctx, moduleInfoJSON) } +func (test *testLibrary) testSuiteInfo(ctx ModuleContext) { + test.testDecorator.testSuiteInfo(ctx) +} + func (test *testLibrary) installerProps() []interface{} { return append(test.baseInstaller.installerProps(), test.testDecorator.installerProps()...) } @@ -695,6 +709,12 @@ func (benchmark *benchmarkDecorator) moduleInfoJSON(ctx ModuleContext, moduleInf } } +func (benchmark *benchmarkDecorator) testSuiteInfo(ctx ModuleContext) { + android.SetProvider(ctx, android.TestSuiteInfoProvider, android.TestSuiteInfo{ + TestSuites: benchmark.Properties.Test_suites, + }) +} + func NewBenchmark(hod android.HostOrDeviceSupported) *Module { module, binary := newBinary(hod) module.multilib = android.MultilibBoth |