From 4a50d4012b73755a5cf5b8f67964de9155b37273 Mon Sep 17 00:00:00 2001 From: seelabs Date: Wed, 6 Dec 2017 16:00:47 -0500 Subject: [PATCH] Unit test logging fixes (RIPD-1568): * Check message queue before shutting down unit tests * Logging should be on if not quiet --- src/test/unit_test/multi_runner.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/unit_test/multi_runner.cpp b/src/test/unit_test/multi_runner.cpp index ee8df7ee321..58569bfaec9 100644 --- a/src/test/unit_test/multi_runner.cpp +++ b/src/test/unit_test/multi_runner.cpp @@ -363,7 +363,8 @@ multi_runner_parent::multi_runner_parent() { message_queue_thread_ = std::thread([this] { std::vector buf(1 << 20); - while (this->continue_message_queue_) + while (this->continue_message_queue_ || + this->message_queue_->get_num_msg()) { // let children know the parent is still alive this->inc_keep_alive_count(); @@ -423,7 +424,7 @@ multi_runner_child::multi_runner_child( : job_index_{checkout_job_index()} , num_jobs_{num_jobs} , quiet_{quiet} - , print_log_{print_log} + , print_log_{!quiet || print_log} { // incPort twice (2*jobIndex_) because some tests need two envs for (std::size_t i = 0; i < 2 * job_index_; ++i)