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

Commit 496eb3e0 authored by Trevor Radcliffe's avatar Trevor Radcliffe Committed by Automerger Merge Worker
Browse files

Merge "Ignore obsolete lines when converting makefiles" am: 8c1ae8f2 am:...

Merge "Ignore obsolete lines when converting makefiles" am: 8c1ae8f2 am: 6e4211d0 am: 1b2e2ff8 am: 0013b0b8

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1853833

Change-Id: I372d972abb84d6b6be05461a7bd2e5d3930f7489
parents ee831591 0013b0b8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -639,6 +639,12 @@ func prebuiltModulePath(ctx variableAssignmentContext) error {
	if len(val.Variables) == 1 && varLiteralName(val.Variables[0]) != "" && len(val.Strings) == 2 && val.Strings[0] == "" {
		fixed = val.Strings[1]
		varname = val.Variables[0].Name.Strings[0]
		// TARGET_OUT_OPTIONAL_EXECUTABLES puts the artifact in xbin, which is
		// deprecated. TARGET_OUT_DATA_APPS install location will be handled
		// automatically by Soong
		if varname == "TARGET_OUT_OPTIONAL_EXECUTABLES" || varname == "TARGET_OUT_DATA_APPS" {
			return nil
		}
	} else if len(val.Variables) == 2 && varLiteralName(val.Variables[0]) == "PRODUCT_OUT" && varLiteralName(val.Variables[1]) == "TARGET_COPY_OUT_VENDOR" &&
		len(val.Strings) == 3 && val.Strings[0] == "" && val.Strings[1] == "/" {
		fixed = val.Strings[2]
+17 −1
Original line number Diff line number Diff line
@@ -1516,7 +1516,23 @@ android_app {
    ],
}
`,
	},
	}, {
		desc: "Obsolete LOCAL_MODULE_PATH",
		in: `
include $(CLEAR_VARS)
LOCAL_MODULE := foo
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
LOCAL_CTS_TEST_PACKAGE := bar
LOCAL_USE_AAPT2 := blah
include $(BUILD_PACKAGE)
`,
		expected: `
android_app {
  name: "foo",

}
`},
}

func TestEndToEnd(t *testing.T) {