Return-Path: Delivered-To: apmail-incubator-stdcxx-commits-archive@www.apache.org Received: (qmail 41495 invoked from network); 6 Mar 2007 22:38:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Mar 2007 22:38:43 -0000 Received: (qmail 78227 invoked by uid 500); 6 Mar 2007 22:38:51 -0000 Delivered-To: apmail-incubator-stdcxx-commits-archive@incubator.apache.org Received: (qmail 78204 invoked by uid 500); 6 Mar 2007 22:38:51 -0000 Mailing-List: contact stdcxx-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-commits@incubator.apache.org Received: (qmail 78193 invoked by uid 99); 6 Mar 2007 22:38:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2007 14:38:51 -0800 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2007 14:38:42 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 4C8B51A9838; Tue, 6 Mar 2007 14:38:22 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r515332 - in /incubator/stdcxx/trunk: etc/config/GNUmakefile.tst tests/src/driver.cpp util/output.cpp Date: Tue, 06 Mar 2007 22:38:22 -0000 To: stdcxx-commits@incubator.apache.org From: ablack@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070306223822.4C8B51A9838@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ablack Date: Tue Mar 6 14:38:21 2007 New Revision: 515332 URL: http://svn.apache.org/viewvc?view=rev&rev=515332 Log: 2007-03-05 Andrew Black * tests/src/driver.cpp (_rw_setopt_output_file): Add logic to treat the magic file name of '-' as a reference to stdout. * etc/config/GNUmakefile.tst (RUNFLAGS): Specify compatibility mode flags to enable parsing of legacy tests. * util/output.cpp (check_compat_test): Adjust seek position to avoid false format errors when an executable contains a very small number of tests. Modified: incubator/stdcxx/trunk/etc/config/GNUmakefile.tst incubator/stdcxx/trunk/tests/src/driver.cpp incubator/stdcxx/trunk/util/output.cpp Modified: incubator/stdcxx/trunk/etc/config/GNUmakefile.tst URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/GNUmakefile.tst?view=diff&rev=515332&r1=515331&r2=515332 ============================================================================== --- incubator/stdcxx/trunk/etc/config/GNUmakefile.tst (original) +++ incubator/stdcxx/trunk/etc/config/GNUmakefile.tst Tue Mar 6 14:38:21 2007 @@ -71,6 +71,8 @@ LDFLAGS += $(RPATH)$(LIBDIR):$(BUILDDIR)/rwtest endif +RUNFLAGS = --compat -x "--compat -O -" + ############################################################################## # TARGETS ############################################################################## Modified: incubator/stdcxx/trunk/tests/src/driver.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/src/driver.cpp?view=diff&rev=515332&r1=515331&r2=515332 ============================================================================== --- incubator/stdcxx/trunk/tests/src/driver.cpp (original) +++ incubator/stdcxx/trunk/tests/src/driver.cpp Tue Mar 6 14:38:21 2007 @@ -609,15 +609,18 @@ } if (file_name) { + if (file_name[0] != '-' || file_name[1] != '\0') { + FILE* const f = fopen (file_name, "w"); - FILE* const f = fopen (file_name, "w"); + if (f) { + if (_rw_ftestout && _rw_ftestout != rw_stdout) + fclose ((FILE*)(void*)_rw_ftestout); - if (f) { - if (_rw_ftestout && _rw_ftestout != rw_stdout) - fclose ((FILE*)(void*)_rw_ftestout); - - _rw_ftestout = (rw_file*)(void*)f; + _rw_ftestout = (rw_file*)(void*)f; + } } + else + _rw_ftestout = (rw_file*)(void*)stdout; } // return 0 on success, any non-zero value on failure Modified: incubator/stdcxx/trunk/util/output.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/output.cpp?view=diff&rev=515332&r1=515331&r2=515332 ============================================================================== --- incubator/stdcxx/trunk/util/output.cpp (original) +++ incubator/stdcxx/trunk/util/output.cpp Tue Mar 6 14:38:21 2007 @@ -145,7 +145,7 @@ assert (0 != data); assert (0 != status); - fseek (data, -80, SEEK_END); /* Seek near the end of the file */ + fseek (data, -70, SEEK_END); /* Seek near the end of the file */ for (tok = fgetc (data); fsm < 4 && !feof (data); tok = fgetc (data)) { switch (tok) {