bitcoincore growth – Bitcoin Core: Unit Check Failure: system_tests.cpp: Line 48 BOOST_AUTO_TEST(run_command)

0
85


I cloned the Bitcoin Core and did the construct. However, I’m experiencing a Unit Check Failure in system_tests.cpp, Line 48 BOOST_AUTO_TEST(run_command).

First, my surroundings:

  1. {Hardware}: Intel i7-8550U @1.80GHz 2001 Mhz, 4 Cores, 8 Logical Processors, x64.
  2. OS: Home windows 10 House
  3. Toolchain: Visible Studios 2019 v142, Configuration: Launch, Platform x64.

The construct completes with out errors, however I do get the next message:

C:Usersnamesourcereposbitcoin-firstbuild_msvctest_bitcointest_bitcoin.vcxproj : warning : Wildcards in mission gadgets usually are not supported in VC initiatives and may trigger surprising habits, instability and efficiency degradation within the Visible Studio IDE. Please confer with https://aka.ms/cpp/projectwildcards for supported choices.

Operating test_bitcoin, all exams go besides run_command from supply system_tests.cpp line 48. I get the next error:

struct increase::course of::process_error: CreateProcess failed: The system can’t discover the file specified.

VS Check Explorer offers moreover:

unknown location(0): exception in “run_command”: struct increase::course of::process_error: CreateProcess failed: The system can’t discover the file specified. system_tests.cpp(52): final checkpoint:

The related code from system_tests.cpp (Please disregard any spacing syntax points after the road numbers. I manually added them in and they aren’t at difficulty):

48 BOOST_AUTO_TEST_CASE(run_command)
49 {
50    {
51        const UniValue consequence = RunCommandParseJSON("");
52        BOOST_CHECK(consequence.isNull());
53    }
54    {
55 #ifdef WIN32
56       // Home windows requires single quotes to forestall escaping double quotes from the JSON...
57       // const UniValue consequence = RunCommandParseJSON("cmd.exe /c echo '{"success": true}'");
58        const UniValue consequence = RunCommandParseJSON("echo '{"success": true}'");
59   
60 #else
61        // ... however Linux and macOS echo a single quote if it is used
62        const UniValue consequence = RunCommandParseJSON("echo "{"success": true}"");
63 #endif
64        BOOST_CHECK(consequence.isObject());
65        const UniValue& success = find_value(consequence, "success");
66        BOOST_CHECK(!success.isNull());
67        BOOST_CHECK_EQUAL(success.getBool(), true);
68    }
69    {
70        // An invalid command is dealt with by Enhance
71        BOOST_CHECK_EXCEPTION(RunCommandParseJSON("invalid_command"), increase::course of::process_error, checkMessage); // Command failed
72    }
73    {
74        // Return non-zero exit code, no output to stderr
75        BOOST_CHECK_EXCEPTION(RunCommandParseJSON("false"), std::runtime_error, checkMessageFalse);
76    }
77    {
78        // Return non-zero exit code, with error message for stderr
79        BOOST_CHECK_EXCEPTION(RunCommandParseJSON("ls nosuchfile"), std::runtime_error, checkMessageStdErr);
80    }
81    {
82        BOOST_REQUIRE_THROW(RunCommandParseJSON("echo "{""), std::runtime_error); // Unable to parse JSON
83    }
84    // Check std::in, apart from Home windows
85 #ifndef WIN32
86    {
87        const UniValue consequence = RunCommandParseJSON("cat", "{"success": true}");
88        BOOST_CHECK(consequence.isObject());
89        const UniValue& success = find_value(consequence, "success");
90        BOOST_CHECK(!success.isNull());
91        BOOST_CHECK_EQUAL(success.getBool(), true);
92    }
93 #endif
94 }
95 #endif // HAVE_BOOST_PROCESS

Line 58 is failing. Based mostly on this https://stackoverflow.com/questions/47028660/boost-createprocess-failed, I commented out line 58 and added the next Line 57:

57  const UniValue consequence = RunCommandParseJSON("cmd.exe /c echo '{"success": true}'");

Operating once more the system_tests.cpp will get me previous the CreateProcess failure, however produces the next failure in system_tests.cpp line 48, run_command():

class std::runtime_error: Unable to parse JSON: ‘{“success”: true}’.

VS Check Explorer moreover states:

unknown location(0): exception in “run_command”: class std::runtime_error: Unable to parse JSON: ‘{“success”: true}’
system_tests.cpp(52): final checkpoint:

I am having a tough time believing the take a look at is incorrect–I’ve discovered nothing about this failure. As an alternative, I believe I didn’t accurately set some change or possibility or configuration someplace.

Any feedback or assist could be significantly appreciated.



Supply hyperlink

Leave a reply