Add support of test data to python_host_test

Bug: none
Test: m -j vts_vndk_abi_test
confirm abi_dump.zip found next to test binary

Change-Id: I834dddfc13eb9e7addd234307b085b16124db234
This commit is contained in:
Dan Shi
2020-09-21 12:11:02 -07:00
parent f793d7deb4
commit 3194912150
5 changed files with 39 additions and 21 deletions

View File

@@ -634,3 +634,21 @@ func shouldSkipAndroidMkProcessing(module *ModuleBase) bool {
// Make does not understand LinuxBionic
module.Os() == LinuxBionic
}
func AndroidMkDataPaths(data []DataPath) []string {
var testFiles []string
for _, d := range data {
rel := d.SrcPath.Rel()
path := d.SrcPath.String()
if !strings.HasSuffix(path, rel) {
panic(fmt.Errorf("path %q does not end with %q", path, rel))
}
path = strings.TrimSuffix(path, rel)
testFileString := path + ":" + rel
if len(d.RelativeInstallPath) > 0 {
testFileString += ":" + d.RelativeInstallPath
}
testFiles = append(testFiles, testFileString)
}
return testFiles
}