From e54ad7759432c35d44bc6f6a7fb4a948269c540f Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 28 Jun 2018 15:48:25 +0200 Subject: Do not prompt for Android emulator hardware profile --- python/servo/bootstrap_commands.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'python/servo/bootstrap_commands.py') diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index dcc278797a2..973d89d7632 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -109,14 +109,17 @@ class MachCommands(CommandBase): "emulator", image, ]) - subprocess.check_call([ - path.join(tools_path, "tools", "bin", "avdmanager"), - "create", "avd", - "--path", path.join(toolchains, "avd", avd_name), - "--name", avd_name, - "--package", image, - "--force", - ]) + subprocess.Popen( + stdin=subprocess.PIPE, args=[ + path.join(tools_path, "tools", "bin", "avdmanager"), + "create", "avd", + "--path", path.join(toolchains, "avd", avd_name), + "--name", avd_name, + "--package", image, + "--force", + ] + # This command always prompts "Do you wish to create a custom hardware profile?" + ).communicate("no\n") with open(path.join(toolchains, "avd", avd_name, "config.ini"), "a") as f: f.write("disk.dataPartition.size=1G\n") @@ -124,6 +127,7 @@ class MachCommands(CommandBase): assert len(contents) == 1 ndk_path = path.join(ndk_path, contents[0]) + print("") print("") print("export ANDROID_SDK=\"%s\"" % tools_path) print("export ANDROID_NDK=\"%s\"" % ndk_path) -- cgit v1.2.3