Improve testing of mainline_modules_sdks.py am: de60aeb525

Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2032128

Change-Id: Id3c26e1876d532a398eec54013349c1834eea99f
This commit is contained in:
Paul Duffin
2022-03-21 12:00:34 +00:00
committed by Automerger Merge Worker
2 changed files with 38 additions and 12 deletions

View File

@@ -740,6 +740,18 @@ def create_producer():
)
def aosp_to_google(module):
"""Transform an AOSP module into a Google module"""
new_apex = aosp_to_google_name(module.apex)
# Create a copy of the AOSP module with the internal specific APEX name.
return dataclasses.replace(module, apex=new_apex)
def aosp_to_google_name(name):
"""Transform an AOSP module name into a Google module name"""
return name.replace("com.android.", "com.google.android.")
def filter_modules(modules):
target_build_apps = os.environ.get("TARGET_BUILD_APPS")
if target_build_apps: