Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 559356d0 authored by Satish Yalla's avatar Satish Yalla Committed by Gerrit Code Review
Browse files

Revert "Add install_symlink_host Soong module type"

This reverts commit fb09145a.

Reason for revert: Droidmonitor created revert due to b/370366762. Will be verifying through ABTD before submission.

Change-Id: Ic54552014b8739b7a39313959b9edd009783ff06
parent fb09145a
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ func init() {

func RegisterInstallSymlinkBuildComponents(ctx android.RegistrationContext) {
	ctx.RegisterModuleType("install_symlink", InstallSymlinkFactory)
	ctx.RegisterModuleType("install_symlink_host", InstallSymlinkHostFactory)
}

// install_symlink can be used to install an symlink with an arbitrary target to an arbitrary path
@@ -38,14 +37,6 @@ func InstallSymlinkFactory() android.Module {
	return module
}

// install_symlink can be used to install an symlink to an arbitrary path on the host.
func InstallSymlinkHostFactory() android.Module {
	module := &InstallSymlink{}
	module.AddProperties(&module.properties)
	android.InitAndroidMultiTargetsArchModule(module, android.HostSupported, android.MultilibCommon)
	return module
}

type InstallSymlinkProperties struct {
	// Where to install this symlink, relative to the partition it's installed on.
	// Which partition it's installed on can be controlled by the vendor, system_ext, ramdisk, etc.
+0 −30
Original line number Diff line number Diff line
@@ -133,33 +133,3 @@ func TestErrorOnInstalledPathStartingWithSlash(t *testing.T) {
		}
	`)
}

func TestInstallSymlinkHostBasic(t *testing.T) {
	result := prepareForInstallSymlinkTest.RunTestWithBp(t, `
		install_symlink_host {
			name: "foo",
			installed_location: "bin/foo",
			symlink_target: "folder/foo-realpath",
		}
	`)

	foo_variants := result.ModuleVariantsForTests("foo")
	if len(foo_variants) != 1 {
		t.Fatalf("expected 1 variant, got %#v", foo_variants)
	}

	foo := result.ModuleForTests("foo", "linux_glibc_common").Module()
	androidMkEntries := android.AndroidMkEntriesForTest(t, result.TestContext, foo)
	if len(androidMkEntries) != 1 {
		t.Fatalf("expected 1 androidmkentry, got %d", len(androidMkEntries))
	}

	symlinks := androidMkEntries[0].EntryMap["LOCAL_SOONG_INSTALL_SYMLINKS"]
	if len(symlinks) != 1 {
		t.Fatalf("Expected 1 symlink, got %d", len(symlinks))
	}

	if !strings.HasSuffix(symlinks[0], "host/linux-x86/bin/foo") {
		t.Fatalf("Expected symlink install path to end in ost/linux-x86/bin/foo, got: %s", symlinks[0])
	}
}