Add support for android_test modules
android_test module are APKs that can be run as tests, either as standalone unit tests or as instrumentation tests for another APK. Test: m checkbuild Change-Id: I16661701637e4048fd99442029c3e195ebf373a4
This commit is contained in:
@@ -228,6 +228,19 @@ func (app *AndroidApp) AndroidMk() android.AndroidMkData {
|
||||
}
|
||||
}
|
||||
|
||||
func (a *AndroidTest) AndroidMk() android.AndroidMkData {
|
||||
data := a.AndroidApp.AndroidMk()
|
||||
data.Extra = append(data.Extra, func(w io.Writer, outputFile android.Path) {
|
||||
fmt.Fprintln(w, "LOCAL_MODULE_TAGS := tests")
|
||||
if len(a.testProperties.Test_suites) > 0 {
|
||||
fmt.Fprintln(w, "LOCAL_COMPATIBILITY_SUITE :=",
|
||||
strings.Join(a.testProperties.Test_suites, " "))
|
||||
}
|
||||
})
|
||||
|
||||
return data
|
||||
}
|
||||
|
||||
func (a *AndroidLibrary) AndroidMk() android.AndroidMkData {
|
||||
data := a.Library.AndroidMk()
|
||||
|
||||
|
Reference in New Issue
Block a user