mk2bp LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG
Added the support to convert the Make boolean variable LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG as auto_gen_config and reverse its value in the androidmk tool. Bug: 216194235 Test: m androidmk Test: TreeHugger Change-Id: Ieb51d52df78b9f8d78b36e864fa1e3489faa8c45
This commit is contained in:
parent
c01e074fef
commit
4cba817e24
2 changed files with 32 additions and 0 deletions
|
@ -68,6 +68,8 @@ var rewriteProperties = map[string](func(variableAssignmentContext) error){
|
||||||
"LOCAL_MODULE_PATH": prebuiltModulePath,
|
"LOCAL_MODULE_PATH": prebuiltModulePath,
|
||||||
"LOCAL_REPLACE_PREBUILT_APK_INSTALLED": prebuiltPreprocessed,
|
"LOCAL_REPLACE_PREBUILT_APK_INSTALLED": prebuiltPreprocessed,
|
||||||
|
|
||||||
|
"LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG": invert("auto_gen_config"),
|
||||||
|
|
||||||
// composite functions
|
// composite functions
|
||||||
"LOCAL_MODULE_TAGS": includeVariableIf(bpVariable{"tags", bpparser.ListType}, not(valueDumpEquals("optional"))),
|
"LOCAL_MODULE_TAGS": includeVariableIf(bpVariable{"tags", bpparser.ListType}, not(valueDumpEquals("optional"))),
|
||||||
|
|
||||||
|
|
|
@ -1643,6 +1643,36 @@ android_app {
|
||||||
"gen_src3",
|
"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,
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue