Factorize testing gcj installation in the testsuite.

* tests/testsuite.at (LT_AT_TAG): For the GCJ tag, actually
try to compile a .java file when deciding whether to skip.
(LT_AT_EXEC_TAG): New macro, to also ensure runnability.
* tests/convenience.at (Java convenience archives): Use
LT_AT_EXEC_TAG, simplify accordingly.
* tests/flags.at (passing lt_tag flags through libtool): Use
m4_defn for tag so LT_AT_TAG works.
* tests/infer-tag.at (GCJ inferred tag): Simplify.
* THANKS: Update.
Report by Warren Dodge.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
This commit is contained in:
Ralf Wildenhues 2010-06-08 22:41:41 +02:00
parent 15017972c5
commit 8f241f6eaa
6 changed files with 50 additions and 20 deletions

View File

@ -1,3 +1,17 @@
2010-06-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Factorize testing gcj installation in the testsuite.
* tests/testsuite.at (LT_AT_TAG): For the GCJ tag, actually
try to compile a .java file when deciding whether to skip.
(LT_AT_EXEC_TAG): New macro, to also ensure runnability.
* tests/convenience.at (Java convenience archives): Use
LT_AT_EXEC_TAG, simplify accordingly.
* tests/flags.at (passing lt_tag flags through libtool): Use
m4_defn for tag so LT_AT_TAG works.
* tests/infer-tag.at (GCJ inferred tag): Simplify.
* THANKS: Update.
Report by Warren Dodge.
2010-06-09 Peter O'Gorman <peter@pogma.com>
Skip demo-nopic tests if SELinux policy will cause failure.

1
THANKS
View File

@ -173,6 +173,7 @@
Tom Tromey tromey@cygnus.com
Tor Lillqvist tml@iki.fi
Ulrich Drepper drepper@ipd.info.uni-karlsruhe.de
Warren Dodge warren.l.dodge@Tektronix.com
Vadim Zeitlin vz-libtool@zeitlins.org
Vincent Lefevre vincent@vinc17.org
Vincent Torri vtorri@univ-evry.fr

View File

@ -1,6 +1,7 @@
# convenience.at -- testing C convenience archives -*- Autotest -*-
# Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
# Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation,
# Inc.
# Written by Ralf Wildenhues, 2005
#
# This file is part of GNU Libtool.
@ -227,7 +228,7 @@ AT_CLEANUP
AT_SETUP([Java convenience archives])
LT_AT_TAG([GCJ])
LT_AT_EXEC_TAG([GCJ])
AT_KEYWORDS([libtool])
cat >foo1.java <<EOF
@ -259,15 +260,6 @@ public class A$i {
};
EOF
# There are just too many broken gcj installations out there, either missing
# libgcj.spec or unable to find it. Skip this test for them.
if test $i -eq 1; then
AT_CHECK([$GCJ $GCJFLAGS -c foo1.java || exit 77], [], [ignore], [ignore])
AT_CHECK([$GCJ $GCJFLAGS --main=foo1 -o foo1$EXEEXT foo1.java A1.java || exit 77],[],[ignore],[ignore])
AT_CHECK([./foo1$EXEEXT || exit 77],[],[ignore],[ignore])
rm -f foo1.o foo1.obj foo1$EXEEXT
fi
$LIBTOOL --tag=GCJ --mode=compile $GCJ $GCJFLAGS -c foo$i.java
$LIBTOOL --tag=GCJ --mode=compile $GCJ $GCJFLAGS -c A$i.java
$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba$i.la A$i.lo

View File

@ -1,6 +1,6 @@
# flags.at -- libtool passing of flags -*- Autotest -*-
#
# Copyright (C) 2009 Free Software Foundation, Inc.
# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
#
# This file is part of GNU Libtool.
#
@ -24,7 +24,7 @@
m4_foreach([lt_tag], [CC, CXX, F77, FC, GCJ],
[AT_SETUP([passing lt_tag flags through libtool])
AT_KEYWORDS([libtool])
LT_AT_TAG([lt_tag])
LT_AT_TAG(m4_defn([lt_tag]))
LDFLAGS="$LDFLAGS -no-undefined"
eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`"

View File

@ -1,6 +1,6 @@
# infer-tag.at -- libtool without --tag -*- Autotest -*-
#
# Copyright (C) 2008 Free Software Foundation, Inc.
# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
#
# This file is part of GNU Libtool.
#
@ -91,10 +91,6 @@ AT_DATA([A.java],
};
]])
# There are just too many broken gcj installations out there, either missing
# libgcj.spec or unable to find it. Skip this test for them.
AT_CHECK([$GCJ $GCJFLAGS -c A.java || exit 77], [], [ignore], [ignore])
AT_CHECK([$LIBTOOL --mode=compile $GCJ $GCJCFLAGS -c A.java],
[], [ignore], [ignore])

View File

@ -275,11 +275,38 @@ AT_CHECK([if $LIBTOOL --mode=execute $2 "$lt_exe" $6; then :; else lt_status=$?;
# LT_AT_TAG(TAG)
# --------------
# Declare that the language TAG will be used in this test.
# Skips the test if the compiler is apparently not functional.
m4_define([LT_AT_TAG],
[AT_KEYWORDS([$1])
AT_CHECK([{ test -n "[$]$1" && test "X[$]$1" != Xno; } || (exit 77)])
m4_if([$1], [CXX],
[AT_CHECK([test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)])])
m4_case([$1],
[CXX],
[AT_CHECK([test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)])],
[GCJ],
[# There are just too many broken gcj installations out there, either missing
# libgcj.spec or unable to find it. Skip the test for them.
AT_DATA([gcj_test.java],
[[public class gcj_test {
public static void main(String[] argv) { }
}
]])
AT_CHECK([$GCJ $GCJFLAGS -c gcj_test.java || exit 77],
[], [ignore], [ignore])])
])
# LT_AT_EXEC_TAG([TAG])
# ---------------------
# Declare that the language TAG will be used and compiled programs may be run.
# Skips the test if the compiler is apparently not functional.
m4_define([LT_AT_EXEC_TAG],
[LT_AT_TAG([$1])
m4_case([$1],
[GCJ],
[AT_CHECK([$GCJ $GCJFLAGS --main=gcj_test -o gcj_test$EXEEXT gcj_test.java ]dnl
[|| exit 77], [], [ignore], [ignore])
AT_CHECK([./gcj_test$EXEEXT || exit 77], [], [ignore], [ignore])])
])