chiark / gitweb /
common.testCase: fix find_sdk_tools when aapt is installed in /usr/bin
authorMarcus Hoffmann <bubuiic@aol.com>
Sun, 3 Dec 2017 14:01:48 +0000 (15:01 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Wed, 6 Dec 2017 11:30:47 +0000 (12:30 +0100)
The testlogic was broken when having both aapt in /usr/bin and also as
part of the android sdk.

tests/common.TestCase

index 0ed9ced9f099e33519504414d2a1e11fa433dd28..9f4b3ada4b4fc50f4ef7499464fed96d8308d77b 100755 (executable)
@@ -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)