gazebosim / gz-utils

Classes and functions for robot applications
https://gazebosim.org/
Apache License 2.0
8 stars 10 forks source link

Add a utility for spawning subprocesses #98

Closed mjcarroll closed 1 year ago

mjcarroll commented 1 year ago

🎉 New feature

Summary

This includes the unlicensed header-only subprocess.h from https://github.com/sheredom/subprocess.h

This gives a uniform, cross-platform way of spawning executables and interacting with them from a C++ application. Importantly, it allows for reading both cout and cerr.

The intention is to use this to remove any custom executable calling that we have throughout the remainder of the Gazebo stack.

Test it

Checklist

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

codecov[bot] commented 1 year ago

Codecov Report

Merging #98 (eed4bd2) into gz-utils2 (135a6f6) will decrease coverage by 12.52%. The diff coverage is 70.61%.

:exclamation: Current head eed4bd2 differs from pull request most recent head 99926b7. Consider uploading reports for the commit 99926b7 to get more accurate results

@@              Coverage Diff               @@
##           gz-utils2      #98       +/-   ##
==============================================
- Coverage      91.97%   79.45%   -12.52%     
==============================================
  Files              6        8        +2     
  Lines            137      331      +194     
==============================================
+ Hits             126      263      +137     
- Misses            11       68       +57     
Impacted Files Coverage Δ
include/gz/utils/detail/subprocess.h 59.25% <59.25%> (ø)
include/gz/utils/Subprocess.hh 96.61% <96.61%> (ø)