diff --git a/Changes b/Changes index da56da5be..05e6c30f5 100644 --- a/Changes +++ b/Changes @@ -16,6 +16,8 @@ The contributors that suggested a given feature are shown in []. Thanks! *** Support multithreading on Windows. [Patrick Stewart] +*** Suppress 'command failed' on normal errors. + **** Increase case duplicate/incomplete to 16 bit tables, bug1545. [Yossi Nivin] **** Support quoted arguments in -f files, bug1535. [Yves Mathieu] diff --git a/bin/verilator b/bin/verilator index bd6f8c169..f2442a0e5 100755 --- a/bin/verilator +++ b/bin/verilator @@ -197,14 +197,12 @@ sub run { warn "%Error: Verilator threw signal $status. Consider trying --debug --gdbbt\n" if !$Debug; } } - if ($opt_quiet_exit) { - # Same return code as die - exit $! if $!; # errno - exit $? >> 8 if $? >> 8; # child exit status - exit 255; # last resort - } else { - die "%Error: Command Failed $command\n"; + if (!$opt_quiet_exit && ($status != 256 || $Debug)) { # i.e. not normal exit(1) + warn "%Error: Command Failed $command\n"; } + exit $! if $!; # errno + exit $? >> 8 if $? >> 8; # child exit status + exit 255; # last resort } } diff --git a/bin/verilator_coverage b/bin/verilator_coverage index 2ac9b421f..03926923f 100755 --- a/bin/verilator_coverage +++ b/bin/verilator_coverage @@ -134,7 +134,12 @@ sub run { warn "%Error: Verilator_coverage threw signal $status.\n" if !$Debug; } } - die "%Error: Command Failed $command\n"; + if ($status != 256 || $Debug) { # i.e. not normal exit(1) + warn "%Error: Command Failed $command\n"; + } + exit $! if $!; # errno + exit $? >> 8 if $? >> 8; # child exit status + exit 255; # last resort } } diff --git a/src/V3Error.cpp b/src/V3Error.cpp index 4eb6225ac..592a883f6 100644 --- a/src/V3Error.cpp +++ b/src/V3Error.cpp @@ -141,7 +141,7 @@ void V3Error::vlAbort() { std::cerr<(NULL)); // Don't use v3fatal, we don't share the common structures any more fprintf(stderr, "--pipe-filter: exec failed: %s\n", strerror(errno)); - _exit(10); + _exit(1); } else { // Parent UINFO(6,"In parent, child pid "< $Self->{vlt_all}, expect => '%Error: Internal Error: .*: --debug-fatal-src -.* See the manual and .* -%Error: Command Failed.*', +.* See the manual and .*', ); ok(1); diff --git a/test_regress/t/t_lint_comb_bad.out b/test_regress/t/t_lint_comb_bad.out index 34d8bc8de..c1ef33d26 100644 --- a/test_regress/t/t_lint_comb_bad.out +++ b/test_regress/t/t_lint_comb_bad.out @@ -2,4 +2,3 @@ always_comb @(*) begin ^ %Error: Cannot continue -%Error: Command Failed diff --git a/test_regress/t/t_prot_lib_inout_bad.out b/test_regress/t/t_prot_lib_inout_bad.out index b50210dd2..87ca06973 100644 --- a/test_regress/t/t_prot_lib_inout_bad.out +++ b/test_regress/t/t_prot_lib_inout_bad.out @@ -2,4 +2,3 @@ inout z, ^ ... See the manual and http://www.veripool.org/verilator for more assistance. -%Error: Command Failed diff --git a/test_regress/t/t_prot_lib_unpacked_bad.out b/test_regress/t/t_prot_lib_unpacked_bad.out index 31f5792bf..f301eb959 100644 --- a/test_regress/t/t_prot_lib_unpacked_bad.out +++ b/test_regress/t/t_prot_lib_unpacked_bad.out @@ -2,4 +2,3 @@ input unpacked_in [7:0], ^~~~~~~~~~~ ... See the manual and http://www.veripool.org/verilator for more assistance. -%Error: Command Failed diff --git a/test_regress/t/t_vlcov_nfound_bad.out b/test_regress/t/t_vlcov_nfound_bad.out index e9884e58a..8fd3ed344 100644 --- a/test_regress/t/t_vlcov_nfound_bad.out +++ b/test_regress/t/t_vlcov_nfound_bad.out @@ -1,2 +1 @@ %Error: Can't read t/t_NOT_FOUND -%Error: Command Failed