diff options
author | Colin Cross <ccross@android.com> | 2018-10-04 15:22:03 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2018-10-08 15:26:00 -0700 |
commit | 252fc6f422e2d5328be8f426f7a686f4d9641a49 (patch) | |
tree | 97b156bf83fc6a636616fcb243f00e7a0eb280c8 /java/androidmk.go | |
parent | bd01e2abee24a1567438f66602bec4309da85bde (diff) | |
download | android_build_soong-252fc6f422e2d5328be8f426f7a686f4d9641a49.tar.gz android_build_soong-252fc6f422e2d5328be8f426f7a686f4d9641a49.tar.bz2 android_build_soong-252fc6f422e2d5328be8f426f7a686f4d9641a49.zip |
Add android_test_helper_app
Add a module that can build an APK that will be used by a test.
The APK will be sideloadable, and can be added to a test suite,
but will not autogenerate a test config file.
Test: m checkbuild
Change-Id: Idf325b1c9a2cbcd16b126da3331671e4aed4b3da
Diffstat (limited to 'java/androidmk.go')
-rw-r--r-- | java/androidmk.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/java/androidmk.go b/java/androidmk.go index 7a2fe1e1..359594c1 100644 --- a/java/androidmk.go +++ b/java/androidmk.go @@ -271,6 +271,21 @@ func (a *AndroidTest) AndroidMk() android.AndroidMkData { return data } +func (a *AndroidTestHelperApp) 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.appTestHelperAppProperties.Test_suites) > 0 { + fmt.Fprintln(w, "LOCAL_COMPATIBILITY_SUITE :=", + strings.Join(a.appTestHelperAppProperties.Test_suites, " ")) + } else { + fmt.Fprintln(w, "LOCAL_COMPATIBILITY_SUITE := null-suite") + } + }) + + return data +} + func (a *AndroidLibrary) AndroidMk() android.AndroidMkData { data := a.Library.AndroidMk() |