Set targetSdkVersion to 10000 for MTS tests targeting current

MTS tests built on unstable branches (e.g. git_master) should be testable on
old system images (e.g. S). However, they run into an error during installation
on older images:
`Requires development platform $<current_codename>, but this is a
release platform`

This CL fixes this issue by updating the target_sdk_version of MTS test apps
targeting current to the magical sdk_version 10000

Bug: 227473065
Test: go build ./java
Test: TH
Change-Id: Ic0358a48a19dc239defbb4ee8ec99225cce75584
This commit is contained in:
Spandan Das
2022-07-25 00:34:18 +00:00
parent 3a0355f99c
commit 9f7ae7f565
3 changed files with 88 additions and 1 deletions

View File

@@ -962,6 +962,18 @@ func (a *AndroidTest) InstallInTestcases() bool {
return true
}
type androidTestApp interface {
includedInTestSuite(searchPrefix string) bool
}
func (a *AndroidTest) includedInTestSuite(searchPrefix string) bool {
return android.PrefixInList(a.testProperties.Test_suites, searchPrefix)
}
func (a *AndroidTestHelperApp) includedInTestSuite(searchPrefix string) bool {
return android.PrefixInList(a.appTestHelperAppProperties.Test_suites, searchPrefix)
}
func (a *AndroidTest) GenerateAndroidBuildActions(ctx android.ModuleContext) {
var configs []tradefed.Config
if a.appTestProperties.Instrumentation_target_package != nil {