1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-07-04 16:30:12 +02:00

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.
This commit is contained in:
Marcus Hoffmann 2017-12-03 15:01:48 +01:00 committed by Hans-Christoph Steiner
parent 67e6cbe793
commit bfe2c00834

View File

@ -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)