public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Quentin Neill <quentin.neill.gnu@gmail.com>
To: Mike Stump <mikestump@comcast.net>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: PATCH: Add capability to contrib/compare_tests to handle directories
Date: Thu, 16 Feb 2012 15:34:00 -0000	[thread overview]
Message-ID: <CAEhygDpvX8YNHXO3aWKoq4Tf-mOjikcr9zo767qQ_EPVyFFozg@mail.gmail.com> (raw)
In-Reply-To: <CAEhygDrP-ywsm8ZZ79YF6modV-GzLtpRpkT9DRC507QLjnSb8Q@mail.gmail.com>

On Thu, Feb 16, 2012 at 8:18 AM, Quentin Neill
<quentin.neill.gnu@gmail.com> wrote:
> On Tue, Feb 14, 2012 at 9:01 PM, Mike Stump <mikestump@comcast.net> wrote:
>> On Feb 14, 2012, at 8:39 AM, Quentin Neill wrote:
>>> Thanks for the fix.  This seemed familiar, and upon review it looks
>>> like I never committed this fix:
>>> http://gcc.gnu.org/ml/gcc-patches/2011-11/msg01194.html
>>
>> Ah, ok, let's go with your version, it is much better.  Thanks.
>
> Committed.
> --
> Quentin

While working on this, I realized errors detected in directories with
more than one sum file don't show the sum file with the problem
(instead they show the sum1/sum2 files).  Patch below iterates over
sum files instead of concatenating.  Okay to commit?

(output before the patch)

$ compare_tests -strict /d/qneill/tst.w[io].zeroshift.*
# Comparing directories
## Dir1=/d/qneill/tst.wi.zeroshift.192188f71c30: 2 sum files
## Dir2=/d/qneill/tst.wo.zeroshift.bdcd46972d7d: 2 sum files

# Comparing 2 common sum files
## /bin/sh /d/paqa/gcc/compare_tests -strict /tmp/gxx-sum1.4434
/tmp/gxx-sum2.4434
Old tests that passed, that have disappeared: (Eeek!)

gcc.target/x86_64/abi/callabi/vaarg-5b.c (test for excess errors)
Strict test fails


(output after the patch)
$ ./compare_tests -strict /d/qneill/tst.w[io].zeroshift.*
# Comparing directories
## Dir1=/d/qneill/tst.wi.zeroshift.192188f71c30: 2 sum files
## Dir2=/d/qneill/tst.wo.zeroshift.bdcd46972d7d: 2 sum files

# Comparing 2 common sum files
## /bin/sh ./compare_tests -strict
/d/qneill/tst.wi.zeroshift.192188f71c30/bld/gcc/testsuite/gcc/gcc.sum
/d/qneill/tst.wo.zeroshift.bdcd46972d7d/bld/gcc/testsuite/gcc/gcc.sum
Old tests that passed, that have disappeared: (Eeek!)

gcc.target/x86_64/abi/callabi/vaarg-5b.c (test for excess errors)
Strict test fails

## Differences found: bld/gcc/testsuite/gcc/gcc.sum
## /bin/sh ./compare_tests -strict
/d/qneill/tst.wi.zeroshift.192188f71c30/bld/gcc/testsuite/gcc/g++.sum
/d/qneill/tst.wo.zeroshift.bdcd46972d7d/bld/gcc/testsuite/gcc/g++.sum
# 1 differences in 2 common sum files found



diff --git a/contrib/compare_tests b/contrib/compare_tests
index 2fc6e05..611faab 100755
--- a/contrib/compare_tests
+++ b/contrib/compare_tests
@@ -43,9 +43,7 @@ lst2=/tmp/$tool-lst2.$$
 lst3=/tmp/$tool-lst3.$$
 lst4=/tmp/$tool-lst4.$$
 lst5=/tmp/$tool-lst5.$$
-sum1=/tmp/$tool-sum1.$$
-sum2=/tmp/$tool-sum2.$$
-tmps="$tmp1 $tmp2 $now_s $before_s $lst1 $lst2 $lst3 $lst4 $lst5 $sum1 $sum2"
+tmps="$tmp1 $tmp2 $now_s $before_s $lst1 $lst2 $lst3 $lst4 $lst5"

 [ "$1" = "-strict" ] && strict=$1 && shift
 [ "$1" = "-?" ] && usage
@@ -86,15 +84,16 @@ if [ -d "$1" -a -d "$2" ] ; then
        fi
        cmnsums=`cat $lst5 | wc -l`
        echo "# Comparing $cmnsums common sum files"
-       ( for fname in `cat $lst5`; do cat $1/$fname; done ) >$sum1
-       ( for fname in `cat $lst5`; do cat $2/$fname; done ) >$sum2
-       echo "## ${CONFIG_SHELL-/bin/sh} $0 $strict $sum1 $sum2"
-       ${CONFIG_SHELL-/bin/sh} $0 $strict $sum1 $sum2
-       ret=$?
-       if [ $ret -ne 0 ]; then
-               exit_status=`expr $exit_status + 1`
-               echo "## Differences found: $fname"
-       fi
+       for fname in `cat $lst5`
+       do
+               echo "## ${CONFIG_SHELL-/bin/sh} $0 $strict $1/$fname $2/$fname"
+               ${CONFIG_SHELL-/bin/sh} $0 $strict $1/$fname $2/$fname
+               ret=$?
+               if [ $ret -ne 0 ]; then
+                       exit_status=`expr $exit_status + 1`
+                       echo "## Differences found: $fname"
+               fi
+       done
        if [ $exit_status -ne 0 ]; then
                echo "# $exit_status differences in $cmnsums common
sum files found"
        else




-- 
Quentin

      parent reply	other threads:[~2012-02-16 14:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-07 17:29 Quentin Neill
2011-10-04 21:45 ` Quentin Neill
2011-10-04 22:08   ` Mike Stump
2011-11-02 17:45     ` Quentin Neill
2011-11-05  4:33       ` Quentin Neill
2011-11-05 21:39         ` Mike Stump
2011-11-08 16:11           ` Quentin Neill
2011-11-08 16:48             ` Mike Stump
2012-02-11 14:15         ` Mike Stump
2012-02-14 16:41           ` Quentin Neill
2012-02-14 16:47             ` Quentin Neill
2012-02-15  7:23             ` Mike Stump
     [not found]               ` <CAEhygDrP-ywsm8ZZ79YF6modV-GzLtpRpkT9DRC507QLjnSb8Q@mail.gmail.com>
2012-02-16 15:34                 ` Quentin Neill [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEhygDpvX8YNHXO3aWKoq4Tf-mOjikcr9zo767qQ_EPVyFFozg@mail.gmail.com \
    --to=quentin.neill.gnu@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mikestump@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).