Move autogenerated test config into Soong
Move autogenerating the test config for Soong modules into Soong for java_test and android_test modules. Bug: 70770641 Test: m checkbuild Test: atest CtsUiRenderingTestCases Change-Id: I02593add0407ef694b91c14cf27411a4f3cc4745
This commit is contained in:
10
java/java.go
10
java/java.go
@@ -29,6 +29,7 @@ import (
|
||||
|
||||
"android/soong/android"
|
||||
"android/soong/java/config"
|
||||
"android/soong/tradefed"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -1362,6 +1363,14 @@ type Test struct {
|
||||
Library
|
||||
|
||||
testProperties testProperties
|
||||
|
||||
testConfig android.Path
|
||||
}
|
||||
|
||||
func (j *Test) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
j.testConfig = tradefed.AutoGenJavaTestConfig(ctx, j.testProperties.Test_config)
|
||||
|
||||
j.Library.GenerateAndroidBuildActions(ctx)
|
||||
}
|
||||
|
||||
func (j *Test) DepsMutator(ctx android.BottomUpMutatorContext) {
|
||||
@@ -1369,6 +1378,7 @@ func (j *Test) DepsMutator(ctx android.BottomUpMutatorContext) {
|
||||
if BoolDefault(j.testProperties.Junit, true) {
|
||||
ctx.AddDependency(ctx.Module(), staticLibTag, "junit")
|
||||
}
|
||||
android.ExtractSourceDeps(ctx, j.testProperties.Test_config)
|
||||
}
|
||||
|
||||
func TestFactory() android.Module {
|
||||
|
Reference in New Issue
Block a user