Merge "Add support of test data to python_host_test"
This commit is contained in:
@@ -639,3 +639,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
|
||||
}
|
||||
|
Reference in New Issue
Block a user