diff --git a/test_regress/driver.pl b/test_regress/driver.pl index c6c43efaa..77432c5ed 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -1363,7 +1363,9 @@ sub file_grep_not { my $self = (ref $_[0]? shift : $Self); my $filename = shift; my $regexp = shift; + my $expvalue = shift; return if $self->errors || $self->skips || $self->unsupporteds; + !defined $expvalue or $self->error("file_grep_not: Unexpected 3rd argument: $expvalue"); my $contents = $self->file_contents($filename); return if ($contents eq "_Already_Errored_"); @@ -1376,12 +1378,15 @@ sub file_grep { my $self = (ref $_[0]? shift : $Self); my $filename = shift; my $regexp = shift; + my $expvalue = shift; return if $self->errors || $self->skips || $self->unsupporteds; my $contents = $self->file_contents($filename); return if ($contents eq "_Already_Errored_"); if ($contents !~ /$regexp/) { $self->error("File_grep: $filename: Regexp not found: $regexp\n"); + } elsif ($expvalue && $expvalue ne $1) { + $self->error("File_grep: $filename: Got='$1' Expected='$expvalue' in regexp: $regexp\n"); } } diff --git a/test_regress/t/t_alw_split.pl b/test_regress/t/t_alw_split.pl index abf31a37b..bfa9e7547 100755 --- a/test_regress/t/t_alw_split.pl +++ b/test_regress/t/t_alw_split.pl @@ -12,7 +12,7 @@ compile ( ); if ($Self->{vlt}) { - file_grep ($Self->{stats}, qr/Optimizations, Split always\s+6/i); + file_grep ($Self->{stats}, qr/Optimizations, Split always\s+(\d+)/i, 6); } execute ( diff --git a/test_regress/t/t_alw_splitord.pl b/test_regress/t/t_alw_splitord.pl index 936efb636..e858e241e 100755 --- a/test_regress/t/t_alw_splitord.pl +++ b/test_regress/t/t_alw_splitord.pl @@ -12,7 +12,7 @@ compile ( ); if ($Self->{vlt}) { - file_grep ($Self->{stats}, qr/Optimizations, Split always\s+0/i); + file_grep ($Self->{stats}, qr/Optimizations, Split always\s+(\d+)/i, 0); } execute ( diff --git a/test_regress/t/t_case_huge.pl b/test_regress/t/t_case_huge.pl index a019b77ac..4d285b7b8 100755 --- a/test_regress/t/t_case_huge.pl +++ b/test_regress/t/t_case_huge.pl @@ -12,8 +12,8 @@ compile ( ); if ($Self->{vlt}) { - file_grep ($Self->{stats}, qr/Optimizations, Tables created\s+10/i); - file_grep ($Self->{stats}, qr/Optimizations, Combined CFuncs\s+10/i); + file_grep ($Self->{stats}, qr/Optimizations, Tables created\s+(\d+)/i, 10); + file_grep ($Self->{stats}, qr/Optimizations, Combined CFuncs\s+(\d+)/i, 10); } execute ( diff --git a/test_regress/t/t_clk_gater.pl b/test_regress/t/t_clk_gater.pl index c240aee00..b8116f631 100755 --- a/test_regress/t/t_clk_gater.pl +++ b/test_regress/t/t_clk_gater.pl @@ -17,7 +17,7 @@ execute ( if ($Self->{vlt}) { #Optimization is disabled - #file_grep ($Self->{stats}, qr/Optimizations, Gaters inserted\s+3/i); + #file_grep ($Self->{stats}, qr/Optimizations, Gaters inserted\s+(\d+)/i, 3); } ok(1); diff --git a/test_regress/t/t_cover_toggle.pl b/test_regress/t/t_cover_toggle.pl index fafa7c21c..e7255ceaa 100755 --- a/test_regress/t/t_cover_toggle.pl +++ b/test_regress/t/t_cover_toggle.pl @@ -18,7 +18,7 @@ execute ( # Read the input .v file and do any CHECK_COVER requests inline_checks(); -file_grep ($Self->{stats}, qr/Coverage, Toggle points joined\s+24/i) +file_grep ($Self->{stats}, qr/Coverage, Toggle points joined\s+(\d+)/i, 23) if $Self->{vlt}; ok(1); diff --git a/test_regress/t/t_inst_tree_inl0_pub1.pl b/test_regress/t/t_inst_tree_inl0_pub1.pl index 3998cae35..84f019831 100755 --- a/test_regress/t/t_inst_tree_inl0_pub1.pl +++ b/test_regress/t/t_inst_tree_inl0_pub1.pl @@ -14,7 +14,7 @@ compile ( ); if ($Self->{vlt}) { - file_grep ($Self->{stats}, qr/Optimizations, Combined CFuncs\s+16/i); + file_grep ($Self->{stats}, qr/Optimizations, Combined CFuncs\s+(\d+)/i, 16); } execute ( diff --git a/test_regress/t/t_mem_shift.pl b/test_regress/t/t_mem_shift.pl index bcfd8800b..1cb7de21a 100755 --- a/test_regress/t/t_mem_shift.pl +++ b/test_regress/t/t_mem_shift.pl @@ -12,7 +12,7 @@ compile ( ); if ($Self->{vlt}) { - file_grep ($Self->{stats}, qr/Optimizations, Delayed shared-sets\s+14/i); + file_grep ($Self->{stats}, qr/Optimizations, Delayed shared-sets\s+(\d+)/i, 14); } execute ( diff --git a/test_regress/t/t_var_life.pl b/test_regress/t/t_var_life.pl index 4b11ddaa9..47d4211f0 100755 --- a/test_regress/t/t_var_life.pl +++ b/test_regress/t/t_var_life.pl @@ -12,8 +12,8 @@ compile ( ); if ($Self->{vlt}) { - file_grep ($Self->{stats}, qr/Optimizations, Lifetime assign deletions\s+4/i); - file_grep ($Self->{stats}, qr/Optimizations, Lifetime constant prop\s+2/i); + file_grep ($Self->{stats}, qr/Optimizations, Lifetime assign deletions\s+(\d+)/i, 4); + file_grep ($Self->{stats}, qr/Optimizations, Lifetime constant prop\s+(\d+)/i, 2); } execute (