From 221bc5532f64fb0114653c20225ee4c12842b2b7 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Tue, 16 Aug 2022 14:50:35 +0100 Subject: Use converted apex_bootclasspath_utils.py script apex-bootclasspath-utils.sh was converted to python apex_bootclasspath_utils.py in art/test/etc. Use this new python script instead. Test: ./scripts/benchmarks/benchmarks_run_target.sh --iterations 1 Test: ./scripts/benchmarks/perf_profile_benchmarks_target.sh \ benchmarks/algorithm/DeltaBlue Test: ./scripts/benchmarks/compilation_stats_target.sh \ ./external-benchmarks/apks/DuckDuckGo/duckduckgo-5.97.0-play-release.apk \ boot.oat --iterations 1 Change-Id: Idfa836d5e64a0fd8012df0e6b721a3defc2ee8b4 --- utils/utils_benchmarks.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/utils/utils_benchmarks.sh b/utils/utils_benchmarks.sh index ce6a5d0c..9bc977aa 100644 --- a/utils/utils_benchmarks.sh +++ b/utils/utils_benchmarks.sh @@ -15,8 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This assumes that source utils.sh has been called by the parent script. -source "$(get_art_dir)/test/etc/apex-bootclasspath-utils.sh" +# This script assumes that source utils.sh has been called by the parent script. if [[ ! -v JCPU_COUNT ]]; then log E "utils_android.sh must be sourced before utils_benchmarks.sh" @@ -50,8 +49,14 @@ build_benchmarks() { # Get the core bootclasspath which can be used to build and to run Java apps on a target. get_target_core_bootclasspath() { - # Using ART util; HOST="n". - get_apex_bootclasspath "n" + local -r py_module="apex_bootclasspath_utils" + local -r bootclasspath=$( + # PYTHONPATH is used by python to import utils file. + # shellcheck disable=SC2034 + PYTHONPATH="$(get_art_dir)/test/etc/" + # Using ART util; HOST=False. + safe python3 -c "import ${py_module}; print(${py_module}.get_apex_bootclasspath(False))") + echo "${bootclasspath}" } # Constructs and exports a -bootclasspath argument line for javac invocation; is used -- cgit v1.2.3