From 98be1bb00f0fb10e195f26fd2a19952d701a1950 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 13 Dec 2019 20:41:13 -0800 Subject: Move filesystem into Config The filesystem object was available through ModuleContext.Fs(), but gives too much access to the filesystem without enforicing correct dependencies. In order to support sandboxing the soong_build process move the filesystem into the Config. The next change will make it private. Bug: 146437378 Test: all Soong tests Change-Id: I5d3ae9108f120fd335b21efd612aefa078378813 --- java/sdk_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'java/sdk_test.go') diff --git a/java/sdk_test.go b/java/sdk_test.go index 525c89887..9cabd7772 100644 --- a/java/sdk_test.go +++ b/java/sdk_test.go @@ -327,14 +327,14 @@ func TestClasspath(t *testing.T) { // Test with legacy javac -source 1.8 -target 1.8 t.Run("Java language level 8", func(t *testing.T) { - config := testConfig(nil) + config := testConfig(nil, bpJava8, nil) if testcase.unbundled { config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true) } if testcase.pdk { config.TestProductVariables.Pdk = proptools.BoolPtr(true) } - ctx := testContext(bpJava8, nil) + ctx := testContext() run(t, ctx, config) checkClasspath(t, ctx, true /* isJava8 */) @@ -350,14 +350,14 @@ func TestClasspath(t *testing.T) { // Test with default javac -source 9 -target 9 t.Run("Java language level 9", func(t *testing.T) { - config := testConfig(nil) + config := testConfig(nil, bp, nil) if testcase.unbundled { config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true) } if testcase.pdk { config.TestProductVariables.Pdk = proptools.BoolPtr(true) } - ctx := testContext(bp, nil) + ctx := testContext() run(t, ctx, config) checkClasspath(t, ctx, false /* isJava8 */) @@ -373,7 +373,7 @@ func TestClasspath(t *testing.T) { // Test again with PLATFORM_VERSION_CODENAME=REL, javac -source 8 -target 8 t.Run("REL + Java language level 8", func(t *testing.T) { - config := testConfig(nil) + config := testConfig(nil, bpJava8, nil) config.TestProductVariables.Platform_sdk_codename = proptools.StringPtr("REL") config.TestProductVariables.Platform_sdk_final = proptools.BoolPtr(true) @@ -383,7 +383,7 @@ func TestClasspath(t *testing.T) { if testcase.pdk { config.TestProductVariables.Pdk = proptools.BoolPtr(true) } - ctx := testContext(bpJava8, nil) + ctx := testContext() run(t, ctx, config) checkClasspath(t, ctx, true /* isJava8 */) @@ -391,7 +391,7 @@ func TestClasspath(t *testing.T) { // Test again with PLATFORM_VERSION_CODENAME=REL, javac -source 9 -target 9 t.Run("REL + Java language level 9", func(t *testing.T) { - config := testConfig(nil) + config := testConfig(nil, bp, nil) config.TestProductVariables.Platform_sdk_codename = proptools.StringPtr("REL") config.TestProductVariables.Platform_sdk_final = proptools.BoolPtr(true) @@ -401,7 +401,7 @@ func TestClasspath(t *testing.T) { if testcase.pdk { config.TestProductVariables.Pdk = proptools.BoolPtr(true) } - ctx := testContext(bp, nil) + ctx := testContext() run(t, ctx, config) checkClasspath(t, ctx, false /* isJava8 */) -- cgit v1.2.3-59-g8ed1b