Pass Config to NewTestContext instead of ctx.Register
Prepare for using Config when adding singletons by passing Config to NewTestContext and NewContext instead of to ctx.Register. This will enable a followup change to store SingletonMakeVarsProviders registered on the Context in the Config, which is necessary to run multiple tests in parallel without data races. Test: all soong tests Change-Id: Id229629a4e42ff4487d317241673837726c075fc
This commit is contained in:
@@ -356,7 +356,7 @@ func TestClasspath(t *testing.T) {
|
||||
config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true)
|
||||
config.TestProductVariables.Always_use_prebuilt_sdks = proptools.BoolPtr(true)
|
||||
}
|
||||
ctx := testContext()
|
||||
ctx := testContext(config)
|
||||
run(t, ctx, config)
|
||||
|
||||
checkClasspath(t, ctx, true /* isJava8 */)
|
||||
@@ -377,7 +377,7 @@ func TestClasspath(t *testing.T) {
|
||||
config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true)
|
||||
config.TestProductVariables.Always_use_prebuilt_sdks = proptools.BoolPtr(true)
|
||||
}
|
||||
ctx := testContext()
|
||||
ctx := testContext(config)
|
||||
run(t, ctx, config)
|
||||
|
||||
checkClasspath(t, ctx, false /* isJava8 */)
|
||||
@@ -401,7 +401,7 @@ func TestClasspath(t *testing.T) {
|
||||
config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true)
|
||||
config.TestProductVariables.Always_use_prebuilt_sdks = proptools.BoolPtr(true)
|
||||
}
|
||||
ctx := testContext()
|
||||
ctx := testContext(config)
|
||||
run(t, ctx, config)
|
||||
|
||||
checkClasspath(t, ctx, true /* isJava8 */)
|
||||
@@ -417,7 +417,7 @@ func TestClasspath(t *testing.T) {
|
||||
config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true)
|
||||
config.TestProductVariables.Always_use_prebuilt_sdks = proptools.BoolPtr(true)
|
||||
}
|
||||
ctx := testContext()
|
||||
ctx := testContext(config)
|
||||
run(t, ctx, config)
|
||||
|
||||
checkClasspath(t, ctx, false /* isJava8 */)
|
||||
|
Reference in New Issue
Block a user