From c366dcfae66296036ab8a96d1d1dec03e1278fbd Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Mon, 16 Oct 2017 21:22:36 -0700 Subject: Switch to soong_ui to dump make vars Stop using make directly, go through soong_ui. This will use ckati to provide consistent makefile parsing, and may sandbox executions, etc. Test: cd art/test/testrunner; python -c "import env; print(env._DUMP_MANY_VARS)" Change-Id: I222964666baf26550ce355f455948e88a4e01ab0 --- test/testrunner/env.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/testrunner/env.py b/test/testrunner/env.py index b9123deee2..55569629ea 100644 --- a/test/testrunner/env.py +++ b/test/testrunner/env.py @@ -53,15 +53,13 @@ def _dump_many_vars(var_name): all_vars=" ".join(_DUMP_MANY_VARS_LIST) # The command is taken from build/envsetup.sh to fetch build variables. - command = ("CALLED_FROM_SETUP=true " # Enable the 'dump-many-vars' make target. - "BUILD_SYSTEM=build/core " # Set up lookup path for make includes. - "make --no-print-directory -C \"%s\" -f build/core/config.mk " - "dump-many-vars DUMP_MANY_VARS=\"%s\"") % (ANDROID_BUILD_TOP, all_vars) + command = ("build/soong/soong_ui.bash --dumpvars-mode --vars=\"%s\"") % (all_vars) config = subprocess.Popen(command, stdout=subprocess.PIPE, universal_newlines=True, - shell=True).communicate()[0] # read until EOF, select stdin + shell=True, + cwd=ANDROID_BUILD_TOP).communicate()[0] # read until EOF, select stdin # Prints out something like: # TARGET_ARCH='arm64' # HOST_ARCH='x86_64' -- cgit v1.2.3-59-g8ed1b