summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dan Willemsen <dwillemsen@google.com> 2017-10-16 21:22:36 -0700
committer Dan Willemsen <dwillemsen@google.com> 2017-10-17 21:14:28 -0700
commitc366dcfae66296036ab8a96d1d1dec03e1278fbd (patch)
tree80e74f29c841b6b69d93d475f65b7ec74eba8ebc
parent4a6603701b217bbbd75020e1689c87c61125ef02 (diff)
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
-rw-r--r--test/testrunner/env.py8
1 files 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'