Add manifest_check tool

Add a tool that can check that the <uses-library> tags in an
AndroidManifest.xml file match a list provided by the build.

Bug: 132357300
Test: manifest_check_test
Change-Id: If15abf792282bef677469595e80f19923b87ab62
This commit is contained in:
Colin Cross
2019-05-20 13:14:18 -07:00
parent 4af387c20e
commit 7211910fd0
9 changed files with 559 additions and 101 deletions

View File

@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
"""Unit tests for manifest_fixer_test.py."""
"""Unit tests for manifest_fixer.py."""
import StringIO
import sys
@@ -393,10 +393,10 @@ class AddExtractNativeLibsTest(unittest.TestCase):
return output.getvalue()
manifest_tmpl = (
'<?xml version="1.0" encoding="utf-8"?>\n'
'<manifest xmlns:android="http://schemas.android.com/apk/res/android">\n'
' <application%s/>\n'
'</manifest>\n')
'<?xml version="1.0" encoding="utf-8"?>\n'
'<manifest xmlns:android="http://schemas.android.com/apk/res/android">\n'
' <application%s/>\n'
'</manifest>\n')
def extract_native_libs(self, value):
return ' android:extractNativeLibs="%s"' % value