1from os import environ 2from dataclasses import dataclass, field 3 4@dataclass 5class ModuleConfig: 6 dirs: list[str] 7 gradlew_location: str = "" 8 gradlew_target: str = "" 9 excludes: list[str] = field(default_factory=list) 10 11TestModuleMapping: dict[str, ModuleConfig] = { 12 "CarrierDefaultAppUnitTests": ModuleConfig(["frameworks/base/packages/CarrierDefaultApp/tests/"]), 13 "DynamicSystemInstallationServiceTests": ModuleConfig(["frameworks/base/packages/DynamicSystemInstallationService/tests/"]), 14 "ExternalStorageProviderTests": ModuleConfig(["frameworks/base/packages/ExternalStorageProvider/tests/"]), 15 "FusedLocationTests": ModuleConfig(["frameworks/base/packages/FusedLocation/test/src/com/android/location/fused/tests/"]), 16 "FusedLocationTests": ModuleConfig(["frameworks/base/packages/FusedLocation/test/src/com/android/location/gnss/tests/"]), 17 "OverlayTests": ModuleConfig(["frameworks/base/packages/overlays/tests/"]), 18 "PrintSpoolerOutOfProcessTests": ModuleConfig(["frameworks/base/packages/PrintSpooler/tests/"]), 19 "SettingsLibDataStoreTest": ModuleConfig(["frameworks/base/packages/SettingsLib/DataStore/tests/"]), 20 "SpaPrivilegedLibTests": ModuleConfig(["frameworks/base/packages/SettingsLib/SpaPrivileged/tests/"]), 21 "SpaScreenshotTests": ModuleConfig(["frameworks/base/packages/SettingsLib/Spa/screenshot/"]), 22 "SpaLibTests": ModuleConfig(["frameworks/base/packages/SettingsLib/Spa/tests/"]), 23 "SettingsLibTests": ModuleConfig(["frameworks/base/packages/SettingsLib/tests/"]), 24 "SettingsLibUnitTests": ModuleConfig(["frameworks/base/packages/SettingsLib/tests/"]), 25 "SettingsProviderTest": ModuleConfig(["frameworks/base/packages/SettingsProvider/test/"]), 26 "ShellTests": ModuleConfig(["frameworks/base/packages/Shell/tests/"]), 27 "AccessibilityMenuServiceTests": ModuleConfig(["frameworks/base/packages/SystemUI/accessibility/accessibilitymenu/tests/"]), 28 "SystemUILintCheckerTest": ModuleConfig(["frameworks/base/packages/SystemUI/checks/tests/"]), 29 "PlatformComposeCoreTests": ModuleConfig(["frameworks/base/packages/SystemUI/compose/core/tests/"]), 30 "PlatformComposeSceneTransitionLayoutTests": ModuleConfig(["frameworks/base/packages/SystemUI/compose/scene/tests/"]), 31 "SystemUITests": ModuleConfig(["frameworks/base/packages/SystemUI/tests/"]), 32 "VpnDialogsTests": ModuleConfig(["frameworks/base/packages/VpnDialogs/tests/"]), 33 "WallpaperBackupAgentTests": ModuleConfig(["frameworks/base/packages/WallpaperBackup/test/"]), 34 "AvatarPickerUITests": ModuleConfig(["packages/apps/AvatarPicker/src/tests/"]), 35 "AvatarPickerUnitTests": ModuleConfig(["packages/apps/AvatarPicker/src/tests/"]), 36 "CarLauncherTests": ModuleConfig(["packages/apps/Car/Launcher/app/tests/"]), 37 "CarDockLibTests": ModuleConfig(["packages/apps/Car/Launcher/docklib/tests/"]), 38 "CarDockUtilLibTests": ModuleConfig(["packages/apps/Car/Launcher/docklib-util/tests/"]), 39 "CarAppGridTests": ModuleConfig(["packages/apps/Car/Launcher/libs/appgrid/lib/tests/"]), 40 "CarLauncherCommonTests": ModuleConfig(["packages/apps/Car/Launcher/libs/car-launcher-common/tests/"]), 41 "CarNotificationUnitTests": ModuleConfig(["packages/apps/Car/Notification/tests/"]), 42 "CarRotaryControllerUnitTests": ModuleConfig(["packages/apps/Car/RotaryController/tests/"]), 43 "CarSettingsUnitTests": ModuleConfig(["packages/apps/Car/Settings/tests/"]), 44 "CarBroadcastRadioSupportTests": ModuleConfig(["packages/apps/Car/systemlibs/car-broadcastradio-support/tests/"]), 45 "CarQCLibUnitTests": ModuleConfig(["packages/apps/Car/systemlibs/car-qc-lib/tests/"]), 46 "CarSystemUITests": ModuleConfig(["packages/apps/Car/SystemUI/tests/"]), 47 "CellBroadcastReceiverComplianceTests": ModuleConfig(["packages/apps/CellBroadcastReceiver/tests/"]), 48 "CellBroadcastReceiverUnitTests": ModuleConfig(["packages/apps/CellBroadcastReceiver/tests/"]), 49 "ContactsTests": ModuleConfig(["packages/apps/Contacts/tests/"]), 50 "DeskClockTests": ModuleConfig(["packages/apps/DeskClock/tests/"]), 51 "DocumentsUITests": ModuleConfig(["packages/apps/DocumentsUI/app-perf-tests/"]), 52 "DocumentsUITests": ModuleConfig(["packages/apps/DocumentsUI/tests/"]), 53 "EmergencyInfoUnitTests": ModuleConfig(["packages/apps/EmergencyInfo/tests/"]), 54 "ImsServiceEntitlementUnitTests": ModuleConfig(["packages/apps/ImsServiceEntitlement/tests/"]), 55 "KeyChainTests": ModuleConfig(["packages/apps/KeyChain/tests/"]), 56 "Launcher3Tests": ModuleConfig(dirs=["packages/apps/Launcher3/tests/", 57 "packages/apps/Launcher3/quickstep/tests/", 58 "vendor/unbundled_google/packages/NexusLauncher/tests/" 59 ], 60 gradlew_location="vendor/unbundled_google/packages/SystemUIGoogle/studio-dev/SysUIGradleProject", 61 gradlew_target=":NexusLauncher:testGoogleWithQuickstepDebugUnitTest", 62 excludes=["Tapl", "ImageTest", "AbstractDeviceProfileTest", "SearchSessionLifecycleTest"]), 63 "ManagedProvisioningTests": ModuleConfig(["packages/apps/ManagedProvisioning/tests/"]), 64 "NfcNciInstrumentationTests": ModuleConfig(["packages/apps/Nfc/tests/"]), 65 "NfcNciUnitTests": ModuleConfig(["packages/apps/Nfc/tests/"]), 66 "DevPluginTests": ModuleConfig(["packages/apps/OMA-DM/plugins/tests/"]), 67 "AnomalyTester": ModuleConfig(["packages/apps/Settings/tests/"]), 68 "SettingsComponentTests": ModuleConfig(["packages/apps/Settings/tests/"]), 69 "SettingsPerfTests": ModuleConfig(["packages/apps/Settings/tests/"]), 70 "SettingsSpaUnitTests": ModuleConfig(["packages/apps/Settings/tests/"]), 71 "SettingsUITests": ModuleConfig(["packages/apps/Settings/tests/"]), 72 "SettingsUnitTests": ModuleConfig(["packages/apps/Settings/tests/"]), 73 "StorageManagerAppTests": ModuleConfig(["packages/apps/StorageManager/tests/"]), 74 "StorageManagerUnitTests": ModuleConfig(["packages/apps/StorageManager/tests/"]), 75 "TraceurUiTests": ModuleConfig(["packages/apps/Traceur/uitests/"]), 76 "TvSystemUITests": ModuleConfig(["packages/apps/TvSystemUI/tests/"]), 77 "TVFuncTests": ModuleConfig(["packages/apps/TV/tests/"]), 78 "TVUnitTests": ModuleConfig(["packages/apps/TV/tests/"]), 79 "WallpaperPicker2Tests": ModuleConfig(["packages/apps/WallpaperPicker2/tests/"]), 80 "AvatarPickerGoogleUnitTests": ModuleConfig(["vendor/unbundled_google/packages/AvatarPickerGoogle/src/tests/"]), 81 "CarrierSetupTests": ModuleConfig(["vendor/unbundled_google/packages/CarrierEntitlement/CarrierSetup/tests/"]), 82 "NexusLauncherTests": ModuleConfig(["vendor/unbundled_google/packages/NexusLauncher/tests/"]), 83 "PCLauncherTests": ModuleConfig(["vendor/unbundled_google/packages/PC/Launcher/tests/"]), 84 "SettingsGoogleTests": ModuleConfig(["vendor/unbundled_google/packages/SettingsGoogle/tests/"]), 85 "SettingsModelTest": ModuleConfig(["vendor/unbundled_google/packages/SettingsGoogle/tests/"]), 86 "SettingsOutputTest": ModuleConfig(["vendor/unbundled_google/packages/SettingsGoogle/tests/"]), 87 "SettingsGoogleUITests": ModuleConfig(["vendor/unbundled_google/packages/SettingsGoogle/tests/"]), 88 "SettingsGoogleUnitTests": ModuleConfig(["vendor/unbundled_google/packages/SettingsGoogle/tests/"]), 89 "SystemUIClocksTests": ModuleConfig(["vendor/unbundled_google/packages/SystemUIGoogle/clocks/tests/"]), 90 "SystemUIComposeGalleryTests": ModuleConfig(["vendor/unbundled_google/packages/SystemUIGoogle/compose/gallery/tests/"]), 91 "SystemUIGoogleTests": ModuleConfig(["vendor/unbundled_google/packages/SystemUIGoogle/tests/"]), 92 "AiWallpapersTests": ModuleConfig(["vendor/unbundled_google/packages/WallpaperEffect/AiWallpapers/tests/"]), 93 "WallpaperEffectTests": ModuleConfig(["vendor/unbundled_google/packages/WallpaperEffect/CinematicWallpapers/tests/"]), 94 "WallpaperEffectTests": ModuleConfig(["vendor/unbundled_google/packages/WallpaperEffect/CinematicWallpapers/unittests/"]), 95 "MagicPortraitWallpapersTests": ModuleConfig(["vendor/unbundled_google/packages/WallpaperEffect/MagicPortrait/tests/"]), 96 "WallpaperPickerGoogleTests": ModuleConfig(["vendor/unbundled_google/packages/WallpaperPickerGoogle/tests/"]), 97 "ContactsProviderTests": ModuleConfig(["packages/providers/ContactsProvider/tests/"]), 98 "TelephonyProviderTests": ModuleConfig(["packages/providers/TelephonyProvider/tests/"]), 99 "MediaProviderTests": ModuleConfig(["packages/providers/MediaProvider/tests/"]), 100 "MediaProviderClientTests": ModuleConfig(["packages/providers/MediaProvider/tests/"]), 101 "BlockedNumberProviderTest": ModuleConfig(["packages/providers/BlockedNumberProvider/tests/"]), 102 "DownloadPublicApiAccessTests": ModuleConfig(["packages/providers/DownloadProvider/tests/"]), 103 "CalendarProviderTests": ModuleConfig(["packages/providers/CalendarProvider/tests/"]), 104} 105 106@dataclass 107class Config: 108 module_configs: list[ModuleConfig] 109 build_top: str = environ.get("ANDROID_BUILD_TOP") 110 output_dir: str = "~/out" 111