mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +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)
|
test_aapt_version(path)
|
||||||
return path
|
return path
|
||||||
# did not find the command, exit with error message
|
# did not find the command, exit with error message
|
||||||
if not test_sdk_exists(config):
|
test_sdk_exists(config) # ignore result so None is never returned
|
||||||
raise FDroidException(_("Android SDK not found!"))
|
raise FDroidException(_("Android SDK tool {cmd} found!").format(cmd=cmd))
|
||||||
|
|
||||||
|
|
||||||
def test_aapt_version(aapt):
|
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')):
|
if os.path.exists(os.path.join(os.getenv('ANDROID_HOME'), 'tools', 'android')):
|
||||||
tools.append('android')
|
tools.append('android')
|
||||||
for cmd in tools:
|
for cmd in tools:
|
||||||
|
try:
|
||||||
path = fdroidserver.common.find_sdk_tools_cmd(cmd)
|
path = fdroidserver.common.find_sdk_tools_cmd(cmd)
|
||||||
if path is not None:
|
|
||||||
self.assertTrue(os.path.exists(path))
|
self.assertTrue(os.path.exists(path))
|
||||||
self.assertTrue(os.path.isfile(path))
|
self.assertTrue(os.path.isfile(path))
|
||||||
|
except fdroidserver.exception.FDroidException:
|
||||||
|
pass
|
||||||
|
|
||||||
def test_find_sdk_tools_cmd(self):
|
def test_find_sdk_tools_cmd(self):
|
||||||
fdroidserver.common.config = dict()
|
fdroidserver.common.config = dict()
|
||||||
|
Loading…
Reference in New Issue
Block a user