Fix test problems when missing fst2vcd, bug1417.

This commit is contained in:
Wilson Snyder 2019-04-10 20:51:38 -04:00
parent 6a331e37fc
commit 6e333bd9ab
2 changed files with 6 additions and 2 deletions

View File

@ -10,6 +10,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
**** Fix MinGW GCC 6 printf formats, bug1413. [Sergey Kvachonok]
**** Fix test problems when missing fst2vcd, bug1417. [Todd Strader]
* Verilator 4.012 2019-3-23

View File

@ -1562,6 +1562,7 @@ sub files_identical {
my $fn1 = shift;
my $fn2 = shift;
my $fn1_is_logfile = shift;
return 1 if $self->errors || $self->skips || $self->unsupporteds;
my $tries = $self->tries;
try:
@ -1625,6 +1626,7 @@ sub vcd_identical {
my $self = (ref $_[0]? shift : $Self);
my $fn1 = shift;
my $fn2 = shift;
return 0 if $self->errors || $self->skips || $self->unsupporteds;
if (!-r $fn1) { $self->error("Vcd_identical file does not exist $fn1\n"); return 0; }
if (!-r $fn2) { $self->error("Vcd_identical file does not exist $fn2\n"); return 0; }
{
@ -1632,7 +1634,7 @@ sub vcd_identical {
my $cmd = qq{vcddiff --help};
print "\t$cmd\n" if $::Debug;
my $out = `$cmd`;
if (!$out || $out !~ /Usage:/) { $self->skip("No vcddiff installed\n"); return 0; }
if (!$out || $out !~ /Usage:/) { $self->skip("No vcddiff installed\n"); return 1; }
$cmd = qq{vcddiff "$fn1" "$fn2"};
print "\t$cmd\n" if $::Debug;
@ -1678,7 +1680,7 @@ sub fst2vcd {
my $cmd = qq{fst2vcd --help};
print "\t$cmd\n" if $::Debug;
my $out = `$cmd`;
if (!$out || $out !~ /Usage:/) { $self->skip("No fst2vcd installed\n"); return 0; }
if (!$out || $out !~ /Usage:/) { $self->skip("No fst2vcd installed\n"); return 1; }
$cmd = qq{fst2vcd -e "$fn1" -o "$fn2"};
print "\t$cmd\n" if $::Debug;