Drop prefix from unsupported source path.
[deliverable/binutils-gdb.git] / gdb / testsuite / dg-extract-results.sh
index 779508294251d6a72197f2266dd835496d10391e..42190ae5cdf058ffbfe8aee20e0d8bfb90f45402 100755 (executable)
@@ -6,7 +6,7 @@
 # The resulting file can be used with test result comparison scripts for
 # results from tests that were run in parallel.  See usage() below.
 
-# Copyright (C) 2008-2010, 2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
 # Contributed by Janis Johnson <janis187@us.ibm.com>
 #
 # This file is part of GCC.
@@ -22,9 +22,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with GCC; see the file COPYING.  If not, write to
-# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-# Boston, MA 02110-1301, USA.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 PROGNAME=dg-extract-results.sh
 
@@ -224,7 +222,7 @@ else
   VARIANTS=""
   for VAR in $VARS
   do
-    grep -q "Running target $VAR" $SUM_FILES && VARIANTS="$VARIANTS $VAR"
+    grep "Running target $VAR" $SUM_FILES > /dev/null && VARIANTS="$VARIANTS $VAR"
   done
 fi
 
@@ -288,7 +286,7 @@ BEGIN {
 /^Using / {
   if (variant == curvar && print_using) { print; next }
 }
-/^Running / {
+/^Running .*\\.exp \\.\\.\\./ {
   print_using=0
   if (variant == curvar) {
     if (need_close) close(curfile)
@@ -345,7 +343,7 @@ EOF
 BEGIN {
   variant="$VAR"
   tool="$TOOL"
-  passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; kfailcnt=0; unsupcnt=0; unrescnt=0;
+  passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; kpasscnt=0; kfailcnt=0; unsupcnt=0; unrescnt=0;
   curvar=""; insummary=0
 }
 /^Running target /             { curvar = \$3; next }
@@ -354,6 +352,7 @@ BEGIN {
 /^# of unexpected successes/   { if (insummary == 1) xpasscnt += \$5; next; }
 /^# of unexpected failures/    { if (insummary == 1) failcnt += \$5; next; }
 /^# of expected failures/      { if (insummary == 1) xfailcnt += \$5; next; }
+/^# of unknown successes/      { if (insummary == 1) kpasscnt += \$5; next; }
 /^# of known failures/         { if (insummary == 1) kfailcnt += \$5; next; }
 /^# of untested testcases/     { if (insummary == 1) untstcnt += \$5; next; }
 /^# of unresolved testcases/   { if (insummary == 1) unrescnt += \$5; next; }
@@ -369,6 +368,7 @@ END {
   if (failcnt != 0) printf ("# of unexpected failures\t%d\n", failcnt)
   if (xpasscnt != 0) printf ("# of unexpected successes\t%d\n", xpasscnt)
   if (xfailcnt != 0) printf ("# of expected failures\t\t%d\n", xfailcnt)
+  if (kpasscnt != 0) printf ("# of unknown successes\t\t%d\n", kpasscnt)
   if (kfailcnt != 0) printf ("# of known failures\t\t%d\n", kfailcnt)
   if (untstcnt != 0) printf ("# of untested testcases\t\t%d\n", untstcnt)
   if (unrescnt != 0) printf ("# of unresolved testcases\t%d\n", unrescnt)
@@ -399,6 +399,7 @@ BEGIN {
 /^# of unexpected failures/    { failcnt += \$5 }
 /^# of unexpected successes/   { xpasscnt += \$5 }
 /^# of expected failures/      { xfailcnt += \$5 }
+/^# of unknown successes/      { kpasscnt += \$5 }
 /^# of known failures/         { kfailcnt += \$5 }
 /^# of untested testcases/     { untstcnt += \$5 }
 /^# of unresolved testcases/   { unrescnt += \$5 }
@@ -409,6 +410,7 @@ END {
   if (failcnt != 0) printf ("# of unexpected failures\t%d\n", failcnt)
   if (xpasscnt != 0) printf ("# of unexpected successes\t%d\n", xpasscnt)
   if (xfailcnt != 0) printf ("# of expected failures\t\t%d\n", xfailcnt)
+  if (kpasscnt != 0) printf ("# of unknown successes\t\t%d\n", kpasscnt)
   if (kfailcnt != 0) printf ("# of known failures\t\t%d\n", kfailcnt)
   if (untstcnt != 0) printf ("# of untested testcases\t\t%d\n", untstcnt)
   if (unrescnt != 0) printf ("# of unresolved testcases\t%d\n", unrescnt)
@@ -422,6 +424,6 @@ cat ${TMP}/var-* | $AWK -f $TOTAL_AWK
 # This is ugly, but if there's version output from the compiler under test
 # at the end of the file, we want it.  The other thing that might be there
 # is the final summary counts.
-tail -2 $FIRST_SUM | grep -q '^#' || tail -2 $FIRST_SUM
+tail -2 $FIRST_SUM | grep '^#' > /dev/null || tail -2 $FIRST_SUM
 
 exit 0
This page took 0.026177 seconds and 4 git commands to generate.