Add XmlParser and pull Android parsing into AndroidManifestParser.

Review Request #1757 - Created Feb. 12, 2015 and submitted

Information
Mateo Rodriguez
pants
b51238e...
Reviewers
jsirois, patricklaw, zundel

This moves all xml parsing out of the Android target. Needed values
are now cached properties in the AndroidManifestParser class. Adds a
XmlParser super class that can be used for arbitrary xml parsing.

The methods that parse the xml are now robust against missing values
and ill-formed xml. It will be up to consumers to decide
if the value is sufficient for its purposes.

This also adds a default value for AndroidManifest.xml. Both
popular layouts (ant, gradle) for android builds have the manifest
conventionally at the top level. I think that users could assume that
as a default.

Travis is passed (except for the ascii failure): https://travis-ci.org/pantsbuild/pants/builds/51149506

$ PANTS_PY_COVERAGE=modules.pants.util.xml_parser PANTS_DEV=1 ./pants test tests/python/pants_test/util:xml_parser

                 ============ 7 passed in 0.19 seconds ============
                 Name                                            Stmts   Miss Branch BrMiss  Cover
                 ---------------------------------------------------------------------------------
                 tests/python/pants_test/util/test_xml_parser       58      0      0      0   100%

$ PANTS_PY_COVERAGE=modules.pants.backend.android PANTS_DEV=1 ./pants test tests/python/pants_test/android::
=========== 48 passed in 60.43 seconds ===========
Name Stmts Miss Branch BrMiss Cover
...
tests/python/pants_test/android/test_android_manifest_parser 82 6 0 0 93%
...
-------------------------------------------------------------------------------------------------------
TOTAL 385 10 14 2 97%

17:46:56 01:04 [junit]
17:46:56 01:04 [specs]
SUCCESS

Coverage went down (since Revision 4 or so)...how do I get a report so I can see what I am missing?

Issues

  • 0
  • 4
  • 0
  • 4
Description From Last Updated
John Sirois
Patrick Lawson
Mateo Rodriguez
Mateo Rodriguez
Eric Ayers
Mateo Rodriguez
Mateo Rodriguez
Eric Ayers
Mateo Rodriguez
John Sirois
Mateo Rodriguez
Eric Ayers
John Sirois
Mateo Rodriguez
Review request changed

Status: Closed (submitted)

Mateo Rodriguez

Thanks for the great feedback everyone. In master @ f89ad225a4583859c9c2aac5e0d660fdfffa010a

Loading...