From: Hans-Christoph Steiner Date: Wed, 8 Nov 2017 12:51:03 +0000 (+0100) Subject: fix tests to work when only Debian Android SDK is installed X-Git-Tag: 0.9~25 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=2ee32f352405625512eb52e978585a25f7431ae8;p=fdroidserver.git fix tests to work when only Debian Android SDK is installed jenkins.debian.net only had `apt install android-sdk`, it does not have any of Google's packages installed. --- diff --git a/tests/common.TestCase b/tests/common.TestCase index ecd16a8d..a5d52f75 100755 --- a/tests/common.TestCase +++ b/tests/common.TestCase @@ -70,7 +70,10 @@ class CommonTest(unittest.TestCase): return False def _find_all(self): - for cmd in ('aapt', 'adb', 'android', 'zipalign'): + tools = ['aapt', 'adb', 'zipalign'] + if os.path.exists(os.path.join(os.getenv('ANDROID_HOME'), 'tools', 'android')): + tools.append('android') + for cmd in tools: path = fdroidserver.common.find_sdk_tools_cmd(cmd) if path is not None: self.assertTrue(os.path.exists(path))