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 /rust/testing.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 'rust/testing.go')
-rw-r--r-- | rust/testing.go | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/rust/testing.go b/rust/testing.go index 2067f8249..1dd16cfd5 100644 --- a/rust/testing.go +++ b/rust/testing.go @@ -162,7 +162,7 @@ func GatherRequiredDepsForTest() string { return bp } -func CreateTestContext(bp string) *android.TestContext { +func CreateTestContext() *android.TestContext { ctx := android.NewTestArchContext() ctx.RegisterModuleType("cc_library", cc.LibraryFactory) ctx.RegisterModuleType("cc_object", cc.ObjectFactory) @@ -193,17 +193,6 @@ func CreateTestContext(bp string) *android.TestContext { ctx.BottomUp("rust_libraries", LibraryMutator).Parallel() ctx.BottomUp("rust_unit_tests", TestPerSrcMutator).Parallel() }) - bp = bp + GatherRequiredDepsForTest() - - mockFS := map[string][]byte{ - "Android.bp": []byte(bp), - "foo.rs": nil, - "src/bar.rs": nil, - "liby.so": nil, - "libz.so": nil, - } - - ctx.MockFileSystem(mockFS) return ctx } |