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

Commit 02284474 authored by Yuntao Xu's avatar Yuntao Xu Committed by Gerrit Code Review
Browse files

Merge "mk2bp LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG"

parents fc70d4d2 4cba817e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -68,6 +68,8 @@ var rewriteProperties = map[string](func(variableAssignmentContext) error){
	"LOCAL_MODULE_PATH":                    prebuiltModulePath,
	"LOCAL_REPLACE_PREBUILT_APK_INSTALLED": prebuiltPreprocessed,

	"LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG": invert("auto_gen_config"),

	// composite functions
	"LOCAL_MODULE_TAGS": includeVariableIf(bpVariable{"tags", bpparser.ListType}, not(valueDumpEquals("optional"))),

+30 −0
Original line number Diff line number Diff line
@@ -1643,6 +1643,36 @@ android_app {
		"gen_src3",
	],
}
`,
	},
	{
		desc: "LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG is true",
		in: `
include $(CLEAR_VARS)
LOCAL_MODULE := foo
LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG := true
include $(BUILD_PACKAGE)
		`,
		expected: `
android_app {
	name: "foo",
	auto_gen_config: false,
}
`,
	},
	{
		desc: "LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG is false",
		in: `
include $(CLEAR_VARS)
LOCAL_MODULE := foo
LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG := false
include $(BUILD_PACKAGE)
		`,
		expected: `
android_app {
	name: "foo",
	auto_gen_config: true,
}
`,
	},
}