Allow manually specifying translations for modules

Parse the comment block above each module or assignment looking
for directives in the form:
Android.mk:<directive>
If a block delimited by start and end directives is found, use it
as the Android.mk translation instead of trying to automatically
translate.  If an ignore directive is found, ignore the module
completely.

Change-Id: I34fe392899ed27ce3f640a2a71fbbaaedea67169
This commit is contained in:
Colin Cross
2015-06-29 16:24:57 -07:00
parent b093124675
commit b1a66c0cf7
2 changed files with 116 additions and 0 deletions

View File

@@ -117,6 +117,20 @@ var moduleTestCases = []struct {
LOCAL_MODULE := test
include $(BUILD_HOST_STATIC_LIBRARY)`,
},
// Manual translation
{
blueprint: `/* Android.mk:start
# Manual translation
Android.mk:end */
cc_library { name: "test", host_supported: true, }`,
androidmk: `# Manual translation`,
},
// Ignored translation
{
blueprint: `/* Android.mk:ignore */
cc_library { name: "test", host_supported: true, }`,
androidmk: ``,
},
}
func TestModules(t *testing.T) {