From 8d6a4e021e1dc4717939e05aee89c9b18e383d12 Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Sun, 23 Oct 2022 19:23:12 +0000 Subject: Revert "Convert per-test run scripts to python." This reverts commit 895c27039a57ec19efc8f526ac17b1ae28e2edd9. Reason for revert: Breaks tests Change-Id: If7d346b23731d32d1fdf31346bebcb658fbce421 --- test/etc/apex_bootclasspath_utils.py | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) (limited to 'test/etc/apex_bootclasspath_utils.py') diff --git a/test/etc/apex_bootclasspath_utils.py b/test/etc/apex_bootclasspath_utils.py index d2415e5d3d..f969b149b2 100755 --- a/test/etc/apex_bootclasspath_utils.py +++ b/test/etc/apex_bootclasspath_utils.py @@ -23,9 +23,10 @@ import os, sys # Note: This must start with the CORE_IMG_JARS in Android.common_path.mk # because that's what we use for compiling the boot.art image. # It may contain additional modules from TEST_CORE_JARS. -bpath_modules = ("core-oj core-libart okhttp bouncycastle apache-xml core-icu4j" - " conscrypt") +bpath_modules="core-oj core-libart okhttp bouncycastle apache-xml core-icu4j conscrypt" +ANDROID_BUILD_TOP=os.environ["ANDROID_BUILD_TOP"] +ANDROID_HOST_OUT=os.environ["ANDROID_HOST_OUT"] # Helper function to construct paths for apex modules (for both -Xbootclasspath and # -Xbootclasspath-location). @@ -33,44 +34,40 @@ bpath_modules = ("core-oj core-libart okhttp bouncycastle apache-xml core-icu4j" # Arguments. # ${1}: path prefix. def get_apex_bootclasspath_impl(bpath_prefix: str): - bpath_separator = "" - bpath = "" - bpath_jar = "" + bpath_separator="" + bpath="" + bpath_jar="" for bpath_module in bpath_modules.split(" "): - apex_module = "com.android.art" + apex_module="com.android.art" if bpath_module == "conscrypt": - apex_module = "com.android.conscrypt" + apex_module="com.android.conscrypt" if bpath_module == "core-icu4j": - apex_module = "com.android.i18n" - bpath_jar = f"/apex/{apex_module}/javalib/{bpath_module}.jar" - bpath += f"{bpath_separator}{bpath_prefix}{bpath_jar}" - bpath_separator = ":" + apex_module="com.android.i18n" + bpath_jar=f"/apex/{apex_module}/javalib/{bpath_module}.jar" + bpath+=f"{bpath_separator}{bpath_prefix}{bpath_jar}" + bpath_separator=":" return bpath - # Gets a -Xbootclasspath paths with the apex modules. # # Arguments. # ${1}: host (y|n). def get_apex_bootclasspath(host: bool): - bpath_prefix = "" + bpath_prefix="" if host: - bpath_prefix = os.environ["ANDROID_HOST_OUT"] + bpath_prefix=ANDROID_HOST_OUT return get_apex_bootclasspath_impl(bpath_prefix) - # Gets a -Xbootclasspath-location paths with the apex modules. # # Arguments. # ${1}: host (y|n). def get_apex_bootclasspath_locations(host: bool): - bpath_location_prefix = "" + bpath_location_prefix="" if host: - ANDROID_BUILD_TOP=os.environ["ANDROID_BUILD_TOP"] - ANDROID_HOST_OUT=os.environ["ANDROID_HOST_OUT"] if ANDROID_HOST_OUT[0:len(ANDROID_BUILD_TOP)+1] == f"{ANDROID_BUILD_TOP}/": bpath_location_prefix=ANDROID_HOST_OUT[len(ANDROID_BUILD_TOP)+1:] else: -- cgit v1.2.3-59-g8ed1b