From 9cc8826a79e27857e035ce2a71ab9d005a293929 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 3 May 2018 14:27:26 +0200 Subject: [PATCH] tests: allow running with only androguard, no Android SDK --- tests/run-tests | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/run-tests b/tests/run-tests index 9ab5a9b6..3cf6cae3 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -72,9 +72,14 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then fi if [ -z "$ANDROID_HOME" ]; then - echo "ANDROID_HOME must be set with the path to the Android SDK, i.e.: " - echo " export ANDROID_HOME=/opt/android-sdk" - exit 1 + if python3 -c "import androguard"; then + echo "ANDROID_HOME is not set, using androguard" + else + echo "ERROR: ANDROID_HOME is not set, androguard is not available!" + exit 1 + fi +else + echo "Using ANDROID_HOME=$ANDROID_HOME" fi if [ -d tests ]; then