Skip to content

Commit

Permalink
Merge bitcoin#30952: test: Use shell builtins in run_command test case
Browse files Browse the repository at this point in the history
7bd3ee6 test: Use shell builtins in run_command test case (Ava Chow)

Pull request description:

  Uses the [suggested command](bitcoin#30938 (comment))

  Fixes bitcoin#30938

ACKs for top commit:
  maflcko:
    review ACK 7bd3ee6
  hebasto:
    ACK 7bd3ee6.

Tree-SHA512: 683b15cafaf0103eeadf872ea6ce9a7d884b2605d3dcf4e66b0173cdb149c24965e7c5fa62aaddf2ac55df3f449aeb787176992c96cfee5d0b86621259e1dfe9
  • Loading branch information
fanquake committed Sep 24, 2024
2 parents 90a5786 + 7bd3ee6 commit 393f323
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/system_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE(run_command)
}
{
// Return non-zero exit code, with error message for stderr
const std::string command{"python3 -c 'import sys; print(\"err\", file=sys.stderr); sys.exit(2)'"};
const std::string command{"sh -c 'echo err 1>&2 && false'"};
const std::string expected{"err"};
BOOST_CHECK_EXCEPTION(RunCommandParseJSON(command), std::runtime_error, [&](const std::runtime_error& e) {
const std::string what(e.what());
Expand Down

0 comments on commit 393f323

Please sign in to comment.