Skip to content

Commit 86cb0b7

Browse files
committed
build: Re-enable external signer on Windows
1 parent 088289d commit 86cb0b7

File tree

4 files changed

+40
-4
lines changed

4 files changed

+40
-4
lines changed

ci/test/00_setup_env_win64.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ export DPKG_ADD_ARCH="i386"
1313
export PACKAGES="python3 nsis g++-mingw-w64-x86-64-posix wine-binfmt wine64 wine32 file"
1414
export RUN_FUNCTIONAL_TESTS=false
1515
export GOAL="deploy"
16-
export BITCOIN_CONFIG="--enable-reduce-exports --disable-external-signer --disable-gui-tests"
16+
export BITCOIN_CONFIG="--enable-reduce-exports --enable-external-signer --disable-gui-tests"

depends/packages/boost.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ $(package)_version=1.80.0
33
$(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$($(package)_version)/source/
44
$(package)_file_name=boost_$(subst .,_,$($(package)_version)).tar.bz2
55
$(package)_sha256_hash=1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0
6+
$(package)_patches := mingw32_process.patch
7+
8+
define $(package)_preprocess_cmds
9+
patch -p1 -i $($(package)_patch_dir)/mingw32_process.patch
10+
endef
611

712
define $(package)_stage_cmds
813
mkdir -p $($(package)_staging_prefix_dir)/include && \
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Fix compiling for MinGW-w64 using std::filesystem
2+
3+
Upstream commit:
4+
- https://github.com/boostorg/process/commit/a7b65bfc44f4af3a9d584fe9347fde0944c0167a
5+
6+
--- a/boost/process/detail/windows/basic_cmd.hpp
7+
+++ b/boost/process/detail/windows/basic_cmd.hpp
8+
@@ -159,8 +159,13 @@ struct exe_cmd_init : handler_base_ext
9+
return exe_cmd_init<Char>(std::move(sh), std::move(args_));
10+
}
11+
12+
+#ifdef BOOST_PROCESS_USE_STD_FS
13+
+ static std:: string get_shell(char) {return shell(). string(); }
14+
+ static std::wstring get_shell(wchar_t) {return shell().wstring(); }
15+
+#else
16+
static std:: string get_shell(char) {return shell(). string(codecvt()); }
17+
static std::wstring get_shell(wchar_t) {return shell().wstring(codecvt());}
18+
+#endif
19+
20+
static exe_cmd_init<Char> cmd_shell(string_type&& cmd)
21+
{

src/test/system_tests.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,29 +51,39 @@ BOOST_AUTO_TEST_CASE(run_command)
5151
}
5252
{
5353
// An invalid command is handled by Boost
54+
#ifdef __MINGW64__
55+
constexpr int expected_error{6};
56+
#else
57+
constexpr int expected_error{2};
58+
#endif
5459
BOOST_CHECK_EXCEPTION(RunCommandParseJSON("invalid_command"), boost::process::process_error, [&](const boost::process::process_error& e) {
5560
BOOST_CHECK(std::string(e.what()).find("RunCommandParseJSON error:") == std::string::npos);
56-
BOOST_CHECK_EQUAL(e.code().value(), 2);
61+
BOOST_CHECK_EQUAL(e.code().value(), expected_error);
5762
return true;
5863
});
5964
}
6065
{
6166
// Return non-zero exit code, no output to stderr
6267
#ifdef WIN32
63-
const std::string command{"cmd.exe /c call"};
68+
const std::string command{"cmd.exe /c exit 1"};
6469
#else
6570
const std::string command{"false"};
6671
#endif
6772
BOOST_CHECK_EXCEPTION(RunCommandParseJSON(command), std::runtime_error, [&](const std::runtime_error& e) {
68-
BOOST_CHECK(std::string(e.what()).find(strprintf("RunCommandParseJSON error: process(%s) returned 1: \n", command)) != std::string::npos);
73+
const std::string what(e.what());
74+
BOOST_CHECK(what.find(strprintf("RunCommandParseJSON error: process(%s) returned 1: \n", command)) != std::string::npos);
6975
return true;
7076
});
7177
}
7278
{
7379
// Return non-zero exit code, with error message for stderr
7480
#ifdef WIN32
7581
const std::string command{"cmd.exe /c dir nosuchfile"};
82+
#ifdef _MSC_VER
7683
const std::string expected{"File Not Found"};
84+
#else
85+
const std::string expected{"File not found."};
86+
#endif
7787
#else
7888
const std::string command{"ls nosuchfile"};
7989
const std::string expected{"No such file or directory"};

0 commit comments

Comments
 (0)