From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30582 invoked by alias); 16 Feb 2012 14:44:51 -0000 Received: (qmail 30566 invoked by uid 22791); 16 Feb 2012 14:44:48 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-iy0-f175.google.com (HELO mail-iy0-f175.google.com) (209.85.210.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Feb 2012 14:44:13 +0000 Received: by iaby12 with SMTP id y12so3229455iab.20 for ; Thu, 16 Feb 2012 06:44:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.150.1 with SMTP id y1mr2651192icv.11.1329403453389; Thu, 16 Feb 2012 06:44:13 -0800 (PST) Received: by 10.231.15.4 with HTTP; Thu, 16 Feb 2012 06:44:12 -0800 (PST) In-Reply-To: References: <4CD2433B-1994-4834-A595-131242428431@comcast.net> <7F0115C8-1F88-4567-81A9-C8AEA5CF1B59@comcast.net> <798F569D-268C-400A-A125-0932E72AEBB9@comcast.net> Date: Thu, 16 Feb 2012 15:34:00 -0000 Message-ID: Subject: Re: PATCH: Add capability to contrib/compare_tests to handle directories From: Quentin Neill To: Mike Stump , gcc-patches Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-02/txt/msg00876.txt.bz2 On Thu, Feb 16, 2012 at 8:18 AM, Quentin Neill wrote: > On Tue, Feb 14, 2012 at 9:01 PM, Mike Stump wrote: >> On Feb 14, 2012, at 8:39 AM, Quentin Neill wrote: >>> Thanks for the fix. =A0This 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. =A0Thanks. > > 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=3D/d/qneill/tst.wi.zeroshift.192188f71c30: 2 sum files ## Dir2=3D/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=3D/d/qneill/tst.wi.zeroshift.192188f71c30: 2 sum files ## Dir2=3D/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=3D/tmp/$tool-lst2.$$ lst3=3D/tmp/$tool-lst3.$$ lst4=3D/tmp/$tool-lst4.$$ lst5=3D/tmp/$tool-lst5.$$ -sum1=3D/tmp/$tool-sum1.$$ -sum2=3D/tmp/$tool-sum2.$$ -tmps=3D"$tmp1 $tmp2 $now_s $before_s $lst1 $lst2 $lst3 $lst4 $lst5 $sum1 $= sum2" +tmps=3D"$tmp1 $tmp2 $now_s $before_s $lst1 $lst2 $lst3 $lst4 $lst5" [ "$1" =3D "-strict" ] && strict=3D$1 && shift [ "$1" =3D "-?" ] && usage @@ -86,15 +84,16 @@ if [ -d "$1" -a -d "$2" ] ; then fi cmnsums=3D`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=3D$? - if [ $ret -ne 0 ]; then - exit_status=3D`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/$f= name" + ${CONFIG_SHELL-/bin/sh} $0 $strict $1/$fname $2/$fname + ret=3D$? + if [ $ret -ne 0 ]; then + exit_status=3D`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 --=20 Quentin