Remove extraneous calls to TestingBuildParams.RelativeToTop()
Deprecated the method to try and prevent any other uses being added. Bug: 183650682 Test: m nothing Change-Id: Ia6f43851e5a00c9d96af780e3bd21e03175e1a2f
This commit is contained in:
@@ -645,7 +645,7 @@ func TestRuleBuilder_Build(t *testing.T) {
|
||||
rspFile := "out/soong/.intermediates/foo/rsp"
|
||||
rspFile2 := "out/soong/.intermediates/foo/rsp2"
|
||||
module := result.ModuleForTests("foo", "")
|
||||
check(t, module.Rule("rule").RelativeToTop(), module.Output(rspFile2).RelativeToTop(),
|
||||
check(t, module.Rule("rule"), module.Output(rspFile2),
|
||||
"cp bar "+outFile+" @"+rspFile+" @"+rspFile2,
|
||||
outFile, outFile+".d", rspFile, rspFile2, true, nil, nil)
|
||||
})
|
||||
@@ -662,7 +662,7 @@ func TestRuleBuilder_Build(t *testing.T) {
|
||||
cmd := `rm -rf ` + outDir + `/gen && ` +
|
||||
sbox + ` --sandbox-path ` + sandboxPath + ` --manifest ` + manifest
|
||||
module := result.ModuleForTests("foo_sbox", "")
|
||||
check(t, module.Output("gen/foo_sbox").RelativeToTop(), module.Output(rspFile2).RelativeToTop(),
|
||||
check(t, module.Output("gen/foo_sbox"), module.Output(rspFile2),
|
||||
cmd, outFile, depFile, rspFile, rspFile2, false, []string{manifest}, []string{sbox})
|
||||
})
|
||||
t.Run("sbox_inputs", func(t *testing.T) {
|
||||
@@ -679,7 +679,7 @@ func TestRuleBuilder_Build(t *testing.T) {
|
||||
sbox + ` --sandbox-path ` + sandboxPath + ` --manifest ` + manifest
|
||||
|
||||
module := result.ModuleForTests("foo_sbox_inputs", "")
|
||||
check(t, module.Output("gen/foo_sbox_inputs").RelativeToTop(), module.Output(rspFile2).RelativeToTop(),
|
||||
check(t, module.Output("gen/foo_sbox_inputs"), module.Output(rspFile2),
|
||||
cmd, outFile, depFile, rspFile, rspFile2, false, []string{manifest}, []string{sbox})
|
||||
})
|
||||
t.Run("singleton", func(t *testing.T) {
|
||||
@@ -687,7 +687,7 @@ func TestRuleBuilder_Build(t *testing.T) {
|
||||
rspFile := filepath.Join("out/soong/singleton/rsp")
|
||||
rspFile2 := filepath.Join("out/soong/singleton/rsp2")
|
||||
singleton := result.SingletonForTests("rule_builder_test")
|
||||
check(t, singleton.Rule("rule").RelativeToTop(), singleton.Output(rspFile2).RelativeToTop(),
|
||||
check(t, singleton.Rule("rule"), singleton.Output(rspFile2),
|
||||
"cp bar "+outFile+" @"+rspFile+" @"+rspFile2,
|
||||
outFile, outFile+".d", rspFile, rspFile2, true, nil, nil)
|
||||
})
|
||||
|
@@ -551,6 +551,8 @@ type TestingBuildParams struct {
|
||||
// * CommandOrderOnly
|
||||
//
|
||||
// See PathRelativeToTop for more details.
|
||||
//
|
||||
// deprecated: this is no longer needed as TestingBuildParams are created in this form.
|
||||
func (p TestingBuildParams) RelativeToTop() TestingBuildParams {
|
||||
// If this is not a valid params then just return it back. That will make it easy to use with the
|
||||
// Maybe...() methods.
|
||||
|
Reference in New Issue
Block a user