aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2021-11-11 18:59:15 -0800
committerColin Cross <ccross@android.com>2021-12-15 15:22:53 -0800
commitc68db4b305b9186d8d9b4e83b298a33fa810d06b (patch)
treed8a61ff4d4694bedd12cbb3ef100f974b24e08e3 /sh
parente23a32bdc5dc07bea8d602662b2b0020159a6742 (diff)
downloadsoong-c68db4b305b9186d8d9b4e83b298a33fa810d06b.tar.gz
Remove InstallBypassMake and ToMakePath
InstallBypassMake and ToMakePath are obsolete, remove them. Bug: 204136549 Test: m checkbuild Change-Id: Ie5a6f7254b3d317ed6039e114ed6aec35e1ce273
Diffstat (limited to 'sh')
-rw-r--r--sh/sh_binary.go6
-rw-r--r--sh/sh_binary_test.go22
2 files changed, 15 insertions, 13 deletions
diff --git a/sh/sh_binary.go b/sh/sh_binary.go
index 2d98e8be0..e1df8ac59 100644
--- a/sh/sh_binary.go
+++ b/sh/sh_binary.go
@@ -166,10 +166,6 @@ type ShBinary struct {
var _ android.HostToolProvider = (*ShBinary)(nil)
-func (s *ShBinary) InstallBypassMake() bool {
- return true
-}
-
type ShTest struct {
ShBinary
@@ -435,7 +431,7 @@ func (s *ShTest) AndroidMkEntries() []android.AndroidMkEntries {
ExtraEntries: []android.AndroidMkExtraEntriesFunc{
func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) {
s.customAndroidMkEntries(entries)
- entries.SetPath("LOCAL_MODULE_PATH", s.installDir.ToMakePath())
+ entries.SetPath("LOCAL_MODULE_PATH", s.installDir)
entries.AddCompatibilityTestSuites(s.testProperties.Test_suites...)
if s.testConfig != nil {
entries.SetPath("LOCAL_FULL_TEST_CONFIG", s.testConfig)
diff --git a/sh/sh_binary_test.go b/sh/sh_binary_test.go
index 865d5f3d1..28b6fb93a 100644
--- a/sh/sh_binary_test.go
+++ b/sh/sh_binary_test.go
@@ -42,7 +42,10 @@ func testShBinary(t *testing.T, bp string) (*android.TestContext, android.Config
}
func TestShTestSubDir(t *testing.T) {
- ctx, config := testShBinary(t, `
+ result := android.GroupFixturePreparers(
+ prepareForShTest,
+ android.FixtureModifyConfig(android.SetKatiEnabledForTests),
+ ).RunTestWithBp(t, `
sh_test {
name: "foo",
src: "test.sh",
@@ -50,17 +53,20 @@ func TestShTestSubDir(t *testing.T) {
}
`)
- mod := ctx.ModuleForTests("foo", "android_arm64_armv8-a").Module().(*ShTest)
+ mod := result.ModuleForTests("foo", "android_arm64_armv8-a").Module().(*ShTest)
- entries := android.AndroidMkEntriesForTest(t, ctx, mod)[0]
+ entries := android.AndroidMkEntriesForTest(t, result.TestContext, mod)[0]
expectedPath := "out/target/product/test_device/data/nativetest64/foo_test"
actualPath := entries.EntryMap["LOCAL_MODULE_PATH"][0]
- android.AssertStringPathRelativeToTopEquals(t, "LOCAL_MODULE_PATH[0]", config, expectedPath, actualPath)
+ android.AssertStringPathRelativeToTopEquals(t, "LOCAL_MODULE_PATH[0]", result.Config, expectedPath, actualPath)
}
func TestShTest(t *testing.T) {
- ctx, config := testShBinary(t, `
+ result := android.GroupFixturePreparers(
+ prepareForShTest,
+ android.FixtureModifyConfig(android.SetKatiEnabledForTests),
+ ).RunTestWithBp(t, `
sh_test {
name: "foo",
src: "test.sh",
@@ -72,13 +78,13 @@ func TestShTest(t *testing.T) {
}
`)
- mod := ctx.ModuleForTests("foo", "android_arm64_armv8-a").Module().(*ShTest)
+ mod := result.ModuleForTests("foo", "android_arm64_armv8-a").Module().(*ShTest)
- entries := android.AndroidMkEntriesForTest(t, ctx, mod)[0]
+ entries := android.AndroidMkEntriesForTest(t, result.TestContext, mod)[0]
expectedPath := "out/target/product/test_device/data/nativetest64/foo"
actualPath := entries.EntryMap["LOCAL_MODULE_PATH"][0]
- android.AssertStringPathRelativeToTopEquals(t, "LOCAL_MODULE_PATH[0]", config, expectedPath, actualPath)
+ android.AssertStringPathRelativeToTopEquals(t, "LOCAL_MODULE_PATH[0]", result.Config, expectedPath, actualPath)
expectedData := []string{":testdata/data1", ":testdata/sub/data2"}
actualData := entries.EntryMap["LOCAL_TEST_DATA"]