From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 563 invoked by alias); 4 Jan 2008 02:20:38 -0000 Received: (qmail 549 invoked by uid 22791); 4 Jan 2008 02:20:37 -0000 X-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,SPF_FAIL X-Spam-Check-By: sourceware.org Received: from qmta09.westchester.pa.mail.comcast.net (HELO QMTA09.westchester.pa.mail.comcast.net) (76.96.62.96) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 04 Jan 2008 02:19:23 +0000 Received: from OMTA07.westchester.pa.mail.comcast.net ([76.96.62.59]) by QMTA09.westchester.pa.mail.comcast.net with comcast id YnXr1Y00K1GhbT8590D800; Fri, 04 Jan 2008 02:19:21 +0000 Received: from gateway.sf.frob.com ([67.160.211.197]) by OMTA07.westchester.pa.mail.comcast.net with comcast id YqKA1Y0084G5f4b3T00000; Fri, 04 Jan 2008 02:19:11 +0000 X-Authority-Analysis: v=1.0 c=1 a=DMGGh7KTG_UA:10 a=RYFLW6ebtpNBegQnzZ7X4w==:17 a=c6VwmOLJxNur6shv7fcA:9 a=PxzC1gmWxZIKXXk7OS3jNKnKMiYA:4 a=MxZ3bB5I4kYA:10 Received: from magilla.localdomain (magilla.sf.frob.com [198.49.250.228]) by gateway.sf.frob.com (Postfix) with ESMTP id 771D2357B; Thu, 3 Jan 2008 18:19:19 -0800 (PST) Received: by magilla.localdomain (Postfix, from userid 5281) id 4792C26F9A0; Thu, 3 Jan 2008 18:19:19 -0800 (PST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Nurdin Premji Cc: frysk Subject: Re: How to get installed compiler version for test cases? In-Reply-To: Nurdin Premji's message of Thursday, 3 January 2008 21:00:19 -0500 <477D9333.5050106@redhat.com> References: <477D9333.5050106@redhat.com> X-Zippy-Says: .. Like I always say -- nothing can beat the BRATWURST here in DUSSELDORF!! Message-Id: <20080104021919.4792C26F9A0@magilla.localdomain> Date: Fri, 04 Jan 2008 02:20:00 -0000 X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2008-q1/txt/msg00006.txt.bz2 > What is the quickest way to find out the installed compiler version for > use with junit Test cases. > > I know that for kernel versions there are KernelMatch, KernelVersion and > Uname, to decide which kernels have what features, but the use of uname > is also a function and not just a program. > > What I need to do is grab the output of "gcc --version" to decide > whether the new tests should be run or skipped as unresolved. One simple approach is to have tests that do: #if __GNUC__ < 4 || __GNUC_MINOR__ < 3 int main (void) { return 77; } #else ... real test ... #endif i.e., you run them anyway but they are stubs that always just quickly exit with 77, which means "SKIP". I don't know if it's simple to have junit treat it that way though. Thanks, Roland