Move some java test setup later
am: c28bb0b8f9
Change-Id: Ib22830370d27e853151cc4419f6bbe791568a645
This commit is contained in:
@@ -24,6 +24,7 @@ import (
|
|||||||
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
"android/soong/cc"
|
"android/soong/cc"
|
||||||
|
"android/soong/dexpreopt"
|
||||||
"android/soong/genrule"
|
"android/soong/genrule"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -101,8 +102,6 @@ func testContext(config android.Config, bp string,
|
|||||||
ctx.BottomUp("begin", cc.BeginMutator).Parallel()
|
ctx.BottomUp("begin", cc.BeginMutator).Parallel()
|
||||||
})
|
})
|
||||||
|
|
||||||
ctx.Register()
|
|
||||||
|
|
||||||
bp += GatherRequiredDepsForTest()
|
bp += GatherRequiredDepsForTest()
|
||||||
|
|
||||||
mockFS := map[string][]byte{
|
mockFS := map[string][]byte{
|
||||||
@@ -187,6 +186,11 @@ func testContext(config android.Config, bp string,
|
|||||||
|
|
||||||
func run(t *testing.T, ctx *android.TestContext, config android.Config) {
|
func run(t *testing.T, ctx *android.TestContext, config android.Config) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
|
|
||||||
|
pathCtx := android.PathContextForTesting(config, nil)
|
||||||
|
setDexpreoptTestGlobalConfig(config, dexpreopt.GlobalConfigForTests(pathCtx))
|
||||||
|
|
||||||
|
ctx.Register()
|
||||||
_, errs := ctx.ParseFileList(".", []string{"Android.bp", "prebuilts/sdk/Android.bp"})
|
_, errs := ctx.ParseFileList(".", []string{"Android.bp", "prebuilts/sdk/Android.bp"})
|
||||||
android.FailIfErrored(t, errs)
|
android.FailIfErrored(t, errs)
|
||||||
_, errs = ctx.PrepareBuildActions(config)
|
_, errs = ctx.PrepareBuildActions(config)
|
||||||
|
@@ -18,7 +18,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
"android/soong/dexpreopt"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestConfig(buildDir string, env map[string]string) android.Config {
|
func TestConfig(buildDir string, env map[string]string) android.Config {
|
||||||
@@ -31,9 +30,6 @@ func TestConfig(buildDir string, env map[string]string) android.Config {
|
|||||||
config := android.TestArchConfig(buildDir, env)
|
config := android.TestArchConfig(buildDir, env)
|
||||||
config.TestProductVariables.DeviceSystemSdkVersions = []string{"14", "15"}
|
config.TestProductVariables.DeviceSystemSdkVersions = []string{"14", "15"}
|
||||||
|
|
||||||
pathCtx := android.PathContextForTesting(config, nil)
|
|
||||||
setDexpreoptTestGlobalConfig(config, dexpreopt.GlobalConfigForTests(pathCtx))
|
|
||||||
|
|
||||||
return config
|
return config
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user