Bug 1409624 - Cannot detect valid emulator command when using Android Tools 26. r=nalexander

Although there is emulator command in android_sdk_root/tools even if Android
Tools 26, it doesn't work well because emulator64-arm is missing in same
directory.

Valild emulator command moves from android_sdk_root/tools to
android_sdk_root/emulator from Android Tools 26 (updated by sdkmanager).

MozReview-Commit-ID: 4IGHK3YcZXD

--HG--
extra : rebase_source : cc0c67f24c32a55ac40e65a5a036d5072dff6ee4
extra : histedit_source : 9718746e56dd9ec16a540533acfe909c319c234b
This commit is contained in:
Makoto Kato 2017-10-18 14:01:28 +09:00
parent cd9185e874
commit 7ae7c43e2f

View File

@ -263,9 +263,16 @@ case "$target" in
AC_MSG_ERROR([You must install the Android tools. Try |mach bootstrap|. (Looked for $android_tools)])
fi
MOZ_PATH_PROG(EMULATOR, emulator, :, [$android_tools])
dnl Android Tools 26 changes emulator path.
dnl Although android_sdk_root/tools still has emulator command,
dnl it doesn't work correctly
MOZ_PATH_PROG(EMULATOR, emulator, :, [$android_sdk_root/emulator])
if test -z "$EMULATOR" -o "$EMULATOR" = ":"; then
AC_MSG_ERROR([The program emulator was not found. Try |mach bootstrap|.])
dnl old emulator path until Android Tools 25.x
MOZ_PATH_PROG(EMULATOR, emulator, :, [$android_tools])
if test -z "$EMULATOR" -o "$EMULATOR" = ":"; then
AC_MSG_ERROR([The program emulator was not found. Try |mach bootstrap|.])
fi
fi
# `compileSdkVersion ANDROID_COMPILE_SDK_VERSION` is Gradle-only,