The system_tests/run_command test is broken because it passes even with the diff as follows:
--- a/src/test/system_tests.cpp
+++ b/src/test/system_tests.cpp
@@ -90,7 +90,7 @@ BOOST_AUTO_TEST_CASE(run_command)
});
}
{
- BOOST_REQUIRE_THROW(RunCommandParseJSON("echo \"{\""), std::runtime_error); // Unable to parse JSON
+ BOOST_REQUIRE_THROW(RunCommandParseJSON("invalid_command \"{\""), std::runtime_error); // Unable to parse JSON
}
// Test std::in, except for Windows
#ifndef WIN32
The reason of such fragility is that the BOOST_REQUIRE_THROW macro passes even if the command raises an exception in the underlying subprocess implementation, which might have a type derived from std::runtime_error.