test driver: Update VCDs when given HARNESS_UPDATE_GOLDEN

This commit is contained in:
Wilson Snyder 2014-03-08 15:34:42 -05:00
parent 2560ae9bc1
commit d37709a922
1 changed files with 5 additions and 0 deletions

View File

@ -1416,6 +1416,11 @@ sub vcd_identical {
if ($out ne '') { if ($out ne '') {
print $out; print $out;
$self->error("VCD miscompare $fn1 $fn2\n"); $self->error("VCD miscompare $fn1 $fn2\n");
if ($ENV{HARNESS_UPDATE_GOLDEN}) { # Update golden files with current
warn "%Warning: HARNESS_UPDATE_GOLDEN set: cp $fn1 $fn2\n";
eval "use File::Copy;";
File::Copy::copy($fn1,$fn2);
}
return 0; return 0;
} }
} }