Tests: compare VCD files both ways

vcddiff is a bit broken, and sometimes 'vcddiff a b' fails while the
files are indeed equivalent. There is a chance however that 'vcddif b a'
will succeed in this case, so compare trace files both ways when
checking test results and claim success if vcddiff succeeds in at least
one direction.
This commit is contained in:
Geza Lore 2022-07-27 10:45:33 +01:00
parent e871cd8a44
commit a5ddd10e31

View File

@ -2259,10 +2259,15 @@ sub vcd_identical {
print "\t$cmd\n" if $::Debug;
$out = `$cmd`;
if ($? != 0 || $out ne '') {
print $out;
$self->error("VCD miscompares $fn1 $fn2\n");
$self->copy_if_golden($fn1, $fn2);
return 0;
$cmd = qq{vcddiff "$fn2" "$fn1"};
print "\t$cmd\n" if $::Debug;
$out = `$cmd`;
if ($? != 0 || $out ne '') {
print $out;
$self->error("VCD miscompares $fn2 $fn1\n");
$self->copy_if_golden($fn1, $fn2);
return 0;
}
}
}
{