Fix how we match for count(n*) in gcov tests.
authorMartin Liska <mliska@suse.cz>
Mon, 19 Nov 2018 11:19:15 +0000 (12:19 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Mon, 19 Nov 2018 11:19:15 +0000 (11:19 +0000)
2018-11-19  Martin Liska  <mliska@suse.cz>

* g++.dg/gcov/pr84548.C: Remove remove-gcda.
* g++.dg/gcov/ternary.C: Likewise.
* lib/gcov.exp: Support pattern of following form:
count(1*).

From-SVN: r266270

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/gcov/pr84548.C
gcc/testsuite/g++.dg/gcov/ternary.C
gcc/testsuite/lib/gcov.exp

index 271055d..3fff2c8 100644 (file)
@@ -1,3 +1,10 @@
+2018-11-19  Martin Liska  <mliska@suse.cz>
+
+       * g++.dg/gcov/pr84548.C: Remove remove-gcda.
+       * g++.dg/gcov/ternary.C: Likewise.
+       * lib/gcov.exp: Support pattern of following form:
+       count(1*).
+
 2018-11-19  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc.target/visium/overflow8.c: Remove -fno-if-conversion and
index 6c22c19..3b60b90 100644 (file)
@@ -16,4 +16,4 @@ int main()
   return 0;
 }
 
-// { dg-final { run-gcov remove-gcda pr84548.C } }
+// { dg-final { run-gcov pr84548.C } }
index d055928..9b8e346 100644 (file)
@@ -9,4 +9,4 @@ int main()
   return a;
 }
 
-// { dg-final { run-gcov remove-gcda ternary.C } }
+// { dg-final { run-gcov ternary.C } }
index a7b8c0a..dbd3c8e 100644 (file)
@@ -59,7 +59,7 @@ proc verify-lines { testname testcase file } {
     while { [gets $fd line] >= 0 } {
         # We want to match both "-" and "#####" as count as well as numbers,
         # since we want to detect lines that shouldn't be marked as covered.
-       if [regexp "^ *(\[^:]*): *(\[0-9\\-#]+):.*count\\((\[0-9\\-#=\\.kMGTPEZY]+)\\)(.*)" \
+       if [regexp "^ *(\[^:]*): *(\[0-9\\-#]+):.*count\\((\[0-9\\-#=\\.kMGTPEZY\*]+)\\)(.*)" \
                "$line" all is n shouldbe rest] {
            if [regexp "^ *{(.*)}" $rest all xfailed] {
                switch [dg-process-target $xfailed] {