mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-03 17:50:11 +02:00
Merge branch 'find_sdk' into 'master'
Find sdk See merge request fdroid/fdroidserver!836
This commit is contained in:
commit
adcb484927
@ -520,8 +520,8 @@ def find_sdk_tools_cmd(cmd):
|
||||
test_aapt_version(path)
|
||||
return path
|
||||
# did not find the command, exit with error message
|
||||
if not test_sdk_exists(config):
|
||||
raise FDroidException(_("Android SDK not found!"))
|
||||
test_sdk_exists(config) # ignore result so None is never returned
|
||||
raise FDroidException(_("Android SDK tool {cmd} found!").format(cmd=cmd))
|
||||
|
||||
|
||||
def test_aapt_version(aapt):
|
||||
|
@ -92,10 +92,12 @@ class CommonTest(unittest.TestCase):
|
||||
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:
|
||||
try:
|
||||
path = fdroidserver.common.find_sdk_tools_cmd(cmd)
|
||||
self.assertTrue(os.path.exists(path))
|
||||
self.assertTrue(os.path.isfile(path))
|
||||
except fdroidserver.exception.FDroidException:
|
||||
pass
|
||||
|
||||
def test_find_sdk_tools_cmd(self):
|
||||
fdroidserver.common.config = dict()
|
||||
|
Loading…
Reference in New Issue
Block a user