From: Marcus Hoffmann Date: Sun, 3 Dec 2017 14:01:48 +0000 (+0100) Subject: common.testCase: fix find_sdk_tools when aapt is installed in /usr/bin X-Git-Tag: 1.0.0~43^2~6 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=bfe2c00834ffa2dca1ac737da412235bb23b19e4;p=fdroidserver.git common.testCase: fix find_sdk_tools when aapt is installed in /usr/bin The testlogic was broken when having both aapt in /usr/bin and also as part of the android sdk. --- diff --git a/tests/common.TestCase b/tests/common.TestCase index 0ed9ced9..9f4b3ada 100755 --- a/tests/common.TestCase +++ b/tests/common.TestCase @@ -86,11 +86,8 @@ class CommonTest(unittest.TestCase): sdk_path = os.getenv('ANDROID_HOME') if os.path.exists(sdk_path): fdroidserver.common.config['sdk_path'] = sdk_path - if os.path.exists('/usr/bin/aapt'): - # this test only works when /usr/bin/aapt is installed - self._find_all() build_tools = os.path.join(sdk_path, 'build-tools') - if self._set_build_tools(): + if self._set_build_tools() or os.path.exists('/usr/bin/aapt'): self._find_all() else: print('no build-tools found: ' + build_tools)