Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gcov coverage plugin should throw an informative exception when report can't be parsed #282

Open
ChrisTimperley opened this issue Nov 24, 2020 · 0 comments

Comments

@ChrisTimperley
Copy link
Collaborator

An example trace that shows the current behavior:

Traceback (most recent call last):
  File "/home/chris/.local/share/virtualenvs/darjeeling-ardupilot-5Zw1Ma5z/bin/darjeeling", line 33, in <module>
    sys.exit(load_entry_point('darjeeling', 'console_scripts', 'darjeeling')())
  File "/home/chris/tools/darjeeling/src/darjeeling/cli/__init__.py", line 309, in main
    app.run()
  File "/home/chris/.local/share/virtualenvs/darjeeling-ardupilot-5Zw1Ma5z/lib/python3.7/site-packages/cement/core/foundation.py", line 916, in run
    return_val = self.controller._dispatch()
  File "/home/chris/.local/share/virtualenvs/darjeeling-ardupilot-5Zw1Ma5z/lib/python3.7/site-packages/cement/ext/ext_argparse.py", line 808, in _dispatch
    return func()
  File "/home/chris/tools/darjeeling/src/darjeeling/cli/__init__.py", line 124, in coverage
    session = Session.from_config(environment, cfg)
  File "/home/chris/tools/darjeeling/src/darjeeling/session.py", line 86, in from_config
    coverage = cfg.coverage.build(environment, program)
  File "/home/chris/tools/darjeeling/src/darjeeling/coverage/config.py", line 104, in build
    coverage = collector.collect()
  File "/home/chris/tools/darjeeling/src/darjeeling/coverage/collector.py", line 71, in collect
    lines = self._extract(container)
  File "/home/chris/tools/darjeeling/src/darjeeling/coverage/gcov.py", line 189, in _extract
    return self._parse_xml_file_contents(xml_file_contents)
  File "/home/chris/tools/darjeeling/src/darjeeling/coverage/gcov.py", line 178, in _parse_xml_file_contents
    return self._parse_xml_report(root)
  File "/home/chris/tools/darjeeling/src/darjeeling/coverage/gcov.py", line 152, in _parse_xml_report
    assert packages_node
AssertionError
@ChrisTimperley ChrisTimperley changed the title Gcov coverage plugin should throw an information exception when report can't be parsed Gcov coverage plugin should throw an informative exception when report can't be parsed Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant