Tests: Summarize any skips.
This commit is contained in:
parent
875dc9a27e
commit
68b22a4a3d
|
|
@ -271,6 +271,7 @@ sub new {
|
||||||
fail_cnt => 0,
|
fail_cnt => 0,
|
||||||
skip_cnt => 0,
|
skip_cnt => 0,
|
||||||
unsup_cnt => 0,
|
unsup_cnt => 0,
|
||||||
|
skip_msgs => [],
|
||||||
fail_msgs => [],
|
fail_msgs => [],
|
||||||
fail_tests => [],
|
fail_tests => [],
|
||||||
@_};
|
@_};
|
||||||
|
|
@ -312,6 +313,8 @@ sub one_test {
|
||||||
$self->{ok_cnt}++;
|
$self->{ok_cnt}++;
|
||||||
} elsif ($test->scenario_off && !$test->errors) {
|
} elsif ($test->scenario_off && !$test->errors) {
|
||||||
} elsif ($test->skips && !$test->errors) {
|
} elsif ($test->skips && !$test->errors) {
|
||||||
|
push @{$self->{skip_msgs}},
|
||||||
|
("\t#".$test->soprint("-Skip: $test->{skips}\n"));
|
||||||
$self->{skip_cnt}++;
|
$self->{skip_cnt}++;
|
||||||
} elsif ($test->unsupporteds && !$test->errors) {
|
} elsif ($test->unsupporteds && !$test->errors) {
|
||||||
$self->{unsup_cnt}++;
|
$self->{unsup_cnt}++;
|
||||||
|
|
@ -364,7 +367,14 @@ sub report {
|
||||||
chomp $f;
|
chomp $f;
|
||||||
$fh->print("$f\n");
|
$fh->print("$f\n");
|
||||||
}
|
}
|
||||||
$fh->print("TESTS DONE: ".$self->sprint_summary."\n");
|
foreach my $f (sort @{$self->{skip_msgs}}) {
|
||||||
|
chomp $f;
|
||||||
|
$fh->print("$f\n");
|
||||||
|
}
|
||||||
|
my $sum = ($self->{fail_cnt} && "FAILED"
|
||||||
|
|| $self->{skip_cnt} && "PASSED w/SKIPS"
|
||||||
|
|| "PASSED");
|
||||||
|
$fh->print("TESTS DONE, $sum: ".$self->sprint_summary."\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
sub print_summary {
|
sub print_summary {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ use Time::HiRes;
|
||||||
scenarios(dist => 1);
|
scenarios(dist => 1);
|
||||||
|
|
||||||
if (!$ENV{VERILATOR_TEST_RANDOM_FAILURE}) {
|
if (!$ENV{VERILATOR_TEST_RANDOM_FAILURE}) {
|
||||||
skip("Test is for harness checking only, setenv VERILATOR_TEST_RANDOM_FAILURE=1 ");
|
ok("Test is for harness checking only, setenv VERILATOR_TEST_RANDOM_FAILURE=1 ");
|
||||||
} else {
|
} else {
|
||||||
# Randomly fail to test driver.pl
|
# Randomly fail to test driver.pl
|
||||||
my ($ign, $t) = Time::HiRes::gettimeofday();
|
my ($ign, $t) = Time::HiRes::gettimeofday();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue