skip test_find_apksigner_system_package_android_home if no apksigner

This commit is contained in:
Hans-Christoph Steiner 2021-03-23 23:09:51 +01:00
parent d106f9988e
commit b5485ded64
No known key found for this signature in database
GPG Key ID: 3E177817BA1B9BFA
1 changed files with 2 additions and 0 deletions

View File

@ -693,6 +693,8 @@ class CommonTest(unittest.TestCase):
android_home = os.getenv('ANDROID_HOME')
if not android_home or not os.path.isdir(android_home):
self.skipTest('SKIPPING since ANDROID_HOME (%s) is not a dir!' % android_home)
if not glob.glob(os.path.join(android_home, 'build-tools', '*', 'apksigner')):
self.skipTest('SKIPPING since ANDROID_HOME (%s) build-tools has no apksigner!' % android_home)
fdroidserver.common.config = {'sdk_path': android_home}
os.environ['PATH'] = '/fake/path/to/avoid/conflicts'
config = fdroidserver.common.read_config()