* How to get installed compiler version for test cases?
@ 2008-01-04 2:02 Nurdin Premji
2008-01-04 2:20 ` Roland McGrath
0 siblings, 1 reply; 2+ messages in thread
From: Nurdin Premji @ 2008-01-04 2:02 UTC (permalink / raw)
To: frysk
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.
Thank you,
Nurdin
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to get installed compiler version for test cases?
2008-01-04 2:02 How to get installed compiler version for test cases? Nurdin Premji
@ 2008-01-04 2:20 ` Roland McGrath
0 siblings, 0 replies; 2+ messages in thread
From: Roland McGrath @ 2008-01-04 2:20 UTC (permalink / raw)
To: Nurdin Premji; +Cc: frysk
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-04 2:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-04 2:02 How to get installed compiler version for test cases? Nurdin Premji
2008-01-04 2:20 ` Roland McGrath
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).