Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
An extension for colcon-core <https://github.com/colcon/colcon-core>
_ to provide aggregate
coverage results using LCOV <http://ltp.sourceforge.net/coverage/lcov.php>
_.
LCOV is a graphical front-end for GCC's coverage testing tool
gcov <https://gcc.gnu.org/onlinedocs/gcc/Gcov.html>
_, producing the following
coverage metrics:
For more information, see this paper <http://ltp.sourceforge.net/documentation/technical_papers/gcov-ols2003.pdf>
_
and this Wikipedia page <https://en.wikipedia.org/wiki/Code_coverage>
_.
#. Build your packages with coverage flags, using colcon
:
.. code-block:: shell
$ colcon build \
--symlink-install \
--cmake-args \
-DCMAKE_CXX_FLAGS='-fprofile-arcs -ftest-coverage' \
-DCMAKE_C_FLAGS='-fprofile-arcs -ftest-coverage'
colcon-mixin <https://github.com/colcon/colcon-mixin>
_ and
colcon-mixin-repository <https://github.com/colcon/colcon-mixin-repository/blob/master/coverage.mixin>
_
for a short-hand command (--mixin coverage-gcc
)#. Create a baseline for zero coverage:
.. code-block:: shell
$ colcon lcov-result --initial
#. Run tests:
.. code-block:: shell
$ colcon test
#. Gather the lcov
results:
.. code-block:: shell
$ colcon lcov-result
Reading tracefile /home/user/workspace/my_cool_ws/lcov/total_coverage.info
Summary coverage rate:
lines......: 78.6% (44 of 56 lines)
functions..: 94.4% (34 of 36 functions)
branches...: 37.0% (34 of 92 branches)
#. Browse the coverage report by opening lcov/index.html
in a browser
#. Zero the coverage counters and re-run tests:
.. code-block:: shell
$ colcon lcov-result --zero-counters
$ colcon lcov-result --initial
$ colcon test
$ colcon lcov-result
Reading tracefile /home/user/workspace/my_cool_ws/lcov/total_coverage.info
Summary coverage rate:
lines......: 78.6% (44 of 56 lines)
functions..: 94.4% (34 of 36 functions)
branches...: 37.0% (34 of 92 branches)
When running locally, use the --packages-select
option to generate
coverage information for relevant packages
The --verbose
flag can be used to print the coverage summary of each
individual package as the results are analyzed
For non-trivial contributions, it is recommended to first create an issue to discuss your ideas.
The following is the recommended workflow for contributing:
#. Install colcon
and extensions in a virtual environment:
.. code-block:: shell
$ cd <workspace>
$ python3 -m venv colcon-env
$ source colcon-env/bin/activate
$ pip3 install colcon-common-extensions
#. Install colcon-lcov-result
in editable mode:
.. code-block:: shell
$ cd <workspace>
$ python3 -m venv colcon-env
$ source colcon-env/bin/activate
$ cd path/to/colcon-lcov-result
$ pip3 install -e .
#. As long as you are in the virtual environment, make changes to colcon-lcov-result
run colcon lcov-result
, and see the effect of the changes
#. Commit changes and submit a PR:
The seven rules of a great Git commit message
_.. _The seven rules of a great Git commit message: https://chris.beams.io/posts/git-commit/#seven-rules
The following warning when running colcon lcov-result --initial
implies
that the package was not built with the correct flags:
.. code-block:: shell
--packages-skip
to suppress
the warningThe following warning when running colcon lcov-result
implies that no tests
ran for that package
.. code-block:: shell
--packages-skip
to suppress these packages from the total#. The final step of aggregating all the result files can be slow depending on the number of packages that were analyzed
See DEVELOPING.md <DEVELOPING.md>
_.
FAQs
Extension for colcon to gather test results.
We found that colcon-lcov-result demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.