From patchwork Fri Apr 15 18:22:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lawrence Crowl X-Patchwork-Id: 91429 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id DDCFDB6FC8 for ; Sat, 16 Apr 2011 04:22:52 +1000 (EST) Received: (qmail 8326 invoked by alias); 15 Apr 2011 18:22:29 -0000 Received: (qmail 8132 invoked by uid 22791); 15 Apr 2011 18:22:26 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Apr 2011 18:22:20 +0000 Received: from wpaz37.hot.corp.google.com (wpaz37.hot.corp.google.com [172.24.198.101]) by smtp-out.google.com with ESMTP id p3FIMJ3S001149; Fri, 15 Apr 2011 11:22:19 -0700 Received: from jade.mtv.corp.google.com (jade.mtv.corp.google.com [172.18.116.94]) by wpaz37.hot.corp.google.com with ESMTP id p3FIMIYX028937; Fri, 15 Apr 2011 11:22:18 -0700 Received: by jade.mtv.corp.google.com (Postfix, from userid 21482) id DB9B32225CC; Fri, 15 Apr 2011 11:22:17 -0700 (PDT) To: reply@codereview.appspotmail.com, dnovillo@google.com, gcc-patches@gcc.gnu.org Subject: [pph] Clean positive tests. (issue4423044) Message-Id: <20110415182217.DB9B32225CC@jade.mtv.corp.google.com> Date: Fri, 15 Apr 2011 11:22:17 -0700 (PDT) From: crowl@google.com (Lawrence Crowl) X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This patch cleans up positive tests. First, stop on first failure so as to avoid littering the logfile. Second, change the extensions of the generated assembly files to .s-pph and .s+pph to be clear on the provenence of each file. --- This patch is available for review at http://codereview.appspot.com/4423044 Index: gcc/testsuite/ChangeLog.pph 2011-04-15 Lawrence Crowl * lib/dg-pph.exp (dg-pph-pos): Stop on first failure. Change names of assembly files to be clear on which is with and without PPH. Index: gcc/testsuite/lib/dg-pph.exp =================================================================== --- gcc/testsuite/lib/dg-pph.exp (revision 172457) +++ gcc/testsuite/lib/dg-pph.exp (working copy) @@ -74,13 +74,13 @@ proc dg-pph-pos { subdir test options ma if { $have_errs } { verbose -log "regular compilation failed" fail "$nshort $options, regular compilation failed" - return + return } if { ! [ file_on_host exists "$bname.s" ] } { - verbose -log "assembly file '$bname.s' missing" - fail "$nshort $options, assembly comparison" - return + verbose -log "regular assembly file '$bname.s' missing" + fail "$nshort $options, regular assembly missing" + return } # Rename the .s file into .s-pph to compare it after the second build. @@ -89,19 +89,33 @@ proc dg-pph-pos { subdir test options ma # Compile a second time using the pph files. dg-test -keep-output $test "$options $mapflag -I." "" - remote_upload host "$bname.s" + + if { $have_errs } { + verbose -log "PPH compilation failed" + fail "$nshort $options, PPH compilation failed" + return + } + + if { ! [ file_on_host exists "$bname.s" ] } { + verbose -log "PPH assembly file '$bname.s' missing" + fail "$nshort $options, PPH assembly missing" + return + } + + # Rename the .s file into .s+pph to compare it. + remote_upload host "$bname.s" "$bname.s+pph" + remote_download host "$bname.s+pph" # Compare the two assembly files. They should be identical. - set tmp [ diff "$bname.s" "$bname.s-pph" ] + set tmp [ diff "$bname.s-pph" "$bname.s+pph" ] if { $tmp == 0 } { - verbose -log "assembly file '$bname.s', '$bname.s-pph' comparison error" - fail "$nshort $options assembly comparison" + verbose -log "assembly file '$bname.s-pph', '$bname.s+pph' comparison error" + fail "$nshort $options assembly comparison" } elseif { $tmp == 1 } { - pass "$nshort $options assembly comparison" + pass "$nshort $options assembly comparison" + file_on_host delete "$bname.s-pph" + file_on_host delete "$bname.s+pph" } else { - fail "$nshort $options assembly comparison" + fail "$nshort $options assembly comparison" } - file_on_host delete "$bname.s" - file_on_host delete "$bname.s-pph" - }