use same test execution strategy for --enable-profile-coverage-check as --enable...
authorMichael Rash <mbr@cipherdyne.org>
Wed, 13 Feb 2013 03:06:35 +0000 (22:06 -0500)
committerMichael Rash <mbr@cipherdyne.org>
Wed, 13 Feb 2013 03:06:35 +0000 (22:06 -0500)
test/test-fwknop.pl

index 856afe3..6037e6f 100755 (executable)
@@ -2966,14 +2966,6 @@ my @tests = (
         'function' => \&digest_cache_structure,
         'fatal'    => $NO
     },
-
-    {
-        'category' => 'profile coverage',
-        'detail'   => 'gcov profile coverage',
-        'err_msg'  => 'profile coverage failed',
-        'function' => \&profile_coverage,
-        'fatal'    => $NO
-    },
 );
 
 my %test_keys = (
@@ -3028,6 +3020,18 @@ for my $test_hr (@tests) {
     }
 }
 
+if ($enable_profile_coverage_check) {
+    &run_test(
+        {
+            'category' => 'profile coverage',
+            'detail'   => 'gcov profile coverage',
+            'err_msg'  => 'profile coverage failed',
+            'function' => \&profile_coverage,
+            'fatal'    => $NO
+        },
+    );
+}
+
 if ($use_valgrind) {
     &run_test(
         {
@@ -3121,8 +3125,10 @@ sub process_include_exclude() {
     if (@tests_to_include) {
         my $found = 0;
         for my $test (@tests_to_include) {
-            if ($msg =~ $test or ($use_valgrind
-                    and $msg =~ /valgrind\soutput/)) {
+            if ($msg =~ $test
+                    or ($use_valgrind and $msg =~ /valgrind\soutput/)
+                    or ($enable_profile_coverage_check and $msg =~ /profile\scoverage/)
+            ) {
                 $found = 1;
                 last;
             }
@@ -6606,10 +6612,6 @@ sub init() {
         push @tests_to_exclude, qr/distcheck/;
     }
 
-    unless ($enable_profile_coverage_check) {
-        push @tests_to_exclude, qr/profile coverage/;
-    }
-
     unless ($enable_client_ip_resolve_test) {
         push @tests_to_exclude, qr/IP resolve/;
     }