numaru / vscode-ceedling-test-adapter

Ceedling Test Adapter for the VS Code Test Explorer
MIT License
37 stars 14 forks source link

Option to load report xml from gcov directory #81

Closed NovaNekmit closed 3 years ago

NovaNekmit commented 3 years ago

(Code-Reference: https://github.com/numaru/vscode-ceedling-test-adapter/blob/master/src/adapter.ts#L692)

Currently the report xml is always loaded from the artifacts/test/ directory, but doing ceedling gcov:<test> writes the report to artifacts/gcov/ instead. So one must run both gcov:${TEST_ID} (to get the coverage) and test:${TEST_ID} (so this adapter can find the xml).

This means running the tests twice, when the report.xml could instead just be read from the gcov directory instead.

numaru commented 3 years ago

πŸ‘ I forgot about that workaround (ref #51). I think we could take the last updated file. We would save up a setting option and stay gcov agnostic.

numaru commented 3 years ago

it should be fixed in the 1.8.2

But there is another problem for me. The command now fails. I think because some gcov files are missing. It leads to a red warning on all the tests. It may be related to https://github.com/ThrowTheSwitch/Ceedling/issues/329

image

NovaNekmit commented 3 years ago

Works fine for me. Thanks for the quick fix.

No errors, unless I tell ceedling to fail on missing coverage, ie via

:gcov:
  :abort_on_uncovered: TRUE
  :gcovr:
    :fail_under_line: 100
    :fail_under_branch: 100

Then it fails (as it should, as the gcov:utils target is executed after each test suite).

numaru commented 3 years ago

Yep mb, the issue is fixed and the messages are not the cause of the red warnings. I just forgot to reload my extension in vscode after the update πŸ˜…

Thank you for the contribution ☺️