scanner: make AARs and JARs trigger an error

refs #491
This commit is contained in:
Hans-Christoph Steiner 2020-06-03 15:12:04 +02:00
parent 3bc246ccad
commit d898ad0412
3 changed files with 7 additions and 7 deletions

View file

@ -141,7 +141,8 @@ class BuildTest(unittest.TestCase):
build = fdroidserver.metadata.Build()
build.commit = '1.0'
build.output = app.id + '.apk'
build.scanignore = ['baz.so']
build.scandelete = ['baz.so']
build.scanignore = ['foo.aar']
build.versionCode = '1'
build.versionName = '1.0'
vcs = mock.Mock()
@ -186,11 +187,11 @@ class BuildTest(unittest.TestCase):
force=False, onserver=False, refresh=False
)
self.assertTrue(os.path.exists('baz.so'))
self.assertTrue(os.path.exists('foo.aar'))
self.assertTrue(os.path.isdir('build'))
self.assertTrue(os.path.isdir('reports'))
self.assertTrue(os.path.isdir('target'))
self.assertFalse(os.path.exists('baz.so'))
self.assertFalse(os.path.exists('bin'))
self.assertFalse(os.path.exists('build/reports'))
self.assertFalse(os.path.exists('gen'))

View file

@ -99,7 +99,7 @@ class ScannerTest(unittest.TestCase):
build = fdroidserver.metadata.Build()
build.commit = '1.0'
build.output = app.id + '.apk'
build.scanignore = ['baz.so']
build.scanignore = ['baz.so', 'foo.aar']
build.versionCode = '1'
build.versionName = '1.0'
vcs = mock.Mock()