diff options
author | 2019-12-13 20:41:13 -0800 | |
---|---|---|
committer | 2019-12-18 08:19:10 -0800 | |
commit | 98be1bb00f0fb10e195f26fd2a19952d701a1950 (patch) | |
tree | abc06a5a4184a6607755d32f927d886c1d099249 /android/package_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 'android/package_test.go')
-rw-r--r-- | android/package_test.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/android/package_test.go b/android/package_test.go index 8071c51b0..bc66928ce 100644 --- a/android/package_test.go +++ b/android/package_test.go @@ -84,14 +84,12 @@ func TestPackage(t *testing.T) { func testPackage(fs map[string][]byte) (*TestContext, []error) { // Create a new config per test as visibility information is stored in the config. - config := TestArchConfig(buildDir, nil) + config := TestArchConfig(buildDir, nil, "", fs) ctx := NewTestArchContext() ctx.RegisterModuleType("package", PackageFactory) ctx.PreArchMutators(RegisterPackageRenamer) - ctx.Register() - - ctx.MockFileSystem(fs) + ctx.Register(config) _, errs := ctx.ParseBlueprintsFiles(".") if len(errs) > 0 { |