This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [vta->trunk] VTA merge
On Tue, Sep 01, 2009 at 09:40:26PM +0000, Joseph S. Myers wrote:
> On Tue, 1 Sep 2009, Alexandre Oliva wrote:
>
> > > (along with various other Unixisms
> > > in the testcase that may not even work on all supported native systems),
> >
> > Now that's surprising to me. What is it that you're referring to?
>
> sys/wait.h, used in guality.h, does not exist for MinGW, which is a
> supported native system on the list of secondary platforms for 4.5. ">
> /dev/null 2>&1" is Unix syntax; the null device is NUL on Windows. Some
> other things I thought would be Unixisms (such as getpid) do seem to be
> present on MinGW after all, though I don't know about any other non-Unix
> native systems GCC may support (VMS?).
That can be partily handled by something like:
2009-09-02 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/guality/guality.exp: Only run guality tests if a trivial
testcase using guality.h compiles and links.
--- gcc/testsuite/gcc.dg/guality/guality.exp.jj 2009-09-02 08:29:54.000000000 +0200
+++ gcc/testsuite/gcc.dg/guality/guality.exp 2009-09-02 18:22:11.000000000 +0200
@@ -3,5 +3,11 @@
load_lib gcc-dg.exp
dg-init
-gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] ""
+
+if { [check_no_compiler_messages_nocache guality_trivial executable "
+ #include \"$srcdir/$subdir/guality.h\"
+ int main (int argc, char *argv\[\]) { return 0; }
+"] } {
+ gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] ""
+}
dg-finish
(i.e. don't run any of the tests at all if we can't compile/link a trivial
program using guality.h (i.e. popen isn't available, sys/wait.h, ...)).
As a second check we could perhaps
check_compile similar trivial program which would try e.g. verify a value
of a global variable using GDB, then execute it on the target and check if
it passed and only if it passed run the normal VTA tests.
Jakub