From 7bd3ee62f6d6f59ca599e85f81776d282dee1539 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Mon, 23 Sep 2024 13:02:28 -0400 Subject: [PATCH] test: Use shell builtins in run_command test case --- src/test/system_tests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/system_tests.cpp b/src/test/system_tests.cpp index bf50a61327d..7a9a14d5acc 100644 --- a/src/test/system_tests.cpp +++ b/src/test/system_tests.cpp @@ -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());