aboutsummaryrefslogtreecommitdiff
path: root/contrib/test-g++
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/test-g++')
-rwxr-xr-xcontrib/test-g++89
1 files changed, 89 insertions, 0 deletions
diff --git a/contrib/test-g++ b/contrib/test-g++
new file mode 100755
index 0000000..91f14c1
--- /dev/null
+++ b/contrib/test-g++
@@ -0,0 +1,89 @@
+#!/bin/sh
+
+# Default DEVOSRCDIR
+if [ "$DEVOSRCDIR" = "" ]; then
+ DEVOSRCDIR=$HOME/devo ; export DEVOSRCDIR
+fi
+
+# Check DEVOSRCDIR
+if [ ! -d "$DEVOSRCDIR" ]; then
+ echo "$0: no directory $DEVOSRCDIR" >&2
+ exit 2
+fi
+
+# Default DEVOBINDIR
+if [ "$DEVOBINDIR" = "" ]; then
+ CPU=`$DEVOSRCDIR/config.guess`
+ if [ $? != 0 ]; then
+ echo "$0: cannot run config.guess" >&2
+ exit 2
+ fi
+ DEVOBINDIR=$HOME/$CPU ; export DEVOBINDIR
+fi
+
+# Check DEVOBINDIR
+if [ ! -d "$DEVOBINDIR" ]; then
+ echo "$0: no directory $DEVOBINDIR" >&2
+ exit 2
+fi
+
+# Default LOGDIR
+if [ "$LOGDIR" = "" ]; then
+ LOGDIR=$HOME/logs ; export LOGDIR
+fi
+
+# Check LOGDIR
+if [ ! -d "$LOGDIR" ]; then
+ echo "$0: no directory $LOGDIR" >&2
+ exit 2
+fi
+
+cd $LOGDIR || exit 2
+
+sum=g++-`date '+%y%m%d'`
+
+$DEVOSRCDIR/dejagnu/contrib/test-tool g++ > $sum 2>&1
+status=$?
+
+if [ -d $DEVOBINDIR/libg++ ]; then
+
+cd $DEVOBINDIR/libg++
+make check >/tmp/clgpp$$ 2>&1
+if [ $? != 0 ]; then
+ cd $LOGDIR
+ echo "" >> $sum
+ echo "libg++ fails to make check:" >> $sum
+ tail -20 /tmp/clgpp$$ >> $sum
+ if [ $status = 0 ]; then
+ status=1
+ fi
+fi
+
+# libg++?
+fi
+
+cd $DEVOBINDIR/libio
+make check >/tmp/clgpp$$ 2>&1
+if [ $? != 0 ]; then
+ cd $LOGDIR
+ echo "" >> $sum
+ echo "libio fails to make check:" >> $sum
+ tail -20 /tmp/clgpp$$ >> $sum
+ if [ $status = 0 ]; then
+ status=1
+ fi
+fi
+
+cd $DEVOBINDIR/libstdc++
+make check >/tmp/clgpp$$ 2>&1
+if [ $? != 0 ]; then
+ cd $LOGDIR
+ echo "" >> $sum
+ echo "libstdc++ fails to make check:" >> $sum
+ tail -20 /tmp/clgpp$$ >> $sum
+ if [ $status = 0 ]; then
+ status=1
+ fi
+fi
+
+exit $status