From: Miodrag Milanovic Date: Mon, 17 Feb 2020 15:46:34 +0000 (+0100) Subject: Prevent double error message X-Git-Tag: working-ls180~788^2~8 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=70db8e92003fab959ec5d14b51ac2a9209d16b30;p=yosys.git Prevent double error message --- diff --git a/kernel/log.cc b/kernel/log.cc index 1575b4fed..9e103855f 100644 --- a/kernel/log.cc +++ b/kernel/log.cc @@ -71,6 +71,7 @@ static struct timeval initial_tv = { 0, 0 }; static bool next_print_log = false; static int log_newline_count = 0; static bool check_expected_logs = true; +static bool display_error_log_msg = true; static void log_id_cache_clear() { @@ -332,7 +333,7 @@ static void logv_error_with_prefix(const char *prefix, f = stderr; log_last_error = vstringf(format, ap); - if (check_expected_logs) + if (display_error_log_msg) log("%s%s", prefix, log_last_error.c_str()); log_flush(); @@ -691,6 +692,7 @@ void log_check_expected() _Exit(0); #endif } else { + display_error_log_msg = false; log_error("Expected error pattern '%s' not found !\n", item.second.pattern.c_str()); } }