xaizek / uncov (License: AGPLv3+) (since 2018-12-07)
Uncov(er) is a tool that collects and processes code coverage reports.
Commit 8dbcb66b497859d19fc620b2815452300053f5f8

Handle empty command in runProc() explicitly
There is a test that checks for std::runtime_error, but the exception is
catches is due to fork crashing.
Author: xaizek
Author date (UTC): 2022-11-14 12:27
Committer name: xaizek
Committer date (UTC): 2022-11-14 18:25
Parent(s): ad4bd0fd603c341d9fac64131c0bfe1f12162cdc
Signing key: 99DC5E4DB05F6BE2
Tree: 5090bd5f45c633b70ad1c20b76f35b233bb4a4b0
File Lines added Lines deleted
src/integration.cpp 6 2
File src/integration.cpp changed (mode: 100644) (index df6dfbb..08306e2)
... ... readProc(std::vector<std::string> &&cmd, const std::string &dir,
303 303 * *
304 304 * @returns Exit code and output of the command. * @returns Exit code and output of the command.
305 305 * *
306 * @throws std::runtime_error On failure to run the command or when it didn't
307 * finish properly.
306 * @throws std::runtime_error On empty command, failure to run it or when it
307 * didn't finish properly.
308 308 */ */
309 309 static ProcResult static ProcResult
310 310 runProc(std::vector<std::string> &&cmd, const std::string &dir, runProc(std::vector<std::string> &&cmd, const std::string &dir,
311 311 CatchStderr catchStdErr) CatchStderr catchStdErr)
312 312 { {
313 if (cmd.empty()) {
314 throw std::runtime_error("Attempt to run an empty command");
315 }
316
313 317 int pipePair[2]; int pipePair[2];
314 318 if (pipe(pipePair) != 0) { if (pipe(pipePair) != 0) {
315 319 throw std::runtime_error("Failed to create a pipe"); throw std::runtime_error("Failed to create a pipe");
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/uncov

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/uncov

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master