The system_tests/run_command
test is broken because it passes even with the diff as follows:
0--- a/src/test/system_tests.cpp
1+++ b/src/test/system_tests.cpp
2@@ -90,7 +90,7 @@ BOOST_AUTO_TEST_CASE(run_command)
3 });
4 }
5 {
6- BOOST_REQUIRE_THROW(RunCommandParseJSON("echo \"{\""), std::runtime_error); // Unable to parse JSON
7+ BOOST_REQUIRE_THROW(RunCommandParseJSON("invalid_command \"{\""), std::runtime_error); // Unable to parse JSON
8 }
9 // Test std::in, except for Windows
10 #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
.