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

Commit ee97ae8c authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Always install to out/target instead of out/soong/target" into main

parents 09748eba 6b7075f1
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -327,21 +327,21 @@ func TestInstall(t *testing.T) {
	outputRule := func(name string) TestingBuildParams { return module(name, false).Output(name) }

	installRule := func(name string) TestingBuildParams {
		return module(name, false).Output(filepath.Join("out/soong/target/product/test_device/system", name))
		return module(name, false).Output(filepath.Join("out/target/product/test_device/system", name))
	}

	symlinkRule := func(name string) TestingBuildParams {
		return module(name, false).Output(filepath.Join("out/soong/target/product/test_device/system/symlinks", name))
		return module(name, false).Output(filepath.Join("out/target/product/test_device/system/symlinks", name))
	}

	hostOutputRule := func(name string) TestingBuildParams { return module(name, true).Output(name) }

	hostInstallRule := func(name string) TestingBuildParams {
		return module(name, true).Output(filepath.Join("out/soong/host/linux-x86", name))
		return module(name, true).Output(filepath.Join("out/host/linux-x86", name))
	}

	hostSymlinkRule := func(name string) TestingBuildParams {
		return module(name, true).Output(filepath.Join("out/soong/host/linux-x86/symlinks", name))
		return module(name, true).Output(filepath.Join("out/host/linux-x86/symlinks", name))
	}

	assertInputs := func(params TestingBuildParams, inputs ...Path) {
+1 −1
Original line number Diff line number Diff line
@@ -2076,7 +2076,7 @@ func pathForInstall(ctx PathContext, os OsType, arch ArchType, partition string,
		reportPathError(ctx, err)
	}

	base := pathForPartitionInstallDir(ctx, partition, partitionPath, ctx.Config().KatiEnabled())
	base := pathForPartitionInstallDir(ctx, partition, partitionPath, true)
	return base.Join(ctx, pathComponents...)
}

+2 −2
Original line number Diff line number Diff line
@@ -1561,7 +1561,7 @@ func TestPathRelativeToTop(t *testing.T) {

	t.Run("install for soong", func(t *testing.T) {
		p := PathForModuleInstall(ctx, "install/path")
		AssertPathRelativeToTopEquals(t, "install path for soong", "out/soong/target/product/test_device/system/install/path", p)
		AssertPathRelativeToTopEquals(t, "install path for soong", "out/target/product/test_device/system/install/path", p)
	})
	t.Run("install for make", func(t *testing.T) {
		p := PathForModuleInstall(ctx, "install/path")
@@ -1584,7 +1584,7 @@ func TestPathRelativeToTop(t *testing.T) {
		}

		expected := []string{
			"out/soong/target/product/test_device/system/install/path",
			"out/target/product/test_device/system/install/path",
			"out/soong/output/path",
			"source/path",
		}
+4 −4
Original line number Diff line number Diff line
@@ -358,7 +358,7 @@ func TestRuleBuilder(t *testing.T) {
			"command3 input3 out_local/soong/module/output2 out_local/soong/module/output3 input3 out_local/soong/module/output2",
		}

		wantDepMergerCommand := "out_local/soong/host/" + ctx.Config().PrebuiltOS() + "/bin/dep_fixer " +
		wantDepMergerCommand := "out_local/host/" + ctx.Config().PrebuiltOS() + "/bin/dep_fixer " +
			"out_local/soong/module/DepFile out_local/soong/module/depfile out_local/soong/module/ImplicitDepFile out_local/soong/module/depfile2"

		AssertDeepEquals(t, "rule.Commands()", wantCommands, rule.Commands())
@@ -388,7 +388,7 @@ func TestRuleBuilder(t *testing.T) {
			"command3 input3 __SBOX_SANDBOX_DIR__/out/output2 __SBOX_SANDBOX_DIR__/out/output3 input3 __SBOX_SANDBOX_DIR__/out/output2",
		}

		wantDepMergerCommand := "out_local/soong/host/" + ctx.Config().PrebuiltOS() + "/bin/dep_fixer __SBOX_SANDBOX_DIR__/out/DepFile __SBOX_SANDBOX_DIR__/out/depfile __SBOX_SANDBOX_DIR__/out/ImplicitDepFile __SBOX_SANDBOX_DIR__/out/depfile2"
		wantDepMergerCommand := "out_local/host/" + ctx.Config().PrebuiltOS() + "/bin/dep_fixer __SBOX_SANDBOX_DIR__/out/DepFile __SBOX_SANDBOX_DIR__/out/depfile __SBOX_SANDBOX_DIR__/out/ImplicitDepFile __SBOX_SANDBOX_DIR__/out/depfile2"

		AssertDeepEquals(t, "rule.Commands()", wantCommands, rule.Commands())

@@ -664,7 +664,7 @@ func TestRuleBuilder_Build(t *testing.T) {
		rspFile := filepath.Join(outDir, "rsp")
		rspFile2 := filepath.Join(outDir, "rsp2")
		manifest := filepath.Join(outDir, "sbox.textproto")
		sbox := filepath.Join("out", "soong", "host", result.Config.PrebuiltOS(), "bin/sbox")
		sbox := filepath.Join("out", "host", result.Config.PrebuiltOS(), "bin/sbox")
		sandboxPath := shared.TempDirForOutDir("out/soong")

		cmd := sbox + ` --sandbox-path ` + sandboxPath + ` --output-dir ` + sboxOutDir + ` --manifest ` + manifest
@@ -680,7 +680,7 @@ func TestRuleBuilder_Build(t *testing.T) {
		rspFile := filepath.Join(outDir, "rsp")
		rspFile2 := filepath.Join(outDir, "rsp2")
		manifest := filepath.Join(outDir, "sbox.textproto")
		sbox := filepath.Join("out", "soong", "host", result.Config.PrebuiltOS(), "bin/sbox")
		sbox := filepath.Join("out", "host", result.Config.PrebuiltOS(), "bin/sbox")
		sandboxPath := shared.TempDirForOutDir("out/soong")

		cmd := sbox + ` --sandbox-path ` + sandboxPath + ` --output-dir ` + sboxOutDir + ` --manifest ` + manifest
+1 −1
Original line number Diff line number Diff line
@@ -4771,7 +4771,7 @@ func TestApexInVariousPartition(t *testing.T) {
			`)

			apex := ctx.ModuleForTests("myapex", "android_common_myapex").Module().(*apexBundle)
			expected := "out/soong/target/product/test_device/" + tc.partition + "/apex"
			expected := "out/target/product/test_device/" + tc.partition + "/apex"
			actual := apex.installDir.RelativeToTop().String()
			if actual != expected {
				t.Errorf("wrong install path. expected %q. actual %q", expected, actual)
Loading