+2002-10-11 Geoffrey Keating <geoffk@apple.com>
+
+ * objs-gcc.sh: Don't install GDB testsuite if GDB was not built.
+ * btest-gcc.sh: Don't run GDB testsuite if it doesn't exist.
+
2002-10-09 Phil Edwards <pme@gcc.gnu.org>
* btest-gcc.sh, objs-gcc.sh: Update TARGET comments.
# Test the just-built GCC with the GDB testsuite.
mkdir test-gdb || exit 1
+if [ -d $GDB_TESTSUITE ] ; then
cd $GDB_TESTSUITE || exit 1
for i in gdb.* ; do
if [ -d $i ] ; then
echo "set build_triplet $H_BUILD" >> site.exp
echo "set srcdir $GDB_TESTSUITE" >> site.exp
runtest --tool gdb
+else
+ echo 'gdb tests not run' > $BUILD/test-gdb/gdb.sum
+fi
# Sanity-check the testlogs. They should contain at least one PASS.
cd $BUILD || exit 1
make install || exit 1
fi
-mkdir -p $PREFIX/share/gdb-testsuite || exit 1
-cd $SOURCE/gdb/testsuite || exit 1
-find . -print | cpio -pdmu $PREFIX/share/gdb-testsuite || exit 1
-# selftest.exp requires keeping old sources around, which is impractical
-rm $PREFIX/share/gdb-testsuite/gdb.base/selftest.exp
-# these tests seem to be broken and randomly failing
-rm -r $PREFIX/share/gdb-testsuite/gdb.mi
+if [ -x $PREFIX/bin/$TARGET-gdb ] ; then
+ mkdir -p $PREFIX/share/gdb-testsuite || exit 1
+ cd $SOURCE/gdb/testsuite || exit 1
+ find . -print | cpio -pdmu $PREFIX/share/gdb-testsuite || exit 1
+ # selftest.exp requires keeping old sources around, which is impractical
+ rm $PREFIX/share/gdb-testsuite/gdb.base/selftest.exp
+ # these tests seem to be broken and randomly failing
+ rm -r $PREFIX/share/gdb-testsuite/gdb.mi
+fi
echo pass > $RESULT
exit 0