mirror of
https://github.com/verilator/verilator.git
synced 2025-01-06 06:37:45 +00:00
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:
parent
e871cd8a44
commit
a5ddd10e31
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user