Allow sdk package tests to optimize their test setup am: cf3ee2f87e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1645676 Change-Id: I16d55dbb80f577dd1f3b7a513eb5c12ae8a8dea6
This commit is contained in:
@@ -27,13 +27,9 @@ import (
|
|||||||
"android/soong/java"
|
"android/soong/java"
|
||||||
)
|
)
|
||||||
|
|
||||||
var prepareForSdkTest = android.GroupFixturePreparers(
|
// Prepare for running an sdk test with an apex.
|
||||||
|
var prepareForSdkTestWithApex = android.GroupFixturePreparers(
|
||||||
apex.PrepareForTestWithApexBuildComponents,
|
apex.PrepareForTestWithApexBuildComponents,
|
||||||
cc.PrepareForTestWithCcDefaultModules,
|
|
||||||
genrule.PrepareForTestWithGenRuleBuildComponents,
|
|
||||||
java.PrepareForTestWithJavaBuildComponents,
|
|
||||||
PrepareForTestWithSdkBuildComponents,
|
|
||||||
|
|
||||||
android.FixtureAddTextFile("sdk/tests/Android.bp", `
|
android.FixtureAddTextFile("sdk/tests/Android.bp", `
|
||||||
apex_key {
|
apex_key {
|
||||||
name: "myapex.key",
|
name: "myapex.key",
|
||||||
@@ -58,6 +54,24 @@ var prepareForSdkTest = android.GroupFixturePreparers(
|
|||||||
"myapex.x509.pem": nil,
|
"myapex.x509.pem": nil,
|
||||||
"myapex.pk8": nil,
|
"myapex.pk8": nil,
|
||||||
}),
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
|
// Legacy preparer used for running tests within the sdk package.
|
||||||
|
//
|
||||||
|
// This includes everything that was needed to run any test in the sdk package prior to the
|
||||||
|
// introduction of the test fixtures. Tests that are being converted to use fixtures directly
|
||||||
|
// rather than through the testSdkError() and testSdkWithFs() methods should avoid using this and
|
||||||
|
// instead should use the various preparers directly using android.GroupFixturePreparers(...) to
|
||||||
|
// group them when necessary.
|
||||||
|
//
|
||||||
|
// deprecated
|
||||||
|
var prepareForSdkTest = android.GroupFixturePreparers(
|
||||||
|
cc.PrepareForTestWithCcDefaultModules,
|
||||||
|
genrule.PrepareForTestWithGenRuleBuildComponents,
|
||||||
|
java.PrepareForTestWithJavaBuildComponents,
|
||||||
|
PrepareForTestWithSdkBuildComponents,
|
||||||
|
|
||||||
|
prepareForSdkTestWithApex,
|
||||||
|
|
||||||
cc.PrepareForTestOnWindows,
|
cc.PrepareForTestOnWindows,
|
||||||
android.FixtureModifyConfig(func(config android.Config) {
|
android.FixtureModifyConfig(func(config android.Config) {
|
||||||
|
Reference in New Issue
Block a user