forked from github/verilator
Tests: Clean before rerunning failing test.
This commit is contained in:
parent
8b2666cd04
commit
8e6674066f
@ -192,11 +192,7 @@ if ($opt_rerun && $runner->fail_count) {
|
||||
skip_cnt => $orig_runner->{skip_cnt},
|
||||
unsup_cnt => $orig_runner->{unsup_cnt});
|
||||
foreach my $test (@{$orig_runner->{fail_tests}}) {
|
||||
if (0) { # TBD if this is required - rare that intermediate results are bad
|
||||
# Remove old results to force hard rebuild
|
||||
system("rm", "-rf", "$test->{obj_dir}__fail1");
|
||||
system("mv", "$test->{obj_dir}", "$test->{obj_dir}__fail1");
|
||||
}
|
||||
$test->clean;
|
||||
# Reschedule test
|
||||
$runner->one_test(pl_filename => $test->{pl_filename},
|
||||
$test->{scenario} => 1);
|
||||
@ -795,6 +791,20 @@ sub _read_status {
|
||||
#----------------------------------------------------------------------
|
||||
# Methods invoked by tests
|
||||
|
||||
sub clean {
|
||||
my $self = (ref $_[0] ? shift : $Self);
|
||||
# Called on a rerun to cleanup files
|
||||
if ($self->{clean_command}) {
|
||||
system($self->{clean_command});
|
||||
}
|
||||
if (1) {
|
||||
# Prevents false-failures when switching compilers
|
||||
# Remove old results to force hard rebuild
|
||||
system("rm", "-rf", "$self->{obj_dir}__fail1");
|
||||
system("mv", "$self->{obj_dir}", "$self->{obj_dir}__fail1");
|
||||
}
|
||||
}
|
||||
|
||||
sub compile_vlt_cmd {
|
||||
my $self = (ref $_[0]? shift : $Self);
|
||||
my %param = (%{$self}, @_); # Default arguments are from $self
|
||||
|
@ -10,6 +10,8 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
||||
|
||||
scenarios(dist => 1);
|
||||
|
||||
$Self->{clean_command} = 'rm -rf ../examples/*/build ../examples/*/obj*';
|
||||
|
||||
my @examples = sort(glob("../examples/*"));
|
||||
for my $example (@examples) {
|
||||
run(cmd=>["make -C $example"]);
|
||||
|
Loading…
Reference in New Issue
Block a user