Annotate paths and deprecate ExtractSource(s)Deps
Add `android:"path"` to all properties that take paths to source files, and remove the calls to ExtractSource(s)Deps, the pathsDepsMutator will add the necessary SourceDepTag dependency. Test: All soong tests Change-Id: I488ba1a5d680aaa50b04fc38acf693e23c6d4d6d
This commit is contained in:
20
cc/test.go
20
cc/test.go
@@ -42,7 +42,7 @@ type TestBinaryProperties struct {
|
||||
|
||||
// list of files or filegroup modules that provide data that should be installed alongside
|
||||
// the test
|
||||
Data []string
|
||||
Data []string `android:"path"`
|
||||
|
||||
// list of compatibility suites (for example "cts", "vts") that the module should be
|
||||
// installed into.
|
||||
@@ -50,11 +50,11 @@ type TestBinaryProperties struct {
|
||||
|
||||
// the name of the test configuration (for example "AndroidTest.xml") that should be
|
||||
// installed with the module.
|
||||
Test_config *string `android:"arch_variant"`
|
||||
Test_config *string `android:"path,arch_variant"`
|
||||
|
||||
// the name of the test configuration template (for example "AndroidTestTemplate.xml") that
|
||||
// should be installed with the module.
|
||||
Test_config_template *string `android:"arch_variant"`
|
||||
Test_config_template *string `android:"path,arch_variant"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -241,10 +241,6 @@ func (test *testBinary) linkerInit(ctx BaseModuleContext) {
|
||||
}
|
||||
|
||||
func (test *testBinary) linkerDeps(ctx DepsContext, deps Deps) Deps {
|
||||
android.ExtractSourcesDeps(ctx, test.Properties.Data)
|
||||
android.ExtractSourceDeps(ctx, test.Properties.Test_config)
|
||||
android.ExtractSourceDeps(ctx, test.Properties.Test_config_template)
|
||||
|
||||
deps = test.testDecorator.linkerDeps(ctx, deps)
|
||||
deps = test.binaryDecorator.linkerDeps(ctx, deps)
|
||||
return deps
|
||||
@@ -338,7 +334,7 @@ func NewTestLibrary(hod android.HostOrDeviceSupported) *Module {
|
||||
type BenchmarkProperties struct {
|
||||
// list of files or filegroup modules that provide data that should be installed alongside
|
||||
// the test
|
||||
Data []string
|
||||
Data []string `android:"path"`
|
||||
|
||||
// list of compatibility suites (for example "cts", "vts") that the module should be
|
||||
// installed into.
|
||||
@@ -346,11 +342,11 @@ type BenchmarkProperties struct {
|
||||
|
||||
// the name of the test configuration (for example "AndroidTest.xml") that should be
|
||||
// installed with the module.
|
||||
Test_config *string `android:"arch_variant"`
|
||||
Test_config *string `android:"path,arch_variant"`
|
||||
|
||||
// the name of the test configuration template (for example "AndroidTestTemplate.xml") that
|
||||
// should be installed with the module.
|
||||
Test_config_template *string `android:"arch_variant"`
|
||||
Test_config_template *string `android:"path,arch_variant"`
|
||||
}
|
||||
|
||||
type benchmarkDecorator struct {
|
||||
@@ -376,10 +372,6 @@ func (benchmark *benchmarkDecorator) linkerProps() []interface{} {
|
||||
}
|
||||
|
||||
func (benchmark *benchmarkDecorator) linkerDeps(ctx DepsContext, deps Deps) Deps {
|
||||
android.ExtractSourcesDeps(ctx, benchmark.Properties.Data)
|
||||
android.ExtractSourceDeps(ctx, benchmark.Properties.Test_config)
|
||||
android.ExtractSourceDeps(ctx, benchmark.Properties.Test_config_template)
|
||||
|
||||
deps = benchmark.binaryDecorator.linkerDeps(ctx, deps)
|
||||
deps.StaticLibs = append(deps.StaticLibs, "libgoogle-benchmark")
|
||||
return deps
|
||||
|
Reference in New Issue
Block a user