mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-08 11:59:48 -04:00
Attempt to fix flaky tools test on Windows
This commit is contained in:
parent
e3f739d6e2
commit
6d582cb3dc
@ -464,6 +464,12 @@ class driver_runner {
|
||||
}
|
||||
|
||||
bool unmount() {
|
||||
#ifdef _WIN32
|
||||
static constexpr int const kSigIntExitCode{-1073741510};
|
||||
#else
|
||||
static constexpr int const kSigIntExitCode{SIGINT};
|
||||
#endif
|
||||
|
||||
if (!mountpoint_.empty()) {
|
||||
#ifndef _WIN32
|
||||
if (process_) {
|
||||
@ -471,11 +477,7 @@ class driver_runner {
|
||||
process_->interrupt();
|
||||
process_->wait();
|
||||
auto ec = process_->exit_code();
|
||||
bool is_expected_exit_code = ec == 0
|
||||
#ifndef _WIN32
|
||||
|| ec == SIGINT
|
||||
#endif
|
||||
;
|
||||
bool is_expected_exit_code = ec == 0 || ec == kSigIntExitCode;
|
||||
if (!is_expected_exit_code) {
|
||||
std::cerr << "driver failed to unmount:\nout:\n"
|
||||
<< process_->out() << "err:\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user