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
diff --git a/cc/test.go b/cc/test.go
index 3ecc419..f0274e9 100644
--- a/cc/test.go
+++ b/cc/test.go
@@ -42,7 +42,7 @@
// 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 @@
// 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) 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 @@
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 @@
// 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) 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