summaryrefslogtreecommitdiffstats
path: root/debian/tests/junit
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:52:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:52:12 +0000
commit974c21ad33bfa1d93d5ae795556d35ca7eb36e68 (patch)
tree1a0d7c0258aadfcd993c4bffa454bcf117b382cf /debian/tests/junit
parentAdding upstream version 1:7.0.4. (diff)
downloadlibreoffice-debian/1%7.0.4-4+deb11u8.tar.xz
libreoffice-debian/1%7.0.4-4+deb11u8.zip
Adding debian version 1:7.0.4-4+deb11u8.debian/1%7.0.4-4+deb11u8
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/junit')
-rwxr-xr-xdebian/tests/junit62
1 files changed, 62 insertions, 0 deletions
diff --git a/debian/tests/junit b/debian/tests/junit
new file mode 100755
index 000000000..82eda73b6
--- /dev/null
+++ b/debian/tests/junit
@@ -0,0 +1,62 @@
+#!/bin/bash
+# autopkgtest check: Run junit base tests against an installed version of LibreOffice
+# (C) 2013 Canonical Ltd.
+# (c) 2015-2017 Software in the Public Interest, Inc.
+# Authors: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
+# Rene Engelhard <rene@debian.org>
+
+set -e
+set -E
+
+# skip on Zero using architectures
+if java -version 2>&1 | grep -q Zero; then
+ echo "Zero-using architecture. Skipping."
+ exit 77
+fi
+
+SRCDIR=`pwd`
+CHECK_PARALLELISM=1
+if [ -n "$AUTOPKGTEST_TMP" ]; then
+ WORKDIR=`mktemp -q -d -p $AUTOPKGTEST_TMP`
+else
+ WORKDIR=`mktemp -q -d`
+fi
+
+function unapply() {
+ echo
+ echo "====== Unapplying the patch ======"
+ patch -p1 -R < ./debian/tests/patches/java-subsequentcheck-standalone.diff
+}
+
+trap "unapply" ERR
+
+echo
+echo "====== Patching the tree to only build Java-based unittests against an existing installation ======"
+patch -p1 < ./debian/tests/patches/java-subsequentcheck-standalone.diff
+
+echo
+echo "====== Generating configuration ======="
+rm -f config_host.mk
+./debian/rules config_host.mk enable_report_builder=no
+sed -i 's/export OOO_JUNIT_JAR=.*/export OOO_JUNIT_JAR=\/usr\/share\/java\/junit4.jar/' config_host.mk
+
+echo
+echo "====== Enabling core dumps ======"
+# yes, we want core dumps and stack traces
+ulimit -c unlimited
+
+OOO_TEST_SOFFICE="${1:-path:/usr/lib/libreoffice/program/soffice}"
+
+echo
+echo "====== Starting subsequentcheck with ${CHECK_PARALLELISM} job against ${OOO_TEST_SOFFICE} ======"
+
+eval `grep PLATFORMID config_host.mk`
+
+export PARALLELISM=$CHECK_PARALLELISM
+make -rk \
+ OOO_TEST_SOFFICE=${OOO_TEST_SOFFICE} \
+ bridges_SELECTED_BRIDGE=gcc3_$PLATFORMID \
+ subsequentcheck verbose=t
+
+unapply
+