Files
frameworks_base/packages/SystemUI/TEST_MAPPING
Nicolo' Mazzucato 8a001c1a4f Add DeviceTypeRule to filter tests only for large screens or foldable
This allows SysUI test classes to specify if they are meant only for large screens or tablet by using an annotation.

This allow us to avoid having several custom suites to manually setup for special needs (e.g. foldable/tablet), simplifying test configuration. After this change, it is only needed to add the usual integration test suite also to foldable/tablet build targets, and everything will work fine (on phones, annotated tests will not work)

If those rules work, then FoldableOnlyRuleTest and LargeScreenOnlyRuleTest shouldn't fail in any target during presubmits.

Test: atest FoldableOnlyRuleTest && atest LargeScreenOnlyRuleTest
Bug: 228597099
Change-Id: I8f1579cdee9df9d8e5001730c184d34575651273
2022-04-13 20:45:01 +00:00

173 lines
4.4 KiB
Plaintext

{
// Looking for unit test presubmit configuration?
// This currently lives in ATP config apct/system_ui/unit_test
"presubmit-large": [
{
"name": "PlatformScenarioTests",
"options": [
{
"include-filter": "android.platform.test.scenario.sysui"
},
{
"include-annotation": "android.platform.test.scenario.annotation.Scenario"
},
{
"exclude-annotation": "org.junit.Ignore"
},
{
"exclude-annotation": "android.platform.test.annotations.Postsubmit"
}
]
}
],
"presubmit": [
{
"name": "SystemUIGoogleTests",
"options": [
{
"exclude-annotation": "org.junit.Ignore"
},
{
"exclude-annotation": "androidx.test.filters.FlakyTest"
}
]
},
{
// Permission indicators
"name": "CtsPermission4TestCases",
"options": [
{
"exclude-annotation": "org.junit.Ignore"
},
{
"exclude-annotation": "androidx.test.filters.FlakyTest"
}
]
},
{
// Permission indicators
"name": "CtsVoiceRecognitionTestCases",
"options": [
{
"exclude-annotation": "org.junit.Ignore"
},
{
"exclude-annotation": "androidx.test.filters.FlakyTest"
}
]
}
],
// Curious where your @Scenario tests will run?
//
// @Ignore: nowhere
// @Staging or @FlakyTest: in staged-postsubmit, but not postsubmit or
// presubmit
// @Postsubmit: in postsubmit and staged-postsubmit, but not presubmit
// none of the above: in presubmit, postsubmit, and staged-postsubmit
//
// Therefore, please annotate new tests with @Staging, then with @Postsubmit
// once they're ready for postsubmit, then with neither once they're ready
// for presubmit.
//
// If you don't use @Staging or @Postsubmit, your new test will immediately
// block presubmit, which is probably not what you want!
"platinum-postsubmit": [
{
"name": "PlatformScenarioTests",
"options": [
{
"include-filter": "android.platform.test.scenario.sysui"
},
{
"include-annotation": "android.platform.test.scenario.annotation.Scenario"
},
{
"exclude-annotation": "org.junit.Ignore"
},
{
"exclude-annotation": "androidx.test.filters.FlakyTest"
}
]
}
],
"staged-platinum-postsubmit": [
{
"name": "PlatformScenarioTests",
"options": [
{
"include-filter": "android.platform.test.scenario.sysui"
},
{
"include-annotation": "android.platform.test.scenario.annotation.Scenario"
},
{
"exclude-annotation": "org.junit.Ignore"
}
]
}
],
"auto-end-to-end-postsubmit": [
{
"name": "AndroidAutomotiveHomeTests",
"options" : [
{
"include-filter": "android.platform.tests.HomeTest"
}
]
},
{
"name": "AndroidAutomotiveNotificationsTests",
"options" : [
{
"include-filter": "android.platform.tests.NotificationTest"
}
]
}
],
"hubui-postsubmit": [
{
"name": "PlatformScenarioTests",
"options": [
{
"include-filter": "android.platform.test.scenario.hubui"
},
{
"include-annotation": "android.platform.test.scenario.annotation.HubUi"
},
{
"exclude-annotation": "org.junit.Ignore"
},
{
"exclude-annotation": "androidx.test.filters.FlakyTest"
}
]
}
],
"hubui-presubmit": [
{
"name": "PlatformScenarioTests",
"options": [
{
"include-annotation": "android.platform.test.annotations.Presubmit"
},
{
"include-annotation": "android.platform.test.scenario.annotation.HubUi"
},
{
"include-filter": "android.platform.test.scenario.hubui"
},
{
"exclude-annotation": "org.junit.Ignore"
},
{
"exclude-annotation": "androidx.test.filters.FlakyTest"
},
{
"exclude-annotation": "android.platform.test.annotations.Postsubmit"
}
]
}
]
}