Emit a better error message in manifest_check.py.

Bug: 132357300
Test: lunch aosp_cf_x86_64_phone-userdebug && m
Test: temporarily patch Gallery2 to fail the check, observe the error
Change-Id: Id67e359188396f68dcecd8b3f4d1bc26271af56d
This commit is contained in:
Ulya Trafimovich
2021-03-30 17:15:16 +01:00
parent 0702791a99
commit bb7513d80a
2 changed files with 44 additions and 21 deletions

View File

@@ -49,9 +49,9 @@ class EnforceUsesLibrariesTest(unittest.TestCase):
try:
relax = False
manifest_check.enforce_uses_libraries(doc, uses_libraries,
optional_uses_libraries, relax, is_apk=False)
optional_uses_libraries, relax, False, 'path/to/X/AndroidManifest.xml')
manifest_check.enforce_uses_libraries(apk, uses_libraries,
optional_uses_libraries, relax, is_apk=True)
optional_uses_libraries, relax, True, 'path/to/X/X.apk')
return True
except manifest_check.ManifestMismatchError:
return False