diff options
author | Colin Cross <ccross@android.com> | 2019-12-13 20:41:13 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2019-12-18 08:19:10 -0800 |
commit | 98be1bb00f0fb10e195f26fd2a19952d701a1950 (patch) | |
tree | abc06a5a4184a6607755d32f927d886c1d099249 /java/sdk_test.go | |
parent | 572aeed6a4211d7433cd59fe9c83f34b2fee4f99 (diff) |
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
Diffstat (limited to 'java/sdk_test.go')
-rw-r--r-- | java/sdk_test.go | 16 |
1 files changed, 8 insertions, 8 deletions
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 */) |