summaryrefslogtreecommitdiff
path: root/test/etc/apex_bootclasspath_utils.py
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2022-10-23 19:23:12 +0000
committer David Srbecky <dsrbecky@google.com> 2022-10-23 19:23:12 +0000
commit8d6a4e021e1dc4717939e05aee89c9b18e383d12 (patch)
tree17beb80fab6698e3cc3d0a06871e582c97667f1b /test/etc/apex_bootclasspath_utils.py
parent895c27039a57ec19efc8f526ac17b1ae28e2edd9 (diff)
Revert "Convert per-test run scripts to python."
This reverts commit 895c27039a57ec19efc8f526ac17b1ae28e2edd9. Reason for revert: Breaks tests Change-Id: If7d346b23731d32d1fdf31346bebcb658fbce421
Diffstat (limited to 'test/etc/apex_bootclasspath_utils.py')
-rwxr-xr-xtest/etc/apex_bootclasspath_utils.py33
1 files changed, 15 insertions, 18 deletions
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: