summaryrefslogtreecommitdiff
path: root/android/sh_binary_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/sh_binary_test.go')
-rw-r--r--android/sh_binary_test.go17
1 files changed, 8 insertions, 9 deletions
diff --git a/android/sh_binary_test.go b/android/sh_binary_test.go
index 8488fe493..137e77348 100644
--- a/android/sh_binary_test.go
+++ b/android/sh_binary_test.go
@@ -6,19 +6,18 @@ import (
)
func testShBinary(t *testing.T, bp string) (*TestContext, Config) {
- config := TestArchConfig(buildDir, nil)
-
- ctx := NewTestArchContext()
- ctx.RegisterModuleType("sh_test", ShTestFactory)
- ctx.RegisterModuleType("sh_test_host", ShTestHostFactory)
- ctx.Register()
- mockFiles := map[string][]byte{
- "Android.bp": []byte(bp),
+ fs := map[string][]byte{
"test.sh": nil,
"testdata/data1": nil,
"testdata/sub/data2": nil,
}
- ctx.MockFileSystem(mockFiles)
+
+ config := TestArchConfig(buildDir, nil, bp, fs)
+
+ ctx := NewTestArchContext()
+ ctx.RegisterModuleType("sh_test", ShTestFactory)
+ ctx.RegisterModuleType("sh_test_host", ShTestHostFactory)
+ ctx.Register(config)
_, errs := ctx.ParseFileList(".", []string{"Android.bp"})
FailIfErrored(t, errs)
_, errs = ctx.PrepareBuildActions(config)