summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBrian Jones <cbj@gnu.org>2002-11-18 01:13:37 +0000
committerBrian Jones <cbj@gnu.org>2002-11-18 01:13:37 +0000
commit49332699dc0c10b9010523a749400f2a8aab3de2 (patch)
treefda7f3f4addae6ac9a6747ac1c97f7b5029eeef4 /scripts
parent9fc99e7d1de60e8327c3236f09abe32c26ac824c (diff)
downloadclasspath-49332699dc0c10b9010523a749400f2a8aab3de2.tar.gz
* scripts/japi: new file, used nightly
* scripts/kissme-mauve: new file, used nightly
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/japi135
-rwxr-xr-xscripts/kissme-mauve346
2 files changed, 481 insertions, 0 deletions
diff --git a/scripts/japi b/scripts/japi
new file mode 100755
index 000000000..52bcbc472
--- /dev/null
+++ b/scripts/japi
@@ -0,0 +1,135 @@
+#!/bin/sh
+
+CLASSPATH_CVS=~/japi/classpath
+JAPIZE_DIR=~/japitools-0.9
+FTPROOT=~alpha/pub/gnu/classpath/nightly/tests
+LOG=/tmp/japi.log
+export PATH=${PATH}:/usr/java/j2sdk1.4.1/bin
+
+rm -f /tmp/japi.log > /dev/null 2>&1
+
+classpath_checkout ()
+{
+ if [ ! -d "${CLASSPATH_CVS}" ]; then
+ mkdir --parents ${CLASSPATH_CVS}
+ local dir=`dirname "${CLASSPATH_CVS}"`
+ cd "${dir}"
+ cvs -z3 -d :pserver:anoncvs@subversions.gnu.org:/cvsroot/classpath co classpath >> ${LOG} 2>/dev/null
+ if [ $? -ne 0 ]; then
+ echo "Error checking out classpath"
+ exit 1
+ fi
+ fi
+}
+
+classpath_update ()
+{
+ cd "${CLASSPATH_CVS}" && cvs update -d -P . >> ${LOG} 2>/dev/null
+ if [ $? -ne 0 ]; then
+ echo "Error checking out classpath"
+ exit 1
+ fi
+}
+
+classpath_clean ()
+{
+ if [ -d "${CLASSPATH_CVS}/build" ]; then
+ rm -rf "${CLASSPATH_CVS}/build"
+ fi
+# if [ -d "${CLASSPATH_PREFIX}" ]; then
+# rm -rf "${CLASSPATH_PREFIX}"
+# fi
+ mkdir --parents "${CLASSPATH_CVS}/build"
+# mkdir --parents "${CLASSPATH_PREFIX}"
+}
+
+classpath_configure ()
+{
+ cd "${CLASSPATH_CVS}"
+ aclocal >> ${LOG} 2>&1
+ if [ $? -ne 0 ]; then
+ echo "Error running aclocal"
+ exit 1
+ fi
+ autoheader >> ${LOG} 2>&1
+ if [ $? -ne 0 ]; then
+ echo "Error running autoheader"
+ exit 1
+ fi
+ automake >> ${LOG} 2>&1
+ if [ $? -ne 0 ]; then
+ echo "Error running automake"
+ exit 1
+ fi
+ autoconf >> ${LOG} 2>&1
+ if [ $? -ne 0 ]; then
+ echo "Error running autoconf"
+ exit 1
+ fi
+ cd "${CLASSPATH_CVS}/build" && ../configure --with-gcj >> ${LOG} 2>&1
+ if [ $? -ne 0 ]; then
+ echo "Error configuring"
+ exit 1
+ fi
+}
+
+classpath_build ()
+{
+ cd "${CLASSPATH_CVS}/build" && make >> ${LOG} 2>&1
+ if [ $? -ne 0 ]; then
+ echo "Error during make"
+ exit 1
+ fi
+}
+
+
+japize_classpath ()
+{
+ cd "${JAPIZE_DIR}/bin" && ./japize as classpath packages "${CLASSPATH_CVS}/build/lib/glibj.zip" +java +javax +org -java.awt.dnd.peer -java.awt.peer -org.apache -org.w3c.dom.css -org.w3c.dom.events -org.w3c.dom.html -org.w3c.dom.stylesheets -org.w3c.dom.traversal -org.w3c.dom.views -java.text.resources >> /tmp/japi.log 2>&1
+ if [ $? -ne 0 ]; then
+ echo "Error running japize"
+ exit 1
+ fi
+ cp -f "${JAPIZE_DIR}/bin/classpath.japi.gz" /tmp
+}
+
+japicompat_classpath ()
+{
+ today=`date`
+ echo "${today}" > /tmp/classpath-jdk11-compare.txt
+ cd "${JAPIZE_DIR}/bin" && ./japicompat -q jdk11.japi.gz classpath.japi.gz >> /tmp/classpath-jdk11-compare.txt
+ if [ $? -ne 0 ]; then
+ echo "Error running japicompat"
+ exit 1
+ fi
+ echo "${today}" > /tmp/classpath-jdk13-compare.txt
+ cd "${JAPIZE_DIR}/bin" && ./japicompat -q jdk13.japi.gz classpath.japi.gz >> /tmp/classpath-jdk13-compare.txt
+ if [ $? -ne 0 ]; then
+ echo "Error running japicompat"
+ exit 1
+ fi
+}
+
+#--------------------------------------------------------------------
+# Update Classpath CVS
+#--------------------------------------------------------------------
+classpath_checkout
+classpath_update
+
+#--------------------------------------------------------------------
+# Build Classpath with GCJ 3.2
+#--------------------------------------------------------------------
+classpath_clean
+classpath_configure
+classpath_build
+
+#--------------------------------------------------------------------
+# Run japize on glibj.zip
+#--------------------------------------------------------------------
+japize_classpath
+
+#--------------------------------------------------------------------
+# Run japicompat against jdk13
+#--------------------------------------------------------------------
+japicompat_classpath
+
diff --git a/scripts/kissme-mauve b/scripts/kissme-mauve
new file mode 100755
index 000000000..8a6ee22db
--- /dev/null
+++ b/scripts/kissme-mauve
@@ -0,0 +1,346 @@
+#!/bin/sh
+
+CLASSPATH_CVS=~/mauve/classpath
+CLASSPATH_PREFIX=~/mauve/root/classpath
+MAUVE_CVS=~/mauve/mauve
+KISSME_CVS=~/mauve/kissme
+KISSME_PREFIX=~/mauve/root/kissme
+KISSME_BIN=~/mauve/kissme/useful_scripts/kissme
+LOG=/tmp/mauve.log
+RESULTS=/tmp/kissme-mauve.txt
+REPORT=/tmp/kissme-mauve-report.txt
+TIMEOUT=30
+
+rm -f ${LOG} > /dev/null 2>&1
+rm -f ${RESULTS} > /dev/null 2>&1
+today=`date`
+echo "${today}" > ${LOG}
+touch ${RESULTS}
+
+
+_aclocal ()
+{
+ aclocal "$@" >> ${LOG} 2>&1
+ if [ $? -ne 0 ]; then
+ echo "Error running aclocal"
+ exit 1
+ fi
+}
+
+_autoheader ()
+{
+ autoheader "$@" >> ${LOG} 2>&1
+ if [ $? -ne 0 ]; then
+ echo "Error running autoheader"
+ exit 1
+ fi
+}
+
+_automake ()
+{
+ automake "$@" >> ${LOG} 2>&1
+ if [ $? -ne 0 ]; then
+ echo "Error running automake"
+ exit 1
+ fi
+}
+
+_autoconf ()
+{
+ autoconf "$@" >> ${LOG} 2>&1
+ if [ $? -ne 0 ]; then
+ echo "Error running autoconf"
+ exit 1
+ fi
+}
+
+classpath_checkout ()
+{
+ if [ ! -d "${CLASSPATH_CVS}" ]; then
+ mkdir --parents ${CLASSPATH_CVS}
+ local dir=`dirname "${CLASSPATH_CVS}"`
+ cd "${dir}"
+ cvs -z3 -d :pserver:anoncvs@subversions.gnu.org:/cvsroot/classpath co classpath >> ${LOG} 2>/dev/null
+ if [ $? -ne 0 ]; then
+ echo "Error checking out classpath"
+ exit 1
+ fi
+ fi
+}
+
+classpath_update ()
+{
+ cd "${CLASSPATH_CVS}" && cvs update -d -P . >> ${LOG} 2>/dev/null
+ if [ $? -ne 0 ]; then
+ echo "Error checking out classpath"
+ exit 1
+ fi
+}
+
+classpath_clean ()
+{
+ if [ -d "${CLASSPATH_CVS}/build" ]; then
+ rm -rf "${CLASSPATH_CVS}/build"
+ fi
+ if [ -d "${CLASSPATH_PREFIX}" ]; then
+ rm -rf "${CLASSPATH_PREFIX}"
+ fi
+ mkdir --parents "${CLASSPATH_CVS}/build"
+ mkdir --parents "${CLASSPATH_PREFIX}"
+}
+
+classpath_configure ()
+{
+ cd "${CLASSPATH_CVS}"
+
+ _aclocal
+ _autoheader
+ _automake
+ _autoconf
+
+ cd "${CLASSPATH_CVS}/build" && ../configure --prefix=${CLASSPATH_PREFIX} --with-gcj --enable-jni >> ${LOG} 2>&1
+ if [ $? -ne 0 ]; then
+ echo "Error configuring"
+ exit 1
+ fi
+}
+
+classpath_build ()
+{
+ cd "${CLASSPATH_CVS}/build" && make >> ${LOG} 2>&1
+ if [ $? -ne 0 ]; then
+ echo "Error during make"
+ exit 1
+ fi
+}
+
+classpath_install ()
+{
+ cd "${CLASSPATH_CVS}/build" && make install >> ${LOG} 2>&1
+ if [ $? -ne 0 ]; then
+ echo "Error during make"
+ exit 1
+ fi
+}
+
+kissme_checkout ()
+{
+ if [ ! -d "${KISSME_CVS}" ]; then
+ mkdir --parents ${KISSME_CVS}
+ local dir=`dirname "${KISSME_CVS}"`
+ cd "${KISSME_CVS}"
+ cvs -z3 -d :pserver:anonymous@cvs.kissme.sourceforge.net:/cvsroot/kissme co . >> ${LOG} 2>/dev/null
+ if [ $? -ne 0 ]; then
+ echo "Error checking out kissme"
+ exit 1
+ fi
+ fi
+}
+
+kissme_update ()
+{
+ cd "${KISSME_CVS}" && cvs update -d -P . >> ${LOG} 2>/dev/null
+ if [ $? -ne 0 ]; then
+ echo "Error checking out kissme"
+ exit 1
+ fi
+}
+
+kissme_clean ()
+{
+ if [ -d "${KISSME_CVS}/build" ]; then
+ rm -rf "${KISSME_CVS}/build"
+ fi
+ if [ -d "${KISSME_PREFIX}" ]; then
+ rm -rf "${KISSME_PREFIX}"
+ fi
+ mkdir --parents "${KISSME_CVS}/build"
+ mkdir --parents "${KISSME_PREFIX}"
+}
+
+kissme_configure ()
+{
+ cd "${KISSME_CVS}"
+
+ _aclocal
+ _autoheader
+ _automake -a
+ _autoconf
+
+ cd "${KISSME_CVS}" && ./configure --prefix=${KISSME_PREFIX} \
+ --enable-use-zips --with-gnu-classpath=${CLASSPATH_CVS} \
+ --with-gnu-classpath-build=${CLASSPATH_CVS}/build \
+ --with-classpath-install-dir=${CLASSPATH_PREFIX} >> ${LOG} 2>&1
+
+ if [ $? -ne 0 ]; then
+ echo "Error configuring"
+ exit 1
+ fi
+}
+
+kissme_build ()
+{
+ cd "${KISSME_CVS}" && make >> ${LOG} 2>&1
+ if [ $? -ne 0 ]; then
+ echo "Error during make"
+ exit 1
+ fi
+}
+
+kissme_install ()
+{
+ cd "${KISSME_CVS}" && make install >> ${LOG} 2>&1
+ if [ $? -ne 0 ]; then
+ echo "Error during make"
+ exit 1
+ fi
+}
+
+mauve_checkout ()
+{
+ if [ ! -d "${MAUVE_CVS}" ]; then
+ mkdir --parents ${MAUVE_CVS}
+ local dir=`dirname "${MAUVE_CVS}"`
+ cd "${dir}"
+ cvs -z3 -d :pserver:anoncvs@sources.redhat.com:/cvs/mauve co mauve >> ${LOG} 2>/dev/null
+ if [ $? -ne 0 ]; then
+ echo "Error checking out mauve"
+ exit 1
+ fi
+ fi
+}
+
+mauve_update ()
+{
+ cd "${MAUVE_CVS}" && cvs update -d -P . >> ${LOG} 2>/dev/null
+ if [ $? -ne 0 ]; then
+ echo "Error checking out mauve"
+ exit 1
+ fi
+}
+
+kissme_mauve ()
+{
+ export JAVAC="jikes -bootclasspath ${CLASSPATH_PREFIX}/share/classpath/glibj.zip"
+ export JAVA="${KISSME_BIN}"
+
+# if [ -f "${KISSME_CVS}/useful_scripts/mauve-kissme" ]; then
+# cp -f "${KISSME_CVS}/useful_scripts/mauve-kissme" "${MAUVE_CVS}"
+# fi
+
+ if [ -f "${CLASSPATH_CVS}/mauve-classpath" ]; then
+ cp -f "${CLASSPATH_CVS}/mauve-classpath" "${MAUVE_CVS}"
+ fi
+
+ cd "${MAUVE_CVS}"
+ if [ $? -ne 0 ]; then
+ echo "Error configuring mauve"
+ exit 1
+ fi
+
+ _aclocal
+ _automake
+ _autoconf
+
+ ./configure >> "${LOG}" 2>&1
+ if [ $? -ne 0 ]; then
+ echo "Error configuring mauve"
+ exit 1
+ fi
+
+ # create class choices from key file
+ if [ -f classes ]; then
+ rm -f classes 2>/dev/null
+ fi
+ if [ -f choices ]; then
+ rm -f choices 2>/dev/null
+ fi
+ /bin/sh choose "${MAUVE_CVS}" classpath
+ if [ $? -ne 0 ]; then
+ echo "Error during choose for mauve"
+ exit 1
+ fi
+
+ # compile classes
+ compile=`cat "${MAUVE_CVS}/classes" | tr '.' '/' | awk '{print $1".java"}' | xargs`
+ ${JAVAC} -classpath "${MAUVE_CVS}" -d "${MAUVE_CVS}" ${compile} >> "${LOG}" 2>&1
+ if [ $? -ne 0 ]; then
+ echo "Error during compile for mauve"
+ exit 1
+ fi
+
+ set -m
+ for i in `cat "${MAUVE_CVS}/classes"`; do
+ echo "$i" | ${JAVA} gnu.testlet.SimpleTestHarness -verbose >> "${RESULTS}" 2>&1 &
+
+ vm_pid=$!
+ sleep ${TIMEOUT} && kill -9 $vm_pid > /dev/null 2>&1 && echo "FAIL: $i execution aborted" >> "${RESULTS}" &
+ kill_pid=$!
+ fg %- 2>/dev/null
+ kill -9 $kill_pid >/dev/null 2>&1 # && echo Test did not time out
+ done
+}
+
+mauve_summary ()
+{
+ if [ ! -f "${RESULTS}" ]; then
+ echo "Error creating summary"
+ exit 1
+ fi
+
+ pass_cnt=`grep PASS "${RESULTS}" | wc -l`
+ fail_cnt=`grep FAIL "${RESULTS}" | wc -l`
+ total_cnt=`expr $pass_cnt + $fail_cnt`
+
+ today=`date`
+ echo "Mauve test results for Kissme" > "${REPORT}"
+ echo "Report generated on ${today}" >> "${REPORT}"
+ echo "" >> "${REPORT}"
+ echo "${fail_cnt} of ${total_cnt} tests failed." >> "${REPORT}"
+ echo "" >> "${REPORT}"
+ cat "${RESULTS}" >> "${REPORT}"
+}
+
+#--------------------------------------------------------------------
+# Update Classpath CVS
+#--------------------------------------------------------------------
+classpath_checkout
+classpath_update
+
+#--------------------------------------------------------------------
+# Build Classpath with GCJ 3.2
+#--------------------------------------------------------------------
+classpath_clean
+classpath_configure
+classpath_build
+classpath_install
+
+#--------------------------------------------------------------------
+# Update Kissme CVS
+#--------------------------------------------------------------------
+kissme_checkout
+kissme_update
+
+#--------------------------------------------------------------------
+# Build Kissme
+#--------------------------------------------------------------------
+kissme_clean
+kissme_configure
+kissme_build
+#kissme_install
+
+#--------------------------------------------------------------------
+# Update Mauve CVS
+#--------------------------------------------------------------------
+mauve_checkout
+mauve_update
+
+#--------------------------------------------------------------------
+# Execute Mauve
+#--------------------------------------------------------------------
+kissme_mauve
+
+#--------------------------------------------------------------------
+# Create report
+#--------------------------------------------------------------------
+mauve_summary