From 5f63b24c50d4d831dc90fb31e6ad2cbf46e1495a Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sun, 15 Mar 2020 08:09:51 -0400 Subject: [PATCH] Change --quiet-exit to also suppress 'Exiting due to N errors'. --- Changes | 4 ++- bin/verilator | 3 +- src/V3Error.cpp | 50 ++++++++++++++++++----------- src/V3Error.h | 5 ++- src/V3Options.cpp | 2 ++ src/V3Options.h | 2 ++ test_regress/t/t_flag_quiet_exit.pl | 6 ++-- 7 files changed, 47 insertions(+), 25 deletions(-) diff --git a/Changes b/Changes index e8ce8392a..4d7e89682 100644 --- a/Changes +++ b/Changes @@ -5,10 +5,12 @@ The contributors that suggested a given feature are shown in []. Thanks! * Verilator 4.031 devel -** Add column numbers to errors and warnings. +*** Add column numbers to errors and warnings. *** Add setting VM_PARALLEL_BUILDS=1 when using --output-split, #2185. +*** Change --quiet-exit to also suppress 'Exiting due to N errors'. + * Verilator 4.030 2020-03-08 diff --git a/bin/verilator b/bin/verilator index 15d399587..57946e7ae 100755 --- a/bin/verilator +++ b/bin/verilator @@ -1273,7 +1273,8 @@ detailed description. =item --quiet-exit -When exiting due to an error, do not display the "Command Failed" message. +When exiting due to an error, do not display the "Exiting due to Errors" +nor "Command Failed" messages. =item --relative-includes diff --git a/src/V3Error.cpp b/src/V3Error.cpp index 466171706..201bfeeb2 100644 --- a/src/V3Error.cpp +++ b/src/V3Error.cpp @@ -92,30 +92,32 @@ string V3Error::lineStr(const char* filename, int lineno) { void V3Error::incErrors() { s_errCount++; if (errorCount() == errorLimit()) { // Not >= as would otherwise recurse - v3fatal("Exiting due to too many errors encountered; --error-limit="< ["--quiet-exit"], fails => 1, - expect => -'%Error: Exiting due to \d+ error\(s\) -((?!Command Failed).)*$', ); +file_grep_not("$Self->{obj_dir}/vlt_compile.log", qr/Exiting due to/); +file_grep_not("$Self->{obj_dir}/vlt_compile.log", qr/Command Failed/); + ok(1); 1;