Support test_suites in cc_benchmark modules
Bug: 35394669 Test: m -j checkbuild Change-Id: I0b521d866edb1706669b8058dc128d389b5582da
This commit is contained in:
13
cc/test.go
13
cc/test.go
@@ -299,8 +299,15 @@ func NewTestLibrary(hod android.HostOrDeviceSupported) *Module {
|
||||
return module
|
||||
}
|
||||
|
||||
type BenchmarkProperties struct {
|
||||
// list of compatibility suites (for example "cts", "vts") that the module should be
|
||||
// installed into.
|
||||
Test_suites []string
|
||||
}
|
||||
|
||||
type benchmarkDecorator struct {
|
||||
*binaryDecorator
|
||||
Properties BenchmarkProperties
|
||||
}
|
||||
|
||||
func (benchmark *benchmarkDecorator) linkerInit(ctx BaseModuleContext) {
|
||||
@@ -312,6 +319,12 @@ func (benchmark *benchmarkDecorator) linkerInit(ctx BaseModuleContext) {
|
||||
benchmark.binaryDecorator.linkerInit(ctx)
|
||||
}
|
||||
|
||||
func (benchmark *benchmarkDecorator) linkerProps() []interface{} {
|
||||
props := benchmark.binaryDecorator.linkerProps()
|
||||
props = append(props, &benchmark.Properties)
|
||||
return props
|
||||
}
|
||||
|
||||
func (benchmark *benchmarkDecorator) linkerDeps(ctx DepsContext, deps Deps) Deps {
|
||||
deps = benchmark.binaryDecorator.linkerDeps(ctx, deps)
|
||||
deps.StaticLibs = append(deps.StaticLibs, "libgoogle-benchmark")
|
||||
|
Reference in New Issue
Block a user