From: Roland McGrath <roland@redhat.com>
To: Nurdin Premji <npremji@redhat.com>
Cc: frysk <frysk@sourceware.org>
Subject: Re: How to get installed compiler version for test cases?
Date: Fri, 04 Jan 2008 02:20:00 -0000 [thread overview]
Message-ID: <20080104021919.4792C26F9A0@magilla.localdomain> (raw)
In-Reply-To: Nurdin Premji's message of Thursday, 3 January 2008 21:00:19 -0500 <477D9333.5050106@redhat.com>
> 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
prev parent reply other threads:[~2008-01-04 2:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-04 2:02 Nurdin Premji
2008-01-04 2:20 ` Roland McGrath [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=20080104021919.4792C26F9A0@magilla.localdomain \
--to=roland@redhat.com \
--cc=frysk@sourceware.org \
--cc=npremji@redhat.com \
/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).