summaryrefslogtreecommitdiffstats
path: root/debian/tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:07:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:07:31 +0000
commitedaebb65d92a48d7075c8c1f64c5ffd87054827b (patch)
tree045c941e1851cde1665bea22d97a2976b7a5bb69 /debian/tests
parentAdding upstream version 4:7.4.7. (diff)
downloadlibreoffice-edaebb65d92a48d7075c8c1f64c5ffd87054827b.tar.xz
libreoffice-edaebb65d92a48d7075c8c1f64c5ffd87054827b.zip
Adding debian version 4:7.4.7-1+deb12u1.debian/4%7.4.7-1+deb12u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests')
-rwxr-xr-xdebian/tests/access2base-import4
-rw-r--r--debian/tests/control127
-rw-r--r--debian/tests/control.in127
-rwxr-xr-xdebian/tests/cppunit-connectivity-mysql121
-rwxr-xr-xdebian/tests/cppunit-subsequentcheck183
-rwxr-xr-xdebian/tests/junit-subsequentcheck64
-rwxr-xr-xdebian/tests/odk-build-examples50
-rwxr-xr-xdebian/tests/odk-build-examples-java56
-rw-r--r--debian/tests/patches/cppunit-standalone.diff15
-rw-r--r--debian/tests/patches/disable-db-tests.diff130
-rw-r--r--debian/tests/patches/junit-subsequentcheck-standalone.diff139
-rw-r--r--debian/tests/patches/odk-build-examples-standalone.diff50
-rw-r--r--debian/tests/patches/smoketest-disable-extension-tests.diff98
-rw-r--r--debian/tests/patches/smoketest-standalone.diff17
-rw-r--r--debian/tests/patches/testtools-standalone.diff227
-rw-r--r--debian/tests/patches/uicheck-standalone.diff69
-rwxr-xr-xdebian/tests/pyuno-import8
-rwxr-xr-xdebian/tests/slowcheck60
-rwxr-xr-xdebian/tests/smoketest56
-rwxr-xr-xdebian/tests/test-extension40
-rwxr-xr-xdebian/tests/test-extension-shared34
-rwxr-xr-xdebian/tests/testtools-bridgetest57
-rwxr-xr-xdebian/tests/uicheck-cui63
-rwxr-xr-xdebian/tests/uicheck-sc63
-rwxr-xr-xdebian/tests/uicheck-sd63
-rwxr-xr-xdebian/tests/uicheck-sfx263
-rwxr-xr-xdebian/tests/uicheck-svx63
-rwxr-xr-xdebian/tests/uicheck-sw63
-rwxr-xr-xdebian/tests/uicheck-uitest63
-rwxr-xr-xdebian/tests/uicheck-writerperfect63
-rwxr-xr-xdebian/tests/unitcheck72
-rwxr-xr-xdebian/tests/uno-import4
32 files changed, 2312 insertions, 0 deletions
diff --git a/debian/tests/access2base-import b/debian/tests/access2base-import
new file mode 100755
index 000000000..4065aefaf
--- /dev/null
+++ b/debian/tests/access2base-import
@@ -0,0 +1,4 @@
+#!/usr/bin/python3
+
+import access2base
+print(access2base)
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 000000000..ed46ce182
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,127 @@
+Tests: testtools-bridgetest
+Depends: @builddeps@, ure
+Restrictions: allow-stderr, rw-build-tree, superficial
+
+Tests: pyuno-import, uno-import
+Depends: python3, python3-uno
+Restrictions: superficial
+
+Tests: access2base-import
+Depends: python3, python3-access2base
+Restrictions: superficial
+
+## Is there a need for this small test given we run the UI tests etc.?
+#Tests: smoketest
+#Architecture: amd64 arm64
+#Depends: @builddeps@, libreoffice-smoketest-data, libreoffice-dev, libreoffice-core, libreoffice-writer, libreoffice-calc, libreoffice-impress, libreoffice-math, libreoffice-base, libreoffice-sdbc-hsqldb, libreoffice-sdbc-firebird
+#Restrictions: allow-stderr, build-needed, rw-build-tree, superficial
+
+# this is already done by smoketest upstream, but fails when doing it against
+# the installed LO. works standalone, though, so it's patched out of the
+# smoketest. Do it here separately.
+Tests: test-extension
+Architecture: amd64 arm64 armhf i386 ppc64 ppc64el s390x
+Depends: libreoffice-core-nogui, libreoffice-common, libreoffice-java-common, libreoffice-smoketest-data, default-jdk
+Restrictions: allow-stderr, superficial, skippable
+
+Tests: test-extension-shared
+Architecture: amd64 arm64 armhf i386 ppc64 ppc64el s390x
+Depends: libreoffice-core-nogui, libreoffice-common, libreoffice-java-common, libreoffice-smoketest-data, default-jdk
+Restrictions: allow-stderr, needs-root, superficial
+
+# in the following some tests need RTL and CJK language packs installed to pass.
+# he is the example for RTL, zh-tw for CJK (and zh-tw was choosen to also test xx-YY locales)
+
+# Maybe all those tests should be merged into one (especially for the "small" ones like writerperfect or
+# "tiny" ones like sfx2,svx,cui.
+# But it already takes ~1.5 h (though including copy..) for all them to run on amd64 and the overall autopkgtest
+# test timeout is 166 min (a bit over 2.5 hrs.). What are we doing on slow archs?
+# And secondly. one might miss breakage if Java or another package is not installed but is
+# required because everything needed would be in Depends: then for one test...
+# Try to optimize a bit though by not sorting alphabetically but where the new packages are a superset so
+# we can reuse the testbed
+
+Tests: uicheck-sfx2
+Depends: @builddeps@, libreoffice-core, libreoffice-impress, python3-uno
+Restrictions: allow-stderr
+
+Tests: uicheck-svx
+Depends: @builddeps@, libreoffice-core, libreoffice-impress, python3-uno
+Restrictions: allow-stderr
+
+Tests: uicheck-cui
+Depends: @builddeps@, libreoffice-core, libreoffice-impress, libreoffice-writer, python3-uno
+Restrictions: allow-stderr
+
+Tests: uicheck-sd
+Depends: @builddeps@, libreoffice-core, libreoffice-draw, libreoffice-impress, libreoffice-calc, python3-uno
+Restrictions: allow-stderr
+
+Tests: uicheck-writerperfect
+Depends: @builddeps@, libreoffice-core, libreoffice-writer, python3-uno
+Restrictions: allow-stderr
+
+Tests: uicheck-sc
+Architecture: alpha amd64 arm64 armel armhf i386 ia64 m68k mipsel mips64el powerpc ppc64 ppc64el s390x sparc64 mips
+Depends: @builddeps@, libreoffice-core, libreoffice-calc, libreoffice-draw, python3-uno, libreoffice-l10n-he, libreoffice-l10n-zh-tw, libreoffice-java-common, libreoffice-writer
+Restrictions: allow-stderr
+
+Tests: uicheck-sw
+Architecture: alpha amd64 arm64 armel armhf i386 ia64 m68k mipsel mips64el powerpc ppc64 ppc64el s390x sparc64 mips
+Depends: @builddeps@, libreoffice-core, libreoffice-writer, libreoffice-draw, libreoffice-calc, libreoffice-base, python3-uno, libreoffice-l10n-he, libreoffice-l10n-zh-tw, libreoffice-librelogo, libreoffice-java-common
+Restrictions: allow-stderr, needs-internet
+
+Tests: uicheck-uitest
+Depends: @builddeps@, libreoffice-core, libreoffice-writer, libreoffice-calc, libreoffice-impress, libreoffice-math, libreoffice-base, python3-uno, libreoffice-l10n-he, libreoffice-l10n-zh-tw
+Restrictions: allow-stderr
+
+Tests: junit-subsequentcheck
+Architecture: amd64 arm64
+Depends: @builddeps@, libreoffice-core, libreoffice-writer, libreoffice-calc, libreoffice-impress, libreoffice-math, libreoffice-base, libreoffice-subsequentcheckbase, libreoffice-sdbc-hsqldb, libreoffice-sdbc-firebird
+Restrictions: allow-stderr, skippable
+
+Test-Command: export SYSTEM_UCPP=TRUE; export DOXYGEN=`command -v doxygen`; export ENABLE_JAVA=TRUE; export JDK=sun; export JAVADOC=/usr/lib/jvm/default-java/bin/javadoc; perl odk/util/check.pl /usr/lib/libreoffice/sdk
+Features: test-name=sdk-complete
+Depends: libreoffice-dev, libreoffice-dev-doc
+Restrictions: superficial
+
+Tests: odk-build-examples
+Architecture: amd64 arm64 armhf i386 ppc64 ppc64el s390x
+Depends: @builddeps@, libreoffice-core-nogui, libreoffice-dev, libreoffice-dev-doc, python3-uno
+Restrictions: allow-stderr, skippable
+
+Tests: odk-build-examples-java
+Architecture: amd64 arm64 armhf i386 ppc64 ppc64el s390x
+Depends: @builddeps@, libreoffice-core-nogui, libreoffice-dev, libreoffice-dev-doc, libreoffice-java-common, libofficebean-java
+Restrictions: allow-stderr, skippable
+
+#Tests: cppunit-subsequentcheck
+#Architecture: amd64 arm64
+#Depends: @builddeps@, libreoffice,libreoffice-core,libreoffice-common,libreoffice-java-common,libreoffice-writer,libreoffice-calc,libreoffice-impress,libreoffice-draw,libreoffice-math,libreoffice-base-core,libreoffice-base,libreoffice-style-breeze,libreoffice-style-colibre,libreoffice-style-sifr,libreoffice-style-elementary,libreoffice-style-karasa-jaga,libreoffice-style-sukapura,libreoffice-gnome,python3-uno,libreoffice-script-provider-python,libreoffice-script-provider-bsh,libreoffice-script-provider-js,libreoffice-sdbc-hsqldb,libreoffice-sdbc-mysql,libreoffice-base-drivers,python3-access2base,libofficebean-java,uno-libs-private,libuno-sal3,libuno-cppu3,ure,ure-java,libunoloader-java,liblibreoffice-java,libreoffice-wiki-publisher,libreoffice-report-builder,libreoffice-report-builder-bin,libreoffice-nlpsolver,fonts-opensymbol,libreoffice-dev,libreoffice-dev-gui,libreoffice-dev-common,libreofficekit-dev,libreoffice-gtk3,gir1.2-lokdocview-0.1,liblibreofficekitgtk,libreofficekit-data,libreoffice-kf5,libreoffice-qt5,libreoffice-plasma,libreoffice-sdbc-postgresql,libreoffice-evolution,libreoffice-subsequentcheckbase,libreoffice-smoketest-data,libreoffice-librelogo,libreoffice-sdbc-firebird
+#Restrictions: build-needed, rw-build-tree, allow-stderr
+#
+## Those tests even work when there is no /usr/lib/libreoffice there in any way. @builddeps@ is enough.
+## That strictly violates the autopkgtest stuff thus mark them as superficial. But if a library
+## or whatever update broke it we should know
+#Tests: slowcheck
+#Architecture: amd64 arm64
+##Depends: @builddeps@, libreoffice,libreoffice-core,libreoffice-common,libreoffice-java-common,libreoffice-writer,libreoffice-calc,libreoffice-impress,libreoffice-draw,libreoffice-math,libreoffice-base-core,libreoffice-base,libreoffice-style-breeze,libreoffice-style-colibre,libreoffice-style-sifr,libreoffice-style-elementary,libreoffice-style-karasa-jaga,libreoffice-style-sukapura,libreoffice-gnome,python3-uno,libreoffice-script-provider-python,libreoffice-script-provider-bsh,libreoffice-script-provider-js,libreoffice-sdbc-hsqldb,libreoffice-sdbc-mysql,libreoffice-base-drivers,python3-access2base,libofficebean-java,uno-libs-private,libuno-sal3,libuno-cppu3,ure,ure-java,libunoloader-java,liblibreoffice-java,libreoffice-wiki-publisher,libreoffice-report-builder,libreoffice-report-builder-bin,libreoffice-nlpsolver,fonts-opensymbol,libreoffice-dev,libreoffice-dev-gui,libreoffice-dev-common,libreofficekit-dev,libreoffice-gtk3,gir1.2-lokdocview-0.1,liblibreofficekitgtk,libreofficekit-data,libreoffice-kf5,libreoffice-qt5,libreoffice-plasma,libreoffice-sdbc-postgresql,libreoffice-evolution,libreoffice-subsequentcheckbase,libreoffice-smoketest-data,libreoffice-librelogo,libreoffice-sdbc-firebird
+#Restrictions: build-needed, rw-build-tree, allow-stderr, superficial
+#
+#Tests: unitcheck
+#Architecture: amd64 arm64
+#Depends: @builddeps@, libreoffice,libreoffice-core,libreoffice-common,libreoffice-java-common,libreoffice-writer,libreoffice-calc,libreoffice-impress,libreoffice-draw,libreoffice-math,libreoffice-base-core,libreoffice-base,libreoffice-style-breeze,libreoffice-style-colibre,libreoffice-style-sifr,libreoffice-style-elementary,libreoffice-style-karasa-jaga,libreoffice-style-sukapura,libreoffice-gnome,python3-uno,libreoffice-script-provider-python,libreoffice-script-provider-bsh,libreoffice-script-provider-js,libreoffice-sdbc-hsqldb,libreoffice-sdbc-mysql,libreoffice-base-drivers,python3-access2base,libofficebean-java,uno-libs-private,libuno-sal3,libuno-cppu3,ure,ure-java,libunoloader-java,liblibreoffice-java,libreoffice-wiki-publisher,libreoffice-report-builder,libreoffice-report-builder-bin,libreoffice-nlpsolver,fonts-opensymbol,libreoffice-dev,libreoffice-dev-gui,libreoffice-dev-common,libreofficekit-dev,libreoffice-gtk3,gir1.2-lokdocview-0.1,liblibreofficekitgtk,libreofficekit-data,libreoffice-kf5,libreoffice-qt5,libreoffice-plasma,libreoffice-sdbc-postgresql,libreoffice-evolution,libreoffice-subsequentcheckbase,libreoffice-smoketest-data,libreoffice-librelogo,libreoffice-sdbc-firebird
+#Restrictions: build-needed, rw-build-tree, allow-stderr, superficial, skippable
+
+Test-Command: for i in /etc/apparmor.d/usr.lib.libreoffice.program.*; do /sbin/apparmor_parser --add --skip-cache --skip-kernel-load $i; done
+Features: test-name=apparmor-profiles-syntax-check
+Depends: libreoffice-common, apparmor
+Restrictions: allow-stderr, superficial
+
+## This one tests real connection to a MySQL and works by symlinking that one
+## specific library to the one in libreoffice-sdbc-mysql
+## Should probably always be last due to breaks-testbed?
+#Tests: cppunit-connectivity-mysql
+#Architecture: amd64 arm64
+#Depends: @builddeps@, pwgen, libreoffice-sdbc-mysql, libreoffice-core, default-mysql-server, default-mysql-client
+#Restrictions: build-needed, allow-stderr, needs-root, isolation-container, breaks-testbed, superficial
diff --git a/debian/tests/control.in b/debian/tests/control.in
new file mode 100644
index 000000000..18e191bd0
--- /dev/null
+++ b/debian/tests/control.in
@@ -0,0 +1,127 @@
+Tests: testtools-bridgetest
+Depends: @builddeps@, ure
+Restrictions: allow-stderr, rw-build-tree, superficial
+
+Tests: pyuno-import, uno-import
+Depends: python3, python3-uno
+Restrictions: superficial
+
+Tests: access2base-import
+Depends: python3, python3-access2base
+Restrictions: superficial
+
+## Is there a need for this small test given we run the UI tests etc.?
+#Tests: smoketest
+#Architecture: %OOO_CHECK_FATAL_ARCHS%
+#Depends: @builddeps@, libreoffice-smoketest-data, libreoffice-dev, libreoffice-core, libreoffice-writer, libreoffice-calc, libreoffice-impress, libreoffice-math, libreoffice-base, libreoffice-sdbc-hsqldb, libreoffice-sdbc-firebird
+#Restrictions: allow-stderr, build-needed, rw-build-tree, superficial
+
+# this is already done by smoketest upstream, but fails when doing it against
+# the installed LO. works standalone, though, so it's patched out of the
+# smoketest. Do it here separately.
+Tests: test-extension
+Architecture: %OOO_NOGUI_ARCHS%
+Depends: libreoffice-core-nogui, libreoffice-common, libreoffice-java-common, libreoffice-smoketest-data, default-jdk
+Restrictions: allow-stderr, superficial, skippable
+
+Tests: test-extension-shared
+Architecture: %OOO_NOGUI_ARCHS%
+Depends: libreoffice-core-nogui, libreoffice-common, libreoffice-java-common, libreoffice-smoketest-data, default-jdk
+Restrictions: allow-stderr, needs-root, superficial
+
+# in the following some tests need RTL and CJK language packs installed to pass.
+# he is the example for RTL, zh-tw for CJK (and zh-tw was choosen to also test xx-YY locales)
+
+# Maybe all those tests should be merged into one (especially for the "small" ones like writerperfect or
+# "tiny" ones like sfx2,svx,cui.
+# But it already takes ~1.5 h (though including copy..) for all them to run on amd64 and the overall autopkgtest
+# test timeout is 166 min (a bit over 2.5 hrs.). What are we doing on slow archs?
+# And secondly. one might miss breakage if Java or another package is not installed but is
+# required because everything needed would be in Depends: then for one test...
+# Try to optimize a bit though by not sorting alphabetically but where the new packages are a superset so
+# we can reuse the testbed
+
+Tests: uicheck-sfx2
+Depends: @builddeps@, libreoffice-core, libreoffice-impress, python3-uno
+Restrictions: allow-stderr
+
+Tests: uicheck-svx
+Depends: @builddeps@, libreoffice-core, libreoffice-impress, python3-uno
+Restrictions: allow-stderr
+
+Tests: uicheck-cui
+Depends: @builddeps@, libreoffice-core, libreoffice-impress, libreoffice-writer, python3-uno
+Restrictions: allow-stderr
+
+Tests: uicheck-sd
+Depends: @builddeps@, libreoffice-core, libreoffice-draw, libreoffice-impress, libreoffice-calc, python3-uno
+Restrictions: allow-stderr
+
+Tests: uicheck-writerperfect
+Depends: @builddeps@, libreoffice-core, libreoffice-writer, python3-uno
+Restrictions: allow-stderr
+
+Tests: uicheck-sc
+Architecture: %OOO_JAVA_ARCHS%
+Depends: @builddeps@, libreoffice-core, libreoffice-calc, libreoffice-draw, python3-uno, libreoffice-l10n-he, libreoffice-l10n-zh-tw, libreoffice-java-common, libreoffice-writer
+Restrictions: allow-stderr
+
+Tests: uicheck-sw
+Architecture: %OOO_JAVA_ARCHS%
+Depends: @builddeps@, libreoffice-core, libreoffice-writer, libreoffice-draw, libreoffice-calc, libreoffice-base, python3-uno, libreoffice-l10n-he, libreoffice-l10n-zh-tw, libreoffice-librelogo, libreoffice-java-common
+Restrictions: allow-stderr, needs-internet
+
+Tests: uicheck-uitest
+Depends: @builddeps@, libreoffice-core, libreoffice-writer, libreoffice-calc, libreoffice-impress, libreoffice-math, libreoffice-base, python3-uno, libreoffice-l10n-he, libreoffice-l10n-zh-tw
+Restrictions: allow-stderr
+
+Tests: junit-subsequentcheck
+Architecture: %OOO_JUNIT_ARCHS%
+Depends: @builddeps@, libreoffice-core, libreoffice-writer, libreoffice-calc, libreoffice-impress, libreoffice-math, libreoffice-base, libreoffice-subsequentcheckbase, libreoffice-sdbc-hsqldb, libreoffice-sdbc-firebird
+Restrictions: allow-stderr, skippable
+
+Test-Command: export SYSTEM_UCPP=TRUE; export DOXYGEN=`command -v doxygen`; export ENABLE_JAVA=TRUE; export JDK=sun; export JAVADOC=/usr/lib/jvm/default-java/bin/javadoc; perl odk/util/check.pl /usr/lib/libreoffice/sdk
+Features: test-name=sdk-complete
+Depends: libreoffice-dev, libreoffice-dev-doc
+Restrictions: superficial
+
+Tests: odk-build-examples
+Architecture: %OOO_NOGUI_ARCHS%
+Depends: @builddeps@, libreoffice-core-nogui, libreoffice-dev, libreoffice-dev-doc, python3-uno
+Restrictions: allow-stderr, skippable
+
+Tests: odk-build-examples-java
+Architecture: %OOO_NOGUI_ARCHS%
+Depends: @builddeps@, libreoffice-core-nogui, libreoffice-dev, libreoffice-dev-doc, libreoffice-java-common, libofficebean-java
+Restrictions: allow-stderr, skippable
+
+#Tests: cppunit-subsequentcheck
+#Architecture: %OOO_CHECK_FATAL_ARCHS%
+#Depends: @builddeps@, %AUTOPKGTEST_CPPUNIT_PACKAGES%
+#Restrictions: build-needed, rw-build-tree, allow-stderr
+#
+## Those tests even work when there is no /usr/lib/libreoffice there in any way. @builddeps@ is enough.
+## That strictly violates the autopkgtest stuff thus mark them as superficial. But if a library
+## or whatever update broke it we should know
+#Tests: slowcheck
+#Architecture: %OOO_CHECK_FATAL_ARCHS%
+##Depends: @builddeps@, %AUTOPKGTEST_CPPUNIT_PACKAGES%
+#Restrictions: build-needed, rw-build-tree, allow-stderr, superficial
+#
+#Tests: unitcheck
+#Architecture: %OOO_CHECK_FATAL_ARCHS%
+#Depends: @builddeps@, %AUTOPKGTEST_CPPUNIT_PACKAGES%
+#Restrictions: build-needed, rw-build-tree, allow-stderr, superficial, skippable
+
+Test-Command: for i in /etc/apparmor.d/usr.lib.libreoffice.program.*; do /sbin/apparmor_parser --add --skip-cache --skip-kernel-load $i; done
+Features: test-name=apparmor-profiles-syntax-check
+Depends: libreoffice-common, apparmor
+Restrictions: allow-stderr, superficial
+
+## This one tests real connection to a MySQL and works by symlinking that one
+## specific library to the one in libreoffice-sdbc-mysql
+## Should probably always be last due to breaks-testbed?
+#Tests: cppunit-connectivity-mysql
+#Architecture: %OOO_CHECK_FATAL_ARCHS%
+#Depends: @builddeps@, pwgen, libreoffice-sdbc-mysql, libreoffice-core, default-mysql-server, default-mysql-client
+#Restrictions: build-needed, allow-stderr, needs-root, isolation-container, breaks-testbed, superficial
diff --git a/debian/tests/cppunit-connectivity-mysql b/debian/tests/cppunit-connectivity-mysql
new file mode 100755
index 000000000..ba77d8879
--- /dev/null
+++ b/debian/tests/cppunit-connectivity-mysql
@@ -0,0 +1,121 @@
+#!/bin/bash
+
+# autopkgtest check: Run the connectivity "mysql" test
+# and prepare the db needed beforehand
+# (c) 2021 Software in the Public Interest, Inc.
+# Authors: Rene Engelhard <rene@debian.org>
+
+SRCDIR=`pwd`
+CHECK_PARALLELISM=1
+if [ -n "$AUTOPKGTEST_TMP" ]; then
+ WORKDIR=`mktemp -q -d -p $AUTOPKGTEST_TMP`
+else
+ WORKDIR=`mktemp -q -d`
+fi
+
+if [ -x /usr/bin/mariadbd-safe ]; then
+ db=mariadb
+ db_safe_command=mariadbd-safe
+ db_rundir=/run/mysqld
+else
+ db=mysql
+ db_safe_command=mysqld_safe
+ db_rundir=/var/run/mysqld
+fi
+db_user=root
+db_pw=`pwgen -1`
+db_name=test
+db_host=localhost
+db_port=3306
+db_conn_string="$db_user/$db_pw@sdbc:mysql:mysqlc:$db_host:$db_port/$db_name"
+
+trap "cleanup" ERR
+
+function cleanup() {
+ stop_db
+}
+
+function stop_db() {
+ service $db stop || true
+ # in case we are trying in a chroot without running autopkgtest for "quick" testing
+ if ischroot && test -f $db_rundir/mysqld.pid; then
+ kill `cat $db_rundir/mysqld.pid`
+ fi
+}
+
+echo
+echo "====== Enabling core dumps ======"
+# yes, we want core dumps and stack traces
+ulimit -c unlimited || true
+
+echo "====== Resetting $db_user password ======"
+$db_safe_command --skip-grant-tables &
+sleep 5 # wait for startup
+if test "$db" = "mariadb"; then
+ echo "FLUSH PRIVILEGES; SET PASSWORD FOR '$db_user'@'localhost' = PASSWORD('$db_pw');" | \
+ $db -v -u $db_user mysql
+else
+ echo "SET PASSWORD FOR '$db_user'@'localhost' = '$db_pw'; FLUSH PRIVILEGES;" | \
+ $db -v -u $db_user mysql
+fi
+
+stop_db
+
+service $db start
+
+set -e
+
+echo
+echo "====== Creating database "test" ======"
+echo "DROP DATABASE IF EXISTS $db_name; CREATE DATABASE $db_name;" | \
+ $db -v -u $db_user mysql
+
+# ensure we use the version from the package
+echo
+echo "====== Symlinking libraries... ======"
+#rene@frodo:~/LibreOffice/git/master$ objdump -p instdir/program/libmysqlclo.so | grep NEED
+# NEEDED libmariadb.so.3
+# NEEDED libuno_cppu.so.3
+# NEEDED libdbtoolslo.so
+# NEEDED libuno_sal.so.3
+# NEEDED libuno_salhelpergcc3.so.3
+# NEEDED libcomphelper.so
+# NEEDED libuno_cppuhelpergcc3.so.3
+# NEEDED libstdc++.so.6
+# NEEDED libm.so.6
+# NEEDED libgcc_s.so.1
+# NEEDED libpthread.so.0
+# NEEDED libc.so.6
+# VERNEED 0x0000000000004b28
+# VERNEEDNUM 0x0000000000000007
+cd $SRCDIR/instdir/program
+LIBS="libuno_cppu.so.3 libuno_sal.so.3 libuno_salhelpergcc3.so.3 libuno_cppuhelpergcc3.so.3 libmysqlclo.so"
+# FIXME: libdbtoolslo.so and libcomphelper.so are in libmerged.so with enable-mergelibs, thus do not
+# exist on 64bit...
+# Maybe until then this test shall only be run on 32bit?
+if [ "`dpkg-architecture -qDEB_HOST_ARCH_BITS`" = "32" ]; then
+ LIBS="$LIBS libdbtoolslo.so libcomphelper.so"
+ # done below
+else
+ LIBS="$LIBS libmergedlo.so"
+ ln -svf /usr/lib/libreoffice/program/libmergedlo.so libdbtoolslo.so
+ # DOESN'T WORK, CAUSES LINK ERROR
+ #ln -svf /usr/lib/libreoffice/program/libmergedlo.so libcomphelper.so
+fi
+for i in $LIBS; do \
+ ln -svf /usr/lib/libreoffice/program/$i; \
+done
+
+echo
+echo "====== Starting MySQL Test with ${CHECK_PARALLELISM} job ======"
+cd $SRCDIR/connectivity && \
+make -rj$CHECK_PARALLELISM CppunitTest_connectivity_mysql_test \
+ CONNECTIVITY_TEST_MYSQL_DRIVER="$db_conn_string" \
+ verbose=t || exit 1
+
+echo
+echo "====== Dropping database "test" ======"
+echo "DROP DATABASE test;" | \
+ $db -v -u $db_user mysql
+
+cleanup
diff --git a/debian/tests/cppunit-subsequentcheck b/debian/tests/cppunit-subsequentcheck
new file mode 100755
index 000000000..d0cc94aa7
--- /dev/null
+++ b/debian/tests/cppunit-subsequentcheck
@@ -0,0 +1,183 @@
+#!/bin/bash
+# autopkgtest check: Run junit base tests against an installed version of LibreOffice
+# (c) 2021 Software in the Public Interest, Inc.
+# Authors: Rene Engelhard <rene@debian.org>
+
+set -e
+set -E
+
+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() {
+ cd $SRCDIR
+ echo
+ echo "====== Unapplying the patches ======"
+ patch -p1 -R < ./debian/tests/patches/cppunit-standalone.diff
+}
+
+trap "unapply" ERR
+
+echo
+echo "====== Patching the tree to only build the unittests against an existing installation ======"
+patch -p1 < ./debian/tests/patches/cppunit-standalone.diff
+
+echo
+echo "====== Enabling core dumps ======"
+# yes, we want core dumps and stack traces
+ulimit -c unlimited || true
+
+echo
+echo "====== Starting subsequentcheck with ${CHECK_PARALLELISM} job ======"
+
+# hack, otherwise it fails
+mkdir -p $SRCDIR/instdir/program/.dir
+mkdir -p $SRCDIR/instdir/program/services/.dir
+
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/simpress/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/simpress/popupmenu/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/simpress/statusbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/simpress/toolbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/simpress/ui/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/simpress/menubar/.dir
+
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/schart/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/schart/popupmenu/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/schart/statusbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/schart/toolbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/schart/ui/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/schart/menubar/.dir
+
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/dbaccess/ui/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/dbapp/popupmenu/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/dbapp/statusbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/dbapp/toolbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/dbapp/menubar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/dbbrowser/popupmenu/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/dbbrowser/toolbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/dbbrowser/menubar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/dbquery/toolbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/dbquery/menubar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/dbrelation/toolbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/dbrelation/menubar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/dbtable/toolbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/dbtable/menubar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/dbtdata/popupmenu/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/dbtdata/toolbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/dbtdata/menubar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/sabpilot/ui/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/sbibliography/ui/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/sbibliography/menubar/.dir
+
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/scanner/ui/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/spropctrlr/ui/.dir
+
+mkdir -p $SRCDIR/instdir/share/dtd/officedocument/1_0/.dir
+
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/StartModule/menubar/.dir
+
+mkdir -p $SRCDIR/instdir/program/opencl/.dir
+
+mkdir -p $SRCDIR/instdir/share/calc/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/scalc/popupmenu/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/scalc/statusbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/scalc/toolbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/scalc/ui/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/scalc/menubar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/simpress/.dir
+
+mkdir -p $SRCDIR/instdir/share/config/webcast/.dir
+mkdir -p $SRCDIR/instdir/share/config/wizard/web/buttons/.dir
+
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/sdraw/popupmenu/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/sdraw/statusbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/sdraw/toolbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/sdraw/ui/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/sdraw/menubar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/simpress/popupmenu/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/simpress/statusbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/simpress/toolbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/simpress/ui/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/simpress/menubar/.dir
+
+mkdir -p $SRCDIR/instdir/share/classification/.dir
+
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/sfx/ui/.dir
+
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/smath/popupmenu/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/smath/statusbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/smath/toolbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/smath/ui/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/smath/menubar/.dir
+
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/svt/ui/.dir
+
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/svx/ui/.dir
+
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/sglobal/popupmenu/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/sglobal/statusbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/sglobal/toolbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/sglobal/menubar/.dir
+
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/sweb/popupmenu/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/sweb/statusbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/sweb/toolbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/sweb/menubar/.dir
+
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/swform/popupmenu/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/swform/statusbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/swform/toolbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/swform/menubar/.dir
+
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/swreport/popupmenu/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/swreport/statusbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/swreport/toolbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/swreport/menubar/.dir
+
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/swriter/popupmenu/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/swriter/statusbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/swriter/toolbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/swriter/ui/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/swriter/menubar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/swxform/popupmenu/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/swxform/statusbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/swxform/toolbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/swxform/menubar/.dir
+
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/xmlsec/ui/.dir
+
+mkdir -p $SRCDIR/instdir/share/registry/.dir
+mkdir -p $SRCDIR/instdir/share/registry/res/.dir
+
+mkdir -p $SRCDIR/instdir/share/emojiconfig/.dir
+
+cd $SRCDIR/instdir/program/resource && \
+ for i in `ls -1 | grep -v common`; do touch $i/LC_MESSAGES/.dir; done
+
+cd $SRCDIR
+
+# all modules containing subsequent(test|check).
+# Filter out:
+# - odk: already tested by odk-build-examples and odk/util/check.pl
+# - the junit tests - which are ran in an own test - by setting OOO_JUNIT_JAR to nothing (as --without-junit would do)
+# - solenv: no need to test gbuild2json...
+# - smoketest: done in the smoketest test
+export PARALLELISM=$CHECK_PARALLELISM
+for i in `grep subsequent */*.mk | cut -d"/" -f1 | grep -E -v '(odk|smoketest|solenv)' | sort | uniq | xargs`; do
+ echo
+ echo "====== Running subsequentcheck in module $i ======"; \
+ cd $i && \
+ make -rk subsequentcheck \
+ OOO_JUNIT_JAR= \
+ INSTDIR=/usr/lib/libreoffice \
+ verbose=t; \
+ cd ..;\
+done
+
+unapply
+
diff --git a/debian/tests/junit-subsequentcheck b/debian/tests/junit-subsequentcheck
new file mode 100755
index 000000000..2829f3c0c
--- /dev/null
+++ b/debian/tests/junit-subsequentcheck
@@ -0,0 +1,64 @@
+#!/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/junit-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/junit-subsequentcheck-standalone.diff
+
+if [ ! -f config_host.mk ]; then
+ 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
+fi
+
+echo
+echo "====== Enabling core dumps ======"
+# yes, we want core dumps and stack traces
+ulimit -c unlimited || true
+
+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
+
diff --git a/debian/tests/odk-build-examples b/debian/tests/odk-build-examples
new file mode 100755
index 000000000..6a8e52296
--- /dev/null
+++ b/debian/tests/odk-build-examples
@@ -0,0 +1,50 @@
+#!/bin/bash
+# autopkgtest check: Run the odk/build-examples check against an installed
+# version of the LibreOffice SDK
+# (c) 2017 Software in the Public Interest, Inc.
+# Authors: Rene Engelhard <rene@debian.org>
+
+set -e
+set -E
+
+SRCDIR=`pwd`
+CHECK_PARALLELISM=1
+
+function unapply() {
+ cd $SRCDIR
+ echo
+ echo "====== Unapplying the patch ======"
+ patch -p1 -R < ./debian/tests/patches/odk-build-examples-standalone.diff
+}
+
+trap "unapply" ERR
+
+# skip if building as root:
+# unopkg errors out with "ERROR: Cannot run unopkg as root without --shared or --bundled option."
+# if ran as root
+if [ `id -u` = "0" ]; then
+ exit 77
+fi
+
+echo
+echo "====== Patching the tree to build the odk build-examples test against an existing installation ======"
+patch -p1 < ./debian/tests/patches/odk-build-examples-standalone.diff
+
+if [ ! -f config_host.mk ]; then
+ echo
+ echo "====== Generating configuration ======="
+ rm -f config_host.mk
+ ./debian/rules config_host.mk
+fi
+
+echo
+echo "====== Starting build with ${CHECK_PARALLELISM} job against /usr/lib/libreoffice/sdk ======"
+
+cd $SRCDIR/odk
+
+export PARALLELISM=$CHECK_PARALLELISM
+make -rk \
+ CustomTarget_odk/build-examples verbose=t
+
+unapply
+
diff --git a/debian/tests/odk-build-examples-java b/debian/tests/odk-build-examples-java
new file mode 100755
index 000000000..95d00d571
--- /dev/null
+++ b/debian/tests/odk-build-examples-java
@@ -0,0 +1,56 @@
+#!/bin/bash
+# autopkgtest check: Run the odk/build-examples check against an installed
+# version of the LibreOffice SDK
+# (c) 2017 Software in the Public Interest, Inc.
+# Authors: 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
+
+function unapply() {
+ cd $SRCDIR
+ echo
+ echo "====== Unapplying the patch ======"
+ patch -p1 -R < ./debian/tests/patches/odk-build-examples-standalone.diff
+}
+
+trap "unapply" ERR
+
+# skip if building as root:
+# unopkg errors out with "ERROR: Cannot run unopkg as root without --shared or --bundled option."
+# if ran as root
+if [ `id -u` = "0" ]; then
+ exit 77
+fi
+
+echo
+echo "====== Patching the tree to build the odk build-examples test against an existing installation ======"
+patch -p1 < ./debian/tests/patches/odk-build-examples-standalone.diff
+
+if [ ! -f config_host.mk ]; then
+ echo
+ echo "====== Generating configuration ======="
+ rm -f config_host.mk
+ ./debian/rules config_host.mk
+fi
+
+echo
+echo "====== Starting build with ${CHECK_PARALLELISM} job against /usr/lib/libreoffice/sdk ======"
+
+cd $SRCDIR/odk
+
+export PARALLELISM=$CHECK_PARALLELISM
+make -rk \
+ CustomTarget_odk/build-examples_java verbose=t
+
+unapply
+
diff --git a/debian/tests/patches/cppunit-standalone.diff b/debian/tests/patches/cppunit-standalone.diff
new file mode 100644
index 000000000..267b10423
--- /dev/null
+++ b/debian/tests/patches/cppunit-standalone.diff
@@ -0,0 +1,15 @@
+diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
+index 0d87ccc55379..41c6564d3d7e 100644
+--- a/solenv/gbuild/Module.mk
++++ b/solenv/gbuild/Module.mk
+@@ -338,10 +338,6 @@ define gb_Module_add_subsequentcheck_target
+ $(call gb_Module__read_targetfile,$(1),$(2),subsequentcheck target)
+
+ $(call gb_Module_get_subsequentcheck_target,$(1)) : $$(gb_Module_CURRENTTARGET)
+-$$(gb_Module_CURRENTTARGET) :| \
+- $(call gb_Postprocess_get_target,AllModulesButInstsetNative) \
+- $(call gb_Package_get_target,instsetoo_native_setup) \
+- $(call gb_Package_get_target,instsetoo_native_setup_ure)
+ $(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET)
+
+ endef
diff --git a/debian/tests/patches/disable-db-tests.diff b/debian/tests/patches/disable-db-tests.diff
new file mode 100644
index 000000000..7d148b9f1
--- /dev/null
+++ b/debian/tests/patches/disable-db-tests.diff
@@ -0,0 +1,130 @@
+diff -urN smoketest-old/data/Test_DB.xml smoketest/data/Test_DB.xml
+--- a/smoketest-old/data/Basic/Standard/Test_DB.xml 2011-12-20 16:05:52.000000000 +0000
++++ b/smoketest/data/Basic/Standard/Test_DB.xml 2011-12-29 23:09:08.000000000 +0000
+@@ -30,9 +30,6 @@
+
+ const cMessageDatabaseService = &quot;Database Service&quot;
+ const cMessageDatabaseOpen = &quot;Open Database&quot;
+-const cMessageDatabaseInsert = &quot;Insert record into Database&quot;
+-const cMessageDatabaseDelete = &quot;Delete record from Database&quot;
+-const cMessageDatabaseSeek = &quot;Read other record from Database&quot;
+ const cMessageDatabaseClose = &quot;Close Database&quot;
+
+ Sub TestDB
+@@ -81,48 +78,6 @@
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseService, TRUE )
+ End If
+
+- gCurrentTestCase = cDBInsert
+- sCurrentMessage = cMessageDatabaseInsert
+-
+- oRowSet.ActiveConnection = oDBConnection
+-
+- oRowSet.CommandType = com.sun.star.sdb.CommandType.COMMAND
+- oRowSet.Command = &quot;SELECT * FROM &quot; + sTable
+- oRowSet.execute()
+-
+- oRowSet.moveToInsertRow
+- oRowSet.updateString(5, sTestString)
+-
+- oRowSet.insertRow()
+- nRowCount=oRowSet.RowCount
+-
+- oRowSet.moveToCurrentRow()
+-
+- bResult = (oRowSet.getString(5) = sTestString)
+- LogTestResult( &quot;Database &quot;+ cMessageDatabaseInsert, bResult )
+-
+- &apos;delete only if insert passed
+-
+- if (bResult) Then
+- gCurrentTestCase = cDBDelete
+- sCurrentMessage = cMessageDatabaseDelete
+- oRowSet.deleteRow()
+- bResult = (nRowCount - oRowSet.RowCount = 0)
+- if ( bResult ) Then
+- oRowSet.next()
+- bResult = (nRowCount - oRowSet.RowCount = 1)
+- End If
+- LogTestResult( &quot;Database &quot;+ cMessageDatabaseDelete, bResult )
+- End If
+-
+- &apos; read other record
+-
+- gCurrentTestCase = cDBSeek
+- sCurrentMessage = cMessageDatabaseSeek
+- oRowSet.first()
+- bResult = not (oRowSet.getString(5) = sTestString)
+- LogTestResult( &quot;Database &quot;+ cMessageDatabaseSeek, bResult )
+-
+ gCurrentTestCase = cDBClose
+ sCurrentMessage = cMessageDatabaseClose
+ oDBConnection.Dispose()
+diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk
+index 204854748ec1..992ae1ed17c2 100644
+--- a/dbaccess/Module_dbaccess.mk
++++ b/dbaccess/Module_dbaccess.mk
+@@ -32,63 +32,11 @@ $(eval $(call gb_Module_add_l10n_targets,dbaccess,\
+ AllLangMoTarget_dba \
+ ))
+
+-ifneq ($(OS),iOS)
+-ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
+-# remove if we have a be file for this
+-ifeq ($(ENDIANNESS),little)
+-$(eval $(call gb_Module_add_check_targets,dbaccess,\
+- CppunitTest_dbaccess_firebird_regression_test \
+-))
+-endif
+-$(eval $(call gb_Module_add_check_targets,dbaccess,\
+- CppunitTest_dbaccess_firebird_test \
+-))
+-endif
+-
+-$(eval $(call gb_Module_add_check_targets,dbaccess,\
+- CppunitTest_dbaccess_dialog_save \
+- CppunitTest_dbaccess_empty_stdlib_save \
+- CppunitTest_dbaccess_nolib_save \
+- CppunitTest_dbaccess_macros_test \
+- CppunitTest_dbaccess_hsqlschema_import \
+-))
+-
+-ifeq ($(ENABLE_JAVA),TRUE)
+-$(eval $(call gb_Module_add_check_targets,dbaccess,\
+- CppunitTest_dbaccess_hsqldb_test \
+- CppunitTest_dbaccess_RowSetClones \
+-))
+-endif
+-
+-# This runs a suite of performance tests on embedded firebird and HSQLDB.
+-# Instructions on running the test can be found in qa/unit/embeddedb_performancetest
+-ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
+-ifeq ($(ENABLE_JAVA),TRUE)
+-$(eval $(call gb_Module_add_check_targets,dbaccess,\
+- CppunitTest_dbaccess_embeddeddb_performancetest \
+-))
+-endif
+-endif
+-
+-$(eval $(call gb_Module_add_subsequentcheck_targets,dbaccess,\
+- JunitTest_dbaccess_complex \
+- JunitTest_dbaccess_unoapi \
+-))
+-
+-ifneq ($(DISABLE_PYTHON),TRUE)
+-ifneq ($(ENABLE_JAVA),)
+-$(eval $(call gb_Module_add_subsequentcheck_targets,dbaccess,\
+- PythonTest_dbaccess_python \
+-))
+-endif
+-endif
+-
+ # screenshots
+ $(eval $(call gb_Module_add_screenshot_targets,dbaccess,\
+ CppunitTest_dbaccess_dialogs_test \
+ ))
+
+-endif
+ endif
+
+ # vim: set noet sw=4 ts=4:
diff --git a/debian/tests/patches/junit-subsequentcheck-standalone.diff b/debian/tests/patches/junit-subsequentcheck-standalone.diff
new file mode 100644
index 000000000..ec38c96b9
--- /dev/null
+++ b/debian/tests/patches/junit-subsequentcheck-standalone.diff
@@ -0,0 +1,139 @@
+From fef2f669c1e861c685d22c18319514cec9f9f8c3 Mon Sep 17 00:00:00 2001
+From: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
+Date: Wed, 28 Jan 2015 12:11:16 +0100
+Subject: [PATCH] run subsequentcheck standalone against installed version as
+ integration test
+Last-Update: 2017-05-17
+
+Forwarded: partially, where there is generic use for it
+---
+ jurt/Module_jurt.mk | 2 +-
+ postprocess/Module_postprocess.mk | 4 ++--
+ solenv/gbuild/JavaClassSet.mk | 2 +-
+ solenv/gbuild/JunitTest.mk | 2 +-
+ solenv/gbuild/Module.mk | 3 +++
+ solenv/gbuild/extensions/post_SkipBuild.mk | 18 ++++++++++++++++++
+ solenv/gbuild/platform/unxgcc.mk | 1 +
+ 7 files changed, 27 insertions(+), 5 deletions(-)
+ create mode 100644 solenv/gbuild/extensions/post_SkipBuild.mk
+
+diff --git a/ridljar/Module_ridljar.mk b/ridljar/Module_ridljar.mk
+index daa0f1835be7..c4186e900a87 100644
+--- a/ridljar/Module_ridljar.mk
++++ b/ridljar/Module_ridljar.mk
+@@ -16,7 +16,7 @@ $(eval $(call gb_Module_add_targets,ridljar,\
+ Jar_unoloader \
+ ))
+
+-$(eval $(call gb_Module_add_check_targets,ridljar,\
++#$(eval $(call gb_Module_add_check_targets,ridljar,\
+ CustomTarget_test_urp \
+ InternalUnoApi_test_urp \
+ JunitTest_bridgefactory \
+diff --git a/postprocess/Module_postprocess.mk b/postprocess/Module_postprocess.mk
+index 0fbede6a9f2b..4c3abc52747c 100644
+--- a/postprocess/Module_postprocess.mk
++++ b/postprocess/Module_postprocess.mk
+@@ -12,19 +12,19 @@ $(eval $(call gb_Module_Module,postprocess))
+ # UGLY: postprocess_XCDS variable from CustomTarget_registry
+ # is reused in Package_registry!
+
+-$(eval $(call gb_Module_add_targets,postprocess,\
++#$(eval $(call gb_Module_add_targets,postprocess,\
+ $(if $(ENABLE_CUSTOMTARGET_COMPONENTS),CustomTarget_components) \
+ CustomTarget_registry \
+ Rdb_services \
+-))
+-ifeq ($(gb_Side),host)
+-$(eval $(call gb_Module_add_targets,postprocess,\
++#))
++#ifeq ($(gb_Side),host)
++#$(eval $(call gb_Module_add_targets,postprocess,\
+ CustomTarget_images \
+ Package_images \
+-))
+-endif
++#))
++#endif
+
+-$(eval $(call gb_Module_add_l10n_targets,postprocess,\
++#$(eval $(call gb_Module_add_l10n_targets,postprocess,\
+ Package_registry \
+ ))
+
+diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk
+index cff4299bf06e..76765351abdd 100644
+--- a/solenv/gbuild/JavaClassSet.mk
++++ b/solenv/gbuild/JavaClassSet.mk
+@@ -46,7 +46,7 @@ $(call gb_Helper_abbreviate_dirs,\
+ $(filter-out $(JARDEPS) $(T_JAVA9FILES),$(4))) && \
+ $(if $(3),$(call gb_JavaClassSet_JAVACCOMMAND,$(JAVA_TARGET_VER)) \
+ $(gb_JavaClassSet_JAVACDEBUG) \
+- -classpath "$(T_CP)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(2))" \
++ -classpath "$(T_CP)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(2))$(gb_CLASSPATHSEP)$(shell echo $(wildcard /usr/lib/libreoffice/program/classes/*.jar) | sed -e s/\ /:/g)" \
+ -d $(call gb_JavaClassSet_get_classdir,$(2)) \
+ @$$RESPONSEFILE &&) \
+ rm -f $$RESPONSEFILE &&) \
+@@ -55,7 +55,7 @@ $(call gb_Helper_abbreviate_dirs,\
+ $(T_JAVA9FILES)) && \
+ $(if $(3),$(call gb_JavaClassSet_JAVACCOMMAND,9) \
+ $(gb_JavaClassSet_JAVACDEBUG) \
+- -classpath "$(T_CP)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(2))" \
++ -classpath "$(T_CP)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(2))$(gb_CLASSPATHSEP)$(shell echo $(wildcard /usr/lib/libreoffice/program/classes/*.jar) | sed -e s/\ /:/g)" \
+ --module-path "$(T_CP)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(2))" \
+ $(if $(T_MODULENAME),--patch-module $(T_MODULENAME)="$(subst $(WHITESPACE),$(gb_CLASSPATHSEP),$(strip $(dir $(PACKAGEDIRS))))") \
+ -d $(call gb_JavaClassSet_get_classdir,$(2)) \
+--- a/solenv/gbuild/JunitTest.mk
++++ b/solenv/gbuild/JunitTest.mk
+@@ -55,7 +55,7 @@ $(call gb_JunitTest_get_target,%) :
+ endif
+
+ define gb_JunitTest_JunitTest
+-$(call gb_JunitTest_get_target,$(1)) : T_CP := $(call gb_JavaClassSet_get_classdir,$(call gb_JunitTest_get_classsetname,$(1)))$$(gb_CLASSPATHSEP)$(OOO_JUNIT_JAR)$(if $(HAMCREST_JAR),$$(gb_CLASSPATHSEP)$(HAMCREST_JAR))$$(gb_CLASSPATHSEP)$(INSTROOT)/$(LIBO_URE_LIB_FOLDER)
++$(call gb_JunitTest_get_target,$(1)) : T_CP := $(call gb_JavaClassSet_get_classdir,$(call gb_JunitTest_get_classsetname,$(1)))$$(gb_CLASSPATHSEP)$(OOO_JUNIT_JAR)$(if $(HAMCREST_JAR),$$(gb_CLASSPATHSEP)$(HAMCREST_JAR))$$(gb_CLASSPATHSEP)$(INSTROOT)/$(LIBO_URE_LIB_FOLDER)$(gb_CLASSPATHSEP)$(shell echo $(wildcard /usr/lib/libreoffice/program/classes/*.jar) | sed -e s/\ /:/g)
+ $(call gb_JunitTest_get_target,$(1)) : CLASSES :=
+ $(eval $(call gb_JunitTest_JunitTest_platform,$(1)))
+
+--- a/solenv/gbuild/Module.mk
++++ b/solenv/gbuild/Module.mk
+@@ -336,15 +336,16 @@ endef
+ # has order dependency on AllModulesButInstsetNative to be able to run
+ # subsequentcheck in the same make process on "make check"
+ define gb_Module_add_subsequentcheck_target
++ifeq (,$(filter-out JavaClassSet% JunitTest%,$(2)))
+ $(call gb_Module__read_targetfile,$(1),$(2),subsequentcheck target)
+
+ $(call gb_Module_get_subsequentcheck_target,$(1)) : $$(gb_Module_CURRENTTARGET)
+ $$(gb_Module_CURRENTTARGET) :| \
+- $(call gb_Postprocess_get_target,AllModulesButInstsetNative) \
+- $(call gb_Package_get_target,instsetoo_native_setup) \
+- $(call gb_Package_get_target,instsetoo_native_setup_ure)
++ $(call gb_Postprocess_get_target,AllModulesButInstsetNative)
+ $(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET)
+
++endif
++
+ endef
+
+ define gb_Module_add_stagingcheck_target
+--- /dev/null
++++ b/solenv/gbuild/extensions/post_SkipBuild.mk
+@@ -0,0 +1,18 @@
++# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
++#
++# This file is part of the LibreOffice project.
++#
++# This Source Code Form is subject to the terms of the Mozilla Public
++# License, v. 2.0. If a copy of the MPL was not distributed with this
++# file, You can obtain one at http://mozilla.org/MPL/2.0/.
++#
++
++# we dont want to bother with these for integration tests
++gb_Module_add_target =
++gb_Module_add_l10n_target =
++gb_Module_add_check_target =
++gb_Module_add_slowcheck_target =
++gb_JavaClassSet_use_jar =
++gb_JunitTest_use_jar =
++
++# vim: set noet sw=4 ts=4:
diff --git a/debian/tests/patches/odk-build-examples-standalone.diff b/debian/tests/patches/odk-build-examples-standalone.diff
new file mode 100644
index 000000000..7cb231b2c
--- /dev/null
+++ b/debian/tests/patches/odk-build-examples-standalone.diff
@@ -0,0 +1,50 @@
+diff --git a/odk/build-examples_common.mk b/odk/build-examples_common.mk
+index 931d6eea856e..2749b6930079 100644
+--- a/odk/build-examples_common.mk
++++ b/odk/build-examples_common.mk
+@@ -45,7 +45,7 @@ else
+ && export \
+ UserInstallation=$(call gb_Helper_make_url,$(call gb_CustomTarget_get_workdir,$(1))/user) \
+ $(foreach my_dir,$(2), \
+- && (cd $(INSTDIR)/$(SDKDIRNAME)/examples/$(my_dir) \
++ && (cd /usr/lib/libreoffice/sdk/examples/$(my_dir) \
+ && printf 'yes\n' | LC_ALL=C make -j1 \
+ CC="$(CXX)" LINK="$(CXX)" LIB="$(CXX)" \
+ $(if $(MACOSX_SHELL_HACK), SHELL="$$$$ODK_BUILD_SHELL", ))) \
+@@ -43,17 +43,17 @@ endif
+ endif
+
+ $(call gb_CustomTarget_get_workdir,$(1))/setsdkenv: \
+- $(SRCDIR)/odk/config/setsdkenv_unix.sh.in \
++ /usr/lib/libreoffice/sdk//setsdkenv_unix.sh.in \
+ $(BUILDDIR)/config_$(gb_Side).mk | \
+ $(call gb_CustomTarget_get_workdir,$(1))/.dir
+ $$(call gb_Output_announce,$(subst $(WORKDIR)/,,$(1)),$(true),SED,1)
+ sed -e 's!@OO_SDK_NAME@!sdk!' \
+- -e 's!@OO_SDK_HOME@!$(INSTDIR)/$(SDKDIRNAME)!' \
+- -e 's!@OFFICE_HOME@!$(INSTROOTBASE)!' -e 's!@OO_SDK_MAKE_HOME@!!' \
++ -e 's!@OO_SDK_HOME@!/usr/lib/libreoffice/sdk!' \
++ -e 's!@OFFICE_HOME@!/usr/lib/libreoffice!' -e 's!@OO_SDK_MAKE_HOME@!!' \
+ -e 's!@OO_SDK_ZIP_HOME@!!' -e 's!@OO_SDK_CAT_HOME@!!' \
+ -e 's!@OO_SDK_SED_HOME@!!' -e 's!@OO_SDK_CPP_HOME@!!' \
+ -e 's!@OO_SDK_JAVA_HOME@!$(JAVA_HOME)!' \
+- -e 's!@OO_SDK_OUTPUT_DIR@!$(call gb_CustomTarget_get_workdir,$(1))/out!' \
++ -e 's!@OO_SDK_OUTPUT_DIR@!$(shell mktemp -q -d)/out!' \
+ -e 's!@SDK_AUTO_DEPLOYMENT@!YES!' $$< > $$@
+
+ .PHONY: $(call gb_CustomTarget_get_target,$(1))
+diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
+index 4073dcfd9bf5..68c17ce0d1ed 100644
+--- a/solenv/gbuild/Module.mk
++++ b/solenv/gbuild/Module.mk
+@@ -339,10 +339,6 @@ define gb_Module_add_subsequentcheck_target
+ $(call gb_Module__read_targetfile,$(1),$(2),subsequentcheck target)
+
+ $(call gb_Module_get_subsequentcheck_target,$(1)) : $$(gb_Module_CURRENTTARGET)
+-$$(gb_Module_CURRENTTARGET) :| \
+- $(call gb_Postprocess_get_target,AllModulesButInstsetNative) \
+- $(call gb_Package_get_target,instsetoo_native_setup) \
+- $(call gb_Package_get_target,instsetoo_native_setup_ure)
+ $(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET)
+
+ endef
diff --git a/debian/tests/patches/smoketest-disable-extension-tests.diff b/debian/tests/patches/smoketest-disable-extension-tests.diff
new file mode 100644
index 000000000..0b5ee3b3a
--- /dev/null
+++ b/debian/tests/patches/smoketest-disable-extension-tests.diff
@@ -0,0 +1,98 @@
+--- smoketest/data/Basic/Standard/Test_Ext.xml 2012-02-01 13:56:49.000000000 +0100
++++ smoketest/data/Basic/Standard/Test_Ext.xml 2012-02-20 20:15:23.000000000 +0100
+@@ -28,10 +28,6 @@
+ <!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+ <script:module xmlns:script="http://openoffice.org/2000/script" script:name="Test_Ext" script:language="StarBasic">REM ***** BASIC *****
+
+-const cMessageExtensionService = &quot;Extension Service&quot;
+-const cMessageExtensionInstall = &quot;Install Extension&quot;
+-const cMessageExtensionUninstall = &quot;Uninstall Extension&quot;
+-
+ Sub TestExtensions
+ Dim oTestExtension as Object, obj_null as Object
+ Dim sCurrentMessage as String
+@@ -37,9 +37,6 @@
+ Dim sCurrentMessage as String
+ Dim bResult as Boolean
+ Dim sImplementationNameString as String
+- sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&quot;
+-
+- On Local Error GoTo EXTERROR
+
+ gCurrentTestCase = cLogfileFailed
+ LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+@@ -35,74 +35,5 @@
+ gCurrentTestCase = cLogfileFailed
+ LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+
+- sCurrentMessage = &quot;SmokeTestCommandEnvironment (implemented in Java)&quot;
+- gCurrentTestCase = cEXTService
+-
+- &apos;Create an implementation of com.sun.star.ucb.XCommandEnvironment which is needed for
+- &apos;adding the extension. The implementation is in
+- &apos;smoketest/org/libreoffice/smoketest/SmoketestCommandEnvironment.java and the code is in smoketest.jar
+- cmdEnv = createUnoService(cUnoSmoketestCommandEnvironment)
+-
+- &apos;Create the component context and then get the singleton ExtensionManager
+- &apos;A singleton cannot be created with createUnoService
+- sCurrentMessage = cMessageExtensionService
+- ctx = getDefaultContext
+- ext_mgr = ctx.getValueByName(&quot;/singletons/&quot; + cExtensionManager)
+-
+- LogTestResult( &quot;Extension &quot;+ cMessageExtensionService, not IsNull (ext_mgr) )
+- if (IsNull(ext_mgr)) then
+- Close #LocalTestLog%
+- LocalTestLog = 0
+- Exit Sub
+- End If
+-
+- sCurrentMessage = cMessageExtensionInstall
+- gCurrentTestCase = cEXTInstall
+-
+- &apos;Add the extension. We must provide a file URL here.
+- &apos;By passing &quot;user&quot; we determine that the actions we perform on
+- &apos;XExtensionManager only affect the user installation. To modify the share installation one would pass &quot;share&quot;.
+-
+- Dim props() as Object
+- ext_mgr.addExtension(sExtensionURL, props, &quot;user&quot;, obj_null, cmdEnv)
+-
+- &apos;Check if the extension has been added by creating a service which is contained in the extension.
+- oTestExtension = createUnoService(cUnoSmoketestTestExtension)
+- bResult = (oTestExtension.getImplementationName = sImplementationNameString)
+- LogTestResult( &quot;Extension &quot;+ cMessageExtensionInstall, bResult )
+- if (not bResult) then
+- Close #LocalTestLog%
+- LocalTestLog = 0
+- Exit Sub
+- End If
+-
+- sCurrentMessage = cMessageExtensionUninstall
+- gCurrentTestCase = cEXTUninstall
+-
+- &apos;Remove the package
+- ext_mgr.removeExtension(&quot;org.libreoffice.smoketest.TestExtension&quot;, cExtensionFileName, &quot;user&quot;,obj_null, cmdEnv)
+-
+- &apos;Try to create the service which is contained in the now removed extension.
+- oTestExtension = createUnoService(cUnoSmoketestTestExtension)
+-
+- &apos;The service must not be available anymore. Therefore isNull must return true.
+- LogTestResult( &quot;Extension &quot;+ cMessageExtensionUninstall, IsNull (oTestExtension) )
+-
+- Print #LocalTestLog, &quot;---&quot;
+- Close #LocalTestLog%
+- LocalTestLog = 0
+- Exit Sub &apos; Without error
+-
+- EXTERROR:
+- If ( gCurrentTestCase = cLogfileFailed ) then
+- LogTestResult( &quot; &quot;, False )
+- Exit Sub
+- else
+- LogTestResult( &quot;Extension &quot;+ sCurrentMessage, False )
+- Close #LocalTestLog%
+- LocalTestLog = 0
+- End If
+- Exit Sub &apos; With error
+-
+ End Sub
+ </script:module>
diff --git a/debian/tests/patches/smoketest-standalone.diff b/debian/tests/patches/smoketest-standalone.diff
new file mode 100644
index 000000000..e236b94cb
--- /dev/null
+++ b/debian/tests/patches/smoketest-standalone.diff
@@ -0,0 +1,17 @@
+diff --git a/smoketest/CppunitTest_smoketest.mk b/smoketest/CppunitTest_smoketest.mk
+index f7d64cae562f..9d47776ffb4b 100644
+--- a/smoketest/CppunitTest_smoketest.mk
++++ b/smoketest/CppunitTest_smoketest.mk
+@@ -34,10 +34,10 @@ userinstallation=$(WORKDIR)/CustomTarget/smoketest
+ endif
+
+ $(eval $(call gb_CppunitTest_add_arguments,smoketest,\
+- -env:arg-soffice=$(gb_JunitTest_SOFFICEARG) \
++ -env:arg-soffice=$(OOO_TEST_SOFFICE) \
+ -env:arg-user=$(userinstallation) \
+ -env:arg-env=$(gb_Helper_LIBRARY_PATH_VAR)"$$$${$(gb_Helper_LIBRARY_PATH_VAR)+=$$$$$(gb_Helper_LIBRARY_PATH_VAR)}" \
+- -env:arg-testarg.smoketest.doc=$(WORKDIR)/Zip/smoketestdoc.sxw \
++ -env:arg-testarg.smoketest.doc=/usr/share/libreoffice/smoketestdoc.sxw \
+ ))
+
+ $(call gb_CppunitTest_get_target,smoketest): \
diff --git a/debian/tests/patches/testtools-standalone.diff b/debian/tests/patches/testtools-standalone.diff
new file mode 100644
index 000000000..a6fd5dd20
--- /dev/null
+++ b/debian/tests/patches/testtools-standalone.diff
@@ -0,0 +1,227 @@
+diff --git a/testtools/CustomTarget_bridgetest.mk b/testtools/CustomTarget_bridgetest.mk
+index d090146ec411..1cb4d30dcc2a 100644
+--- a/testtools/CustomTarget_bridgetest.mk
++++ b/testtools/CustomTarget_bridgetest.mk
+@@ -28,7 +28,7 @@ $(testtools_BRIDGEDIR)/bridgetest_server$(testtools_BATCHSUFFIX) :| $(testtools_
+ $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH)
+ $(call gb_Helper_abbreviate_dirs,\
+ echo \
+- "$(call gb_Executable_get_target_for_build,uno)" \
++ "/usr/lib/libreoffice/program/uno" \
+ "-s com.sun.star.test.bridge.CppTestObject" \
+ "-u 'uno:socket$(COMMA)host=127.0.0.1$(COMMA)port=2002;urp;test'" \
+ "--singleaccept" \
+@@ -59,7 +59,7 @@ $(testtools_BRIDGEDIR)/bridgetest_inprocess_java$(testtools_BATCHSUFFIX) :| $(te
+ $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH)
+ $(call gb_Helper_abbreviate_dirs,\
+ echo "JAVA_HOME=$(JAVA_HOME)" \
+- "$(call gb_Executable_get_target_for_build,uno)" \
++ "/usr/lib/libreoffice/program/uno" \
+ "-s com.sun.star.test.bridge.BridgeTest" \
+ "-env:LO_BUILD_LIB_DIR=$(call gb_Helper_make_url,$(gb_Library_WORKDIR_FOR_BUILD))" \
+ "-env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target,uno_services))" \
+@@ -72,7 +72,7 @@ $(testtools_BRIDGEDIR)/bridgetest_client$(testtools_BATCHSUFFIX) :| $(testtools_
+ $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH)
+ $(call gb_Helper_abbreviate_dirs,\
+ echo \
+- "$(call gb_Executable_get_target_for_build,uno)" \
++ "/usr/lib/libreoffice/program/uno" \
+ "-s com.sun.star.test.bridge.BridgeTest --" \
+ "-u 'uno:socket$(COMMA)host=127.0.0.1$(COMMA)port=2002;urp;test'" \
+ "-env:LO_BUILD_LIB_DIR=$(call gb_Helper_make_url,$(gb_Library_WORKDIR_FOR_BUILD))" \
+diff --git a/testtools/CustomTarget_uno_test.mk b/testtools/CustomTarget_uno_test.mk
+index 4850e5ca66b2..610a0b170e90 100644
+--- a/testtools/CustomTarget_uno_test.mk
++++ b/testtools/CustomTarget_uno_test.mk
+@@ -12,18 +12,12 @@ $(eval $(call gb_CustomTarget_CustomTarget,testtools/uno_test))
+ # this target is phony to run it every time
+ .PHONY : $(call gb_CustomTarget_get_target,testtools/uno_test)
+
+-$(call gb_CustomTarget_get_target,testtools/uno_test) : \
+- $(call gb_Executable_get_runtime_dependencies,uno) \
+- $(call gb_InternalUnoApi_get_target,bridgetest) \
+- $(call gb_Package_get_target,instsetoo_native_setup_ure) \
+- $(call gb_Rdb_get_target,uno_services) \
+- $(call gb_Rdb_get_target,ure/services) \
+- $(call gb_UnoApi_get_target,udkapi)
++$(call gb_CustomTarget_get_target,testtools/uno_test) :
+ ifneq ($(gb_SUPPRESS_TESTS),)
+ @true
+ else
+ $(call gb_Helper_abbreviate_dirs,\
+- $(call gb_Executable_get_command,uno) \
++ /usr/lib/libreoffice/program/uno \
+ -s com.sun.star.test.bridge.BridgeTest \
+ -- com.sun.star.test.bridge.CppTestObject \
+ -env:LO_BUILD_LIB_DIR=$(call gb_Helper_make_url,$(gb_Library_WORKDIR_FOR_BUILD)) \
+#diff --git a/testtools/Library_bridgetest-common.mk b/testtools/Library_bridgetest-common.mk
+#index 1ca38bca6b49..cbc793c36d39 100644
+#--- a/testtools/Library_bridgetest-common.mk
+#+++ b/testtools/Library_bridgetest-common.mk
+#@@ -20,16 +20,6 @@ $(eval $(call gb_Library_use_internal_api,testtools_bridgetest-common,\
+# bridgetest \
+# ))
+#
+#-$(eval $(call gb_Library_use_libraries,testtools_bridgetest-common, \
+#- cppu \
+#- cppuhelper \
+#- sal \
+#-))
+#-
+#-$(eval $(call gb_Library_use_api,testtools_bridgetest-common,\
+#- udkapi \
+#-))
+#-
+# $(eval $(call gb_Library_add_exception_objects,testtools_bridgetest-common,\
+# testtools/source/bridgetest/currentcontextchecker \
+# testtools/source/bridgetest/multi \
+#diff --git a/testtools/Library_bridgetest.mk b/testtools/Library_bridgetest.mk
+#index 52f335761fdf..f0bafca0998f 100644
+#--- a/testtools/Library_bridgetest.mk
+#+++ b/testtools/Library_bridgetest.mk
+#@@ -15,16 +15,9 @@ $(eval $(call gb_Library_use_internal_api,testtools_bridgetest,\
+# bridgetest \
+# ))
+#
+#-$(eval $(call gb_Library_use_api,testtools_bridgetest,\
+#- udkapi \
+#-))
+#-
+# $(eval $(call gb_Library_use_external,testtools_bridgetest,boost_headers))
+#
+# $(eval $(call gb_Library_use_libraries,testtools_bridgetest,\
+#- cppu \
+#- cppuhelper \
+#- sal \
+# testtools_bridgetest-common \
+# ))
+#
+#diff --git a/testtools/Library_constructors.mk b/testtools/Library_constructors.mk
+#index 516c05d62db8..3a2a4b8bca24 100644
+#--- a/testtools/Library_constructors.mk
+#+++ b/testtools/Library_constructors.mk
+#@@ -22,16 +22,6 @@ $(eval $(call gb_Library_use_internal_api,testtools_constructors,\
+# bridgetest \
+# ))
+#
+#-$(eval $(call gb_Library_use_api,testtools_constructors,\
+#- udkapi \
+#-))
+#-
+#-$(eval $(call gb_Library_use_libraries,testtools_constructors,\
+#- cppu \
+#- cppuhelper \
+#- sal \
+#-))
+#-
+# $(eval $(call gb_Library_add_exception_objects,testtools_constructors,\
+# testtools/source/bridgetest/constructors \
+# ))
+#diff --git a/testtools/Library_cppobj.mk b/testtools/Library_cppobj.mk
+#index 086b1fa0b6f5..9348254b6da8 100644
+#--- a/testtools/Library_cppobj.mk
+#+++ b/testtools/Library_cppobj.mk
+#@@ -20,16 +20,9 @@ $(eval $(call gb_Library_use_internal_api,testtools_cppobj,\
+# bridgetest \
+# ))
+#
+#-$(eval $(call gb_Library_use_api,testtools_cppobj,\
+#- udkapi \
+#-))
+#-
+# $(eval $(call gb_Library_use_external,testtools_cppobj,boost_headers))
+#
+# $(eval $(call gb_Library_use_libraries,testtools_cppobj,\
+#- cppu \
+#- cppuhelper \
+#- sal \
+# testtools_bridgetest-common \
+# ))
+#
+#diff --git a/unoidl/Executable_unoidl-check.mk b/unoidl/Executable_unoidl-check.mk
+#index 36dfc44de635..a1bb6ed14d80 100644
+#--- a/unoidl/Executable_unoidl-check.mk
+#+++ b/unoidl/Executable_unoidl-check.mk
+#@@ -15,10 +15,13 @@ $(eval $(call gb_Executable_add_exception_objects,unoidl-check, \
+#
+# $(eval $(call gb_Executable_use_libraries,unoidl-check, \
+# unoidl \
+#- $(if $(filter TRUE,$(DISABLE_DYNLOADING)),reg) \
+#- $(if $(filter TRUE,$(DISABLE_DYNLOADING)),store) \
+#- salhelper \
+#- sal \
+#+))
+#+
+#+$(eval $(call gb_Executable_add_ldflags,unoidl-check, \
+#+ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L/usr/lib/libreoffice/program/ -lreglo) \
+#+ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L/usr/lib/libreoffice/program/ -lstorelo) \
+#+ -L/usr/lib/libreoffice/sdk/lib/ -luno_sal \
+#+ -L/usr/lib/libreoffice/sdk/lib/ -luno_salhelpergcc3 \
+# ))
+#
+# # vim: set noet sw=4 ts=4:
+#diff --git a/unoidl/Executable_unoidl-read.mk b/unoidl/Executable_unoidl-read.mk
+#index b134c30b1a72..2bfd0ea3057f 100644
+#--- a/unoidl/Executable_unoidl-read.mk
+#+++ b/unoidl/Executable_unoidl-read.mk
+#@@ -15,10 +15,13 @@ $(eval $(call gb_Executable_add_exception_objects,unoidl-read, \
+#
+# $(eval $(call gb_Executable_use_libraries,unoidl-read, \
+# unoidl \
+#- $(if $(filter TRUE,$(DISABLE_DYNLOADING)),reg) \
+#- $(if $(filter TRUE,$(DISABLE_DYNLOADING)),store) \
+#- salhelper \
+#- sal \
+#+))
+#+
+#+$(eval $(call gb_Executable_add_ldflags,unoidl-read, \
+#+ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L/usr/lib/libreoffice/program/ -lreglo) \
+#+ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L/usr/lib/libreoffice/program/ -lstorelo) \
+#+ -L/usr/lib/libreoffice/sdk/lib/ -luno_sal \
+#+ -L/usr/lib/libreoffice/sdk/lib/ -luno_salhelpergcc3 \
+# ))
+#
+# # vim: set noet sw=4 ts=4:
+#diff --git a/unoidl/Executable_unoidl-write.mk b/unoidl/Executable_unoidl-write.mk
+#index 9accb31ac14d..f69d78a09c32 100644
+#--- a/unoidl/Executable_unoidl-write.mk
+#+++ b/unoidl/Executable_unoidl-write.mk
+#@@ -15,10 +15,15 @@ $(eval $(call gb_Executable_add_exception_objects,unoidl-write, \
+#
+# $(eval $(call gb_Executable_use_libraries,unoidl-write, \
+# unoidl \
+#- $(if $(filter TRUE,$(DISABLE_DYNLOADING)),reg) \
+#- $(if $(filter TRUE,$(DISABLE_DYNLOADING)),store) \
+#- salhelper \
+#- sal \
+# ))
+#
+#+$(eval $(call gb_Executable_add_ldflags,unoidl-write, \
+#+ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L/usr/lib/libreoffice/program/ -lreglo) \
+#+ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L/usr/lib/libreoffice/program/ -lstorelo) \
+#+ -L/usr/lib/libreoffice/sdk/lib/ -luno_sal \
+#+ -L/usr/lib/libreoffice/sdk/lib/ -luno_salhelpergcc3 \
+#+))
+#+
+#+
+#+
+# # vim: set noet sw=4 ts=4:
+#diff --git a/unoidl/Library_unoidl.mk b/unoidl/Library_unoidl.mk
+#index c98fc69f4945..bdc8285fe234 100644
+#--- a/unoidl/Library_unoidl.mk
+#+++ b/unoidl/Library_unoidl.mk
+#@@ -32,10 +32,10 @@ $(eval $(call gb_Library_set_include,unoidl, \
+# -I$(SRCDIR)/unoidl/source \
+# ))
+#
+#-$(eval $(call gb_Library_use_libraries,unoidl, \
+#- reg \
+#- sal \
+#- salhelper \
+#+$(eval $(call gb_Library_add_libs,unoidl, \
+#+ -L/usr/lib/libreoffice/program/ -lreglo \
+#+ -L/usr/lib/libreoffice/sdk/lib/ -luno_sal \
+#+ -L/usr/lib/libreoffice/sdk/lib/ -luno_salhelpergcc3 \
+# ))
+#
+# # vim: set noet sw=4 ts=4:
diff --git a/debian/tests/patches/uicheck-standalone.diff b/debian/tests/patches/uicheck-standalone.diff
new file mode 100644
index 000000000..f33556ecd
--- /dev/null
+++ b/debian/tests/patches/uicheck-standalone.diff
@@ -0,0 +1,69 @@
+diff --git a/solenv/gbuild/UITest.mk b/solenv/gbuild/UITest.mk
+index cebb030a12cd..88ec5499dcbd 100644
+--- a/solenv/gbuild/UITest.mk
++++ b/solenv/gbuild/UITest.mk
+@@ -34,7 +34,7 @@ ifneq ($(gb_UITest_DEBUGRUN),)
+ gb_UITest_SOFFICEARG:=connect:pipe,name=$(USER)
+ gb_UITest__interactive := $(true)
+ else
+-gb_UITest_SOFFICEARG:=path:$(INSTROOT)/$(LIBO_BIN_FOLDER)/soffice
++gb_UITest_SOFFICEARG:=$(OOO_TEST_SOFFICE)
+ endif
+
+ gb_UITest_COMMAND := LIBO_LANG=en_US.UTF-8 $(gb_UITest_EXECUTABLE) $(SRCDIR)/uitest/test_main.py
+@@ -65,8 +65,8 @@ else
+ $(DEFS) \
+ SAL_LOG_FILE="$(dir $(call gb_UITest_get_target,$*))/soffice.out.log" \
+ TEST_LIB=$(call gb_Library_get_target,test) \
+- URE_BOOTSTRAP=vnd.sun.star.pathname:$(call gb_Helper_get_rcfile,$(INSTROOT)/$(LIBO_ETC_FOLDER)/fundamental) \
+- PYTHONPATH="$(PYPATH)" \
++ URE_BOOTSTRAP=vnd.sun.star.pathname:/usr/lib/libreoffice/program/fundamentalrc \
++ PYTHONPATH="$(filter-out $I/program,$(PYPATH):/usr/lib/libreoffice/program)" \
+ TestUserDir="$(call gb_Helper_make_url,$(dir $(call gb_UITest_get_target,$*)))" \
+ PYTHONDONTWRITEBYTECODE=0 \
+ $(if $(ENABLE_WERROR),PYTHONWARNINGS=error) \
+@@ -95,7 +95,6 @@ define gb_UITest_UITest
+ $(call gb_UITest_get_target,$(1)) : PYPATH := $(SRCDIR)/uitest$$(gb_CLASSPATHSEP)$(SRCDIR)/unotest/source/python$$(gb_CLASSPATHSEP)$(INSTROOT)/$(LIBO_LIB_PYUNO_FOLDER)$(if $(filter-out $(LIBO_LIB_PYUNO_FOLDER),$(LIBO_LIB_FOLDER)),$(gb_CLASSPATHSEP)$(INSTROOT)/$(LIBO_LIB_FOLDER))
+ $(call gb_UITest_get_target,$(1)) : MODULES :=
+
+-$(eval $(call gb_TestHelpers_use_more_fonts,$(call gb_UITest_get_target,$(1))))
+ $(eval $(call gb_Module_register_target,$(call gb_UITest_get_target,$(1)),$(call gb_UITest_get_clean_target,$(1))))
+ $(call gb_Helper_make_userfriendly_targets,$(1),UITest)
+
+--
+2.20.1
+
+diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
+index 4073dcfd9bf5..856f5efee988 100644
+--- a/solenv/gbuild/Module.mk
++++ b/solenv/gbuild/Module.mk
+@@ -201,7 +201,7 @@ perfcheck :
+ $(call gb_Output_announce_title,all perftests checked.)
+ $(call gb_Output_announce_bell)
+
+-uicheck : build
++uicheck :
+ $(if $(gb_VERBOSE),$(call gb_Output_announce,loaded modules: $(sort $(gb_Module_ALLMODULES)),$(true),UIT,6))
+ $(call gb_Output_announce_title,all uicheck checked.)
+ $(call gb_Output_announce_bell)
+@@ -372,11 +372,6 @@ define gb_Module_add_uicheck_target
+ $(call gb_Module__read_targetfile,$(1),$(2),uicheck target)
+
+ $(call gb_Module_get_uicheck_target,$(1)) : $$(gb_Module_CURRENTTARGET)
+-$$(gb_Module_CURRENTTARGET) :| \
+- $(call gb_Postprocess_get_target,AllModulesButInstsetNative) \
+- $(call gb_Package_get_target,instsetoo_native_setup) \
+- $(call gb_Package_get_target,instsetoo_native_setup_ure)
+-$(call gb_Module_get_uicheck_target,$(1)) : $$(gb_Module_CURRENTTARGET)
+ $(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET)
+
+ endef
+@@ -479,7 +474,7 @@ endif
+ subsequentcheck : $$(firstword $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK))
+ stagingcheck : $$(firstword $$(gb_Module_STAGINGCHECKTARGETSTACK))
+ perfcheck : $$(firstword $$(gb_Module_PERFCHECKTARGETSTACK))
+-uicheck : build $$(firstword $$(gb_Module_UICHECKTARGETSTACK))
++uicheck : $$(firstword $$(gb_Module_UICHECKTARGETSTACK))
+ clean : $$(firstword $$(gb_Module_CLEANTARGETSTACK))
+
+ ifneq ($$(words $$(gb_Module_TARGETSTACK)),1)
diff --git a/debian/tests/pyuno-import b/debian/tests/pyuno-import
new file mode 100755
index 000000000..9820a90e6
--- /dev/null
+++ b/debian/tests/pyuno-import
@@ -0,0 +1,8 @@
+#!/usr/bin/python3
+
+import sys, os
+sys.path.append('/usr/lib/libreoffice/program')
+os.putenv('URE_BOOTSTRAP', 'vnd.sun.star.pathname:/usr/lib/libreoffice/program/fundamentalrc')
+
+import pyuno
+print(pyuno)
diff --git a/debian/tests/slowcheck b/debian/tests/slowcheck
new file mode 100755
index 000000000..04e8573ef
--- /dev/null
+++ b/debian/tests/slowcheck
@@ -0,0 +1,60 @@
+#!/bin/bash
+# autopkgtest check: Run junit base tests against an installed version of LibreOffice
+# (c) 2021 Software in the Public Interest, Inc.
+# Authors: Rene Engelhard <rene@debian.org>
+
+set -e
+set -E
+
+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() {
+ cd $SRCDIR
+ echo
+ echo "====== Unapplying the patches ======"
+ patch -p1 -R < ./debian/tests/patches/cppunit-standalone.diff
+}
+
+trap "unapply" ERR
+
+echo
+echo "====== Patching the tree to only build the unittests against an existing installation ======"
+patch -p1 < ./debian/tests/patches/cppunit-standalone.diff
+
+echo
+echo "====== Enabling core dumps ======"
+# yes, we want core dumps and stack traces
+ulimit -c unlimited || true
+
+echo
+echo "====== Starting slowcheck with ${CHECK_PARALLELISM} job ======"
+
+# hack, otherwise it fails
+mkdir -p $SRCDIR/instdir/program/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/simpress/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/simpress/popupmenu/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/simpress/statusbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/simpress/toolbar/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/simpress/ui/.dir
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/modules/simpress/menubar/.dir
+
+# all modules containing slowcheck
+export PARALLELISM=$CHECK_PARALLELISM
+for i in `grep slowcheck */*.mk | cut -d"/" -f1 | sort | uniq | xargs`; do
+ echo
+ echo "====== Running slowcheck in module $i ======"; \
+ cd $i && \
+ make -rk slowcheck \
+ INSTDIR=/usr/lib/libreoffice \
+ verbose=t; \
+ cd ..;\
+done
+
+unapply
+
diff --git a/debian/tests/smoketest b/debian/tests/smoketest
new file mode 100755
index 000000000..8661c0469
--- /dev/null
+++ b/debian/tests/smoketest
@@ -0,0 +1,56 @@
+#!/bin/bash
+# autopkgtest check: Run smoketest against an installed version of LibreOffice
+# (c) 2018 Software in the Public Interest, Inc.
+# Authors: Rene Engelhard <rene@debian.org>
+
+set -e
+set -E
+
+SRCDIR=`pwd`
+CHECK_PARALLELISM=1
+if [ -n "$AUTOPKGTEST_TMP" ]; then
+ TMP=`mktemp -q -p $AUTOPKGTEST_TMP`
+ WORKDIR=`mktemp -q -d -p $AUTOPKGTEST_TMP`
+else
+ TMP=`mktemp -q`
+ WORKDIR=`mktemp -q -d`
+fi
+
+function unapply() {
+ cd $SRCDIR
+ echo
+ echo "====== Unapplying the patches ======"
+ patch -p1 -R < ./debian/tests/patches/cppunit-standalone.diff
+ patch -p1 -R < ./debian/tests/patches/smoketest-standalone.diff
+ patch -p0 -R < ./debian/tests/patches/smoketest-disable-extension-tests.diff
+}
+
+trap "unapply" ERR
+
+echo
+echo "====== Patching the tree to only build the smoketest unittest against an existing installation ======"
+patch -p1 < ./debian/tests/patches/cppunit-standalone.diff
+patch -p1 < ./debian/tests/patches/smoketest-standalone.diff
+patch -p0 < ./debian/tests/patches/smoketest-disable-extension-tests.diff
+
+echo
+echo "====== Enabling core dumps ======"
+# yes, we want core dumps and stack traces
+ulimit -c unlimited || true
+
+OOO_TEST_SOFFICE="${1:-path:/usr/lib/libreoffice/program/soffice}"
+
+echo
+echo "====== Starting smoketest with ${CHECK_PARALLELISM} job against ${OOO_TEST_SOFFICE} ======"
+
+export PARALLELISM=$CHECK_PARALLELISM
+
+export LD_LIBRARY_PATH=/usr/lib/libreoffice/program:$LD_LIBRARY_PATH
+cd smoketest && make -rk \
+ OOO_TEST_SOFFICE=${OOO_TEST_SOFFICE} \
+ CppunitTest_smoketest INSTDIR=/usr/lib/libreoffice verbose=t
+
+cd $SRCDIR
+
+unapply
+
diff --git a/debian/tests/test-extension b/debian/tests/test-extension
new file mode 100755
index 000000000..460ed0fb7
--- /dev/null
+++ b/debian/tests/test-extension
@@ -0,0 +1,40 @@
+#!/bin/bash
+# autopkgtest check: Install a test extension (as smoketest would do)
+# (c) 2017 Software in the Public Interest, Inc.
+# Authors: Rene Engelhard <rene@debian.org>
+
+set -e
+set -E
+
+if [ -n "$AUTOPKGTEST_TMP" ]; then
+ TMP=`mktemp -q -p $AUTOPKGTEST_TMP`
+else
+ TMP=`mktemp -q`
+fi
+
+# skip if building as root:
+# unopkg errors out with "ERROR: Cannot run unopkg as root without --shared or --bundled option."
+# if ran as root
+if [ `id -u` = "0" ]; then
+ exit 77
+fi
+
+echo
+echo "====== Add the extension ======"
+# does it install fine?
+unopkg add -v /usr/share/libreoffice/TestExtension.oxt
+
+echo
+echo "====== Show extension status ======"
+# does it list? For whatever reason unopkg leaves a stale .lock behind when
+# doing this grep directly on the output so do it on a tmpfile
+unopkg list | tee $TMP
+grep -q org.libreoffice.smoketest.TestExtension $TMP || exit 1
+rm $TMP
+
+echo
+echo "====== Remove the extension ======"
+# does it remove?
+unopkg remove -v org.libreoffice.smoketest.TestExtension
+
+
diff --git a/debian/tests/test-extension-shared b/debian/tests/test-extension-shared
new file mode 100755
index 000000000..f9d794163
--- /dev/null
+++ b/debian/tests/test-extension-shared
@@ -0,0 +1,34 @@
+#!/bin/bash
+# autopkgtest check: Install a test extension shared
+# (c) 2017 Software in the Public Interest, Inc.
+# Authors: Rene Engelhard <rene@debian.org>
+
+set -e
+set -E
+
+if [ -n "$AUTOPKGTEST_TMP" ]; then
+ TMP=`mktemp -q -p $AUTOPKGTEST_TMP`
+else
+ TMP=`mktemp -q`
+fi
+
+
+echo
+echo "====== Add the extension ======"
+# does it install fine?
+unopkg add --shared -v /usr/share/libreoffice/TestExtension.oxt
+
+echo
+echo "====== Show extension status ======"
+# does it list? For whatever reason unopkg leaves a stale .lock behind when
+# doing this grep directly on the output so do it on a tmpfile
+unopkg list --shared | tee $TMP
+grep -q org.libreoffice.smoketest.TestExtension $TMP || exit 1
+rm $TMP
+
+echo
+echo "====== Remove the extension ======"
+# does it remove?
+unopkg remove --shared -v org.libreoffice.smoketest.TestExtension
+
+
diff --git a/debian/tests/testtools-bridgetest b/debian/tests/testtools-bridgetest
new file mode 100755
index 000000000..18c498a34
--- /dev/null
+++ b/debian/tests/testtools-bridgetest
@@ -0,0 +1,57 @@
+#!/bin/bash
+# autopkgtest check: Run UNO tests against an installed version of the URE
+# (c) 2018 Software in the Public Interest, Inc.
+# Authors: Rene Engelhard <rene@debian.org>
+
+set -e
+set -E
+
+SRCDIR=`pwd`
+CHECK_PARALLELISM=1
+if [ -n "$AUTOPKGTEST_TMP" ]; then
+ TMP=`mktemp -q -p $AUTOPKGTEST_TMP`
+ WORKDIR=`mktemp -q -d -p $AUTOPKGTEST_TMP`
+else
+ TMP=`mktemp -q`
+ WORKDIR=`mktemp -q -d`
+fi
+
+function unapply() {
+ cd $SRCDIR
+ echo
+ echo "====== Unapplying the patches ======"
+ patch -p1 -R < ./debian/tests/patches/testtools-standalone.diff
+}
+
+trap "unapply" ERR
+
+echo
+echo "====== Patching the tree to only build the testtools unittest against an existing installation ======"
+patch -p1 < ./debian/tests/patches/testtools-standalone.diff
+
+echo
+echo "====== Enabling core dumps ======"
+# yes, we want core dumps and stack traces
+ulimit -c unlimited || true
+
+if [ ! -f config_host.mk ]; then
+ # this normally shouldn't be needed but otherwise it wants a automatic
+ # re-autogen.
+ echo
+ echo "====== Generating configuration ======="
+ rm -f config_host.mk
+ ./debian/rules config_host.mk ENABLE_PDFIUM=n ENABLE_MERGELIBS=n BUILD_GTK=n BUILD_GTK3=n BUILD_KDE=n
+fi
+
+echo
+echo "====== Starting uno test with ${CHECK_PARALLELISM} job against /usr/lib/libreoffice/program/uno ======"
+
+export PARALLELISM=$CHECK_PARALLELISM
+
+export LD_LIBRARY_PATH=/usr/lib/libreoffice/program:$LD_LIBRARY_PATH
+make testtools.allcheck verbose=t
+
+cd $SRCDIR
+
+unapply
+
diff --git a/debian/tests/uicheck-cui b/debian/tests/uicheck-cui
new file mode 100755
index 000000000..529501482
--- /dev/null
+++ b/debian/tests/uicheck-cui
@@ -0,0 +1,63 @@
+#!/bin/bash
+# autopkgtest check: Run uicheck against an installed version of LibreOffice
+# (c) 2017 Software in the Public Interest, Inc.
+# Authors: Rene Engelhard <rene@debian.org>
+
+set -e
+set -E
+
+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/uicheck-standalone.diff
+}
+
+trap "unapply" ERR
+
+echo
+echo "====== Patching the tree to build uicheck against an existing installation ======"
+patch -p1 < ./debian/tests/patches/uicheck-standalone.diff
+
+if [ ! -f config_host.mk ]; then
+ # this normally shouldn't be needed but otherwise it wants a automatic
+ # re-autogen.
+ echo
+ echo "====== Generating configuration ======="
+ rm -f config_host.mk
+ ./debian/rules config_host.mk
+fi
+
+echo
+echo "====== Enabling core dumps ======"
+# yes, we want core dumps and stack traces
+ulimit -c unlimited || true
+
+echo
+echo "====== Generating en_US.UTF-8 locale ======"
+cd $WORKDIR
+$SRCDIR/debian/scripts/locale-gen
+
+OOO_TEST_SOFFICE="${1:-path:/usr/lib/libreoffice/program/soffice}"
+
+echo
+echo "====== Starting uicheck with ${CHECK_PARALLELISM} job against ${OOO_TEST_SOFFICE} ======"
+
+cd $SRCDIR
+export PARALLELISM=$CHECK_PARALLELISM
+export LOCPATH=$WORKDIR/debian/locales
+export LANG=en_US.UTF-8
+export LC_ALL=en_US.UTF-8
+make -rk \
+ OOO_TEST_SOFFICE=${OOO_TEST_SOFFICE} \
+ cui.uicheck verbose=t
+
+unapply
+
diff --git a/debian/tests/uicheck-sc b/debian/tests/uicheck-sc
new file mode 100755
index 000000000..c89435e86
--- /dev/null
+++ b/debian/tests/uicheck-sc
@@ -0,0 +1,63 @@
+#!/bin/bash
+# autopkgtest check: Run uicheck against an installed version of LibreOffice
+# (c) 2017 Software in the Public Interest, Inc.
+# Authors: Rene Engelhard <rene@debian.org>
+
+set -e
+set -E
+
+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/uicheck-standalone.diff
+}
+
+trap "unapply" ERR
+
+echo
+echo "====== Patching the tree to build uicheck against an existing installation ======"
+patch -p1 < ./debian/tests/patches/uicheck-standalone.diff
+
+if [ ! -f config_host.mk ]; then
+ # this normally shouldn't be needed but otherwise it wants a automatic
+ # re-autogen.
+ echo
+ echo "====== Generating configuration ======="
+ rm -f config_host.mk
+ ./debian/rules config_host.mk
+fi
+
+echo
+echo "====== Enabling core dumps ======"
+# yes, we want core dumps and stack traces
+ulimit -c unlimited || true
+
+echo
+echo "====== Generating en_US.UTF-8 locale ======"
+cd $WORKDIR
+$SRCDIR/debian/scripts/locale-gen
+
+OOO_TEST_SOFFICE="${1:-path:/usr/lib/libreoffice/program/soffice}"
+
+echo
+echo "====== Starting uicheck with ${CHECK_PARALLELISM} job against ${OOO_TEST_SOFFICE} ======"
+
+cd $SRCDIR
+export PARALLELISM=$CHECK_PARALLELISM
+export LOCPATH=$WORKDIR/debian/locales
+export LANG=en_US.UTF-8
+export LC_ALL=en_US.UTF-8
+make -rk \
+ OOO_TEST_SOFFICE=${OOO_TEST_SOFFICE} \
+ sc.uicheck verbose=t
+
+unapply
+
diff --git a/debian/tests/uicheck-sd b/debian/tests/uicheck-sd
new file mode 100755
index 000000000..42e433fec
--- /dev/null
+++ b/debian/tests/uicheck-sd
@@ -0,0 +1,63 @@
+#!/bin/bash
+# autopkgtest check: Run uicheck against an installed version of LibreOffice
+# (c) 2017 Software in the Public Interest, Inc.
+# Authors: Rene Engelhard <rene@debian.org>
+
+set -e
+set -E
+
+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/uicheck-standalone.diff
+}
+
+trap "unapply" ERR
+
+echo
+echo "====== Patching the tree to build uicheck against an existing installation ======"
+patch -p1 < ./debian/tests/patches/uicheck-standalone.diff
+
+if [ ! -f config_host.mk ]; then
+ # this normally shouldn't be needed but otherwise it wants a automatic
+ # re-autogen.
+ echo
+ echo "====== Generating configuration ======="
+ rm -f config_host.mk
+ ./debian/rules config_host.mk
+fi
+
+echo
+echo "====== Enabling core dumps ======"
+# yes, we want core dumps and stack traces
+ulimit -c unlimited || true
+
+echo
+echo "====== Generating en_US.UTF-8 locale ======"
+cd $WORKDIR
+$SRCDIR/debian/scripts/locale-gen
+
+OOO_TEST_SOFFICE="${1:-path:/usr/lib/libreoffice/program/soffice}"
+
+echo
+echo "====== Starting uicheck with ${CHECK_PARALLELISM} job against ${OOO_TEST_SOFFICE} ======"
+
+cd $SRCDIR
+export PARALLELISM=$CHECK_PARALLELISM
+export LOCPATH=$WORKDIR/debian/locales
+export LANG=en_US.UTF-8
+export LC_ALL=en_US.UTF-8
+make -rk \
+ OOO_TEST_SOFFICE=${OOO_TEST_SOFFICE} \
+ sd.uicheck verbose=t
+
+unapply
+
diff --git a/debian/tests/uicheck-sfx2 b/debian/tests/uicheck-sfx2
new file mode 100755
index 000000000..2796707a3
--- /dev/null
+++ b/debian/tests/uicheck-sfx2
@@ -0,0 +1,63 @@
+#!/bin/bash
+# autopkgtest check: Run uicheck against an installed version of LibreOffice
+# (c) 2017 Software in the Public Interest, Inc.
+# Authors: Rene Engelhard <rene@debian.org>
+
+set -e
+set -E
+
+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/uicheck-standalone.diff
+}
+
+trap "unapply" ERR
+
+echo
+echo "====== Patching the tree to build uicheck against an existing installation ======"
+patch -p1 < ./debian/tests/patches/uicheck-standalone.diff
+
+if [ ! -f config_host.mk ]; then
+ # this normally shouldn't be needed but otherwise it wants a automatic
+ # re-autogen.
+ echo
+ echo "====== Generating configuration ======="
+ rm -f config_host.mk
+ ./debian/rules config_host.mk
+fi
+
+echo
+echo "====== Enabling core dumps ======"
+# yes, we want core dumps and stack traces
+ulimit -c unlimited || true
+
+echo
+echo "====== Generating en_US.UTF-8 locale ======"
+cd $WORKDIR
+$SRCDIR/debian/scripts/locale-gen
+
+OOO_TEST_SOFFICE="${1:-path:/usr/lib/libreoffice/program/soffice}"
+
+echo
+echo "====== Starting uicheck with ${CHECK_PARALLELISM} job against ${OOO_TEST_SOFFICE} ======"
+
+cd $SRCDIR
+export PARALLELISM=$CHECK_PARALLELISM
+export LOCPATH=$WORKDIR/debian/locales
+export LANG=en_US.UTF-8
+export LC_ALL=en_US.UTF-8
+make -rk \
+ OOO_TEST_SOFFICE=${OOO_TEST_SOFFICE} \
+ sfx2.uicheck verbose=t
+
+unapply
+
diff --git a/debian/tests/uicheck-svx b/debian/tests/uicheck-svx
new file mode 100755
index 000000000..d6cc7b529
--- /dev/null
+++ b/debian/tests/uicheck-svx
@@ -0,0 +1,63 @@
+#!/bin/bash
+# autopkgtest check: Run uicheck against an installed version of LibreOffice
+# (c) 2017 Software in the Public Interest, Inc.
+# Authors: Rene Engelhard <rene@debian.org>
+
+set -e
+set -E
+
+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/uicheck-standalone.diff
+}
+
+trap "unapply" ERR
+
+echo
+echo "====== Patching the tree to build uicheck against an existing installation ======"
+patch -p1 < ./debian/tests/patches/uicheck-standalone.diff
+
+if [ ! -f config_host.mk ]; then
+ # this normally shouldn't be needed but otherwise it wants a automatic
+ # re-autogen.
+ echo
+ echo "====== Generating configuration ======="
+ rm -f config_host.mk
+ ./debian/rules config_host.mk
+fi
+
+echo
+echo "====== Enabling core dumps ======"
+# yes, we want core dumps and stack traces
+ulimit -c unlimited || true
+
+echo
+echo "====== Generating en_US.UTF-8 locale ======"
+cd $WORKDIR
+$SRCDIR/debian/scripts/locale-gen
+
+OOO_TEST_SOFFICE="${1:-path:/usr/lib/libreoffice/program/soffice}"
+
+echo
+echo "====== Starting uicheck with ${CHECK_PARALLELISM} job against ${OOO_TEST_SOFFICE} ======"
+
+cd $SRCDIR
+export PARALLELISM=$CHECK_PARALLELISM
+export LOCPATH=$WORKDIR/debian/locales
+export LANG=en_US.UTF-8
+export LC_ALL=en_US.UTF-8
+make -rk \
+ OOO_TEST_SOFFICE=${OOO_TEST_SOFFICE} \
+ svx.uicheck verbose=t
+
+unapply
+
diff --git a/debian/tests/uicheck-sw b/debian/tests/uicheck-sw
new file mode 100755
index 000000000..c054bd9fe
--- /dev/null
+++ b/debian/tests/uicheck-sw
@@ -0,0 +1,63 @@
+#!/bin/bash
+# autopkgtest check: Run uicheck against an installed version of LibreOffice
+# (c) 2017 Software in the Public Interest, Inc.
+# Authors: Rene Engelhard <rene@debian.org>
+
+set -e
+set -E
+
+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/uicheck-standalone.diff
+}
+
+trap "unapply" ERR
+
+echo
+echo "====== Patching the tree to build uicheck against an existing installation ======"
+patch -p1 < ./debian/tests/patches/uicheck-standalone.diff
+
+if [ ! -f config_host.mk ]; then
+ # this normally shouldn't be needed but otherwise it wants a automatic
+ # re-autogen.
+ echo
+ echo "====== Generating configuration ======="
+ rm -f config_host.mk
+ ./debian/rules config_host.mk
+fi
+
+echo
+echo "====== Enabling core dumps ======"
+# yes, we want core dumps and stack traces
+ulimit -c unlimited || true
+
+echo
+echo "====== Generating en_US.UTF-8 locale ======"
+cd $WORKDIR
+$SRCDIR/debian/scripts/locale-gen
+
+OOO_TEST_SOFFICE="${1:-path:/usr/lib/libreoffice/program/soffice}"
+
+echo
+echo "====== Starting uicheck with ${CHECK_PARALLELISM} job against ${OOO_TEST_SOFFICE} ======"
+
+cd $SRCDIR
+export PARALLELISM=$CHECK_PARALLELISM
+export LOCPATH=$WORKDIR/debian/locales
+export LANG=en_US.UTF-8
+export LC_ALL=en_US.UTF-8
+make -rk \
+ OOO_TEST_SOFFICE=${OOO_TEST_SOFFICE} \
+ sw.uicheck verbose=t
+
+unapply
+
diff --git a/debian/tests/uicheck-uitest b/debian/tests/uicheck-uitest
new file mode 100755
index 000000000..8128b949a
--- /dev/null
+++ b/debian/tests/uicheck-uitest
@@ -0,0 +1,63 @@
+#!/bin/bash
+# autopkgtest check: Run uicheck against an installed version of LibreOffice
+# (c) 2017 Software in the Public Interest, Inc.
+# Authors: Rene Engelhard <rene@debian.org>
+
+set -e
+set -E
+
+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/uicheck-standalone.diff
+}
+
+trap "unapply" ERR
+
+echo
+echo "====== Patching the tree to build uicheck against an existing installation ======"
+patch -p1 < ./debian/tests/patches/uicheck-standalone.diff
+
+if [ ! -f config_host.mk ]; then
+ # this normally shouldn't be needed but otherwise it wants a automatic
+ # re-autogen.
+ echo
+ echo "====== Generating configuration ======="
+ rm -f config_host.mk
+ ./debian/rules config_host.mk
+fi
+
+echo
+echo "====== Enabling core dumps ======"
+# yes, we want core dumps and stack traces
+ulimit -c unlimited || true
+
+echo
+echo "====== Generating en_US.UTF-8 locale ======"
+cd $WORKDIR
+$SRCDIR/debian/scripts/locale-gen
+
+OOO_TEST_SOFFICE="${1:-path:/usr/lib/libreoffice/program/soffice}"
+
+echo
+echo "====== Starting uicheck with ${CHECK_PARALLELISM} job against ${OOO_TEST_SOFFICE} ======"
+
+cd $SRCDIR
+export PARALLELISM=$CHECK_PARALLELISM
+export LOCPATH=$WORKDIR/debian/locales
+export LANG=en_US.UTF-8
+export LC_ALL=en_US.UTF-8
+make -rk \
+ OOO_TEST_SOFFICE=${OOO_TEST_SOFFICE} \
+ uitest.uicheck verbose=t
+
+unapply
+
diff --git a/debian/tests/uicheck-writerperfect b/debian/tests/uicheck-writerperfect
new file mode 100755
index 000000000..14fb40909
--- /dev/null
+++ b/debian/tests/uicheck-writerperfect
@@ -0,0 +1,63 @@
+#!/bin/bash
+# autopkgtest check: Run uicheck against an installed version of LibreOffice
+# (c) 2017 Software in the Public Interest, Inc.
+# Authors: Rene Engelhard <rene@debian.org>
+
+set -e
+set -E
+
+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/uicheck-standalone.diff
+}
+
+trap "unapply" ERR
+
+echo
+echo "====== Patching the tree to build uicheck against an existing installation ======"
+patch -p1 < ./debian/tests/patches/uicheck-standalone.diff
+
+if [ ! -f config_host.mk ]; then
+ # this normally shouldn't be needed but otherwise it wants a automatic
+ # re-autogen.
+ echo
+ echo "====== Generating configuration ======="
+ rm -f config_host.mk
+ ./debian/rules config_host.mk
+fi
+
+echo
+echo "====== Enabling core dumps ======"
+# yes, we want core dumps and stack traces
+ulimit -c unlimited || true
+
+echo
+echo "====== Generating en_US.UTF-8 locale ======"
+cd $WORKDIR
+$SRCDIR/debian/scripts/locale-gen
+
+OOO_TEST_SOFFICE="${1:-path:/usr/lib/libreoffice/program/soffice}"
+
+echo
+echo "====== Starting uicheck with ${CHECK_PARALLELISM} job against ${OOO_TEST_SOFFICE} ======"
+
+cd $SRCDIR
+export PARALLELISM=$CHECK_PARALLELISM
+export LOCPATH=$WORKDIR/debian/locales
+export LANG=en_US.UTF-8
+export LC_ALL=en_US.UTF-8
+make -rk \
+ OOO_TEST_SOFFICE=${OOO_TEST_SOFFICE} \
+ writerperfect.uicheck verbose=t
+
+unapply
+
diff --git a/debian/tests/unitcheck b/debian/tests/unitcheck
new file mode 100755
index 000000000..a363ec157
--- /dev/null
+++ b/debian/tests/unitcheck
@@ -0,0 +1,72 @@
+#!/bin/bash
+# autopkgtest check: Run junit base tests against an installed version of LibreOffice
+# (c) 2021 Software in the Public Interest, Inc.
+# Authors: Rene Engelhard <rene@debian.org>
+
+set -e
+set -E
+
+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() {
+ cd $SRCDIR
+ echo
+ echo "====== Unapplying the patches ======"
+ patch -p1 -R < ./debian/tests/patches/cppunit-standalone.diff
+}
+
+trap "unapply" ERR
+
+# skip if building as root:
+# fails with permission errors (seems to assume it runs as user)
+if [ `id -u` = "0" ]; then
+ exit 77
+fi
+
+echo
+echo "====== Patching the tree to only build the unittests against an existing installation ======"
+patch -p1 < ./debian/tests/patches/cppunit-standalone.diff
+
+echo
+echo "====== Enabling core dumps ======"
+# yes, we want core dumps and stack traces
+ulimit -c unlimited || true
+
+echo
+echo "====== Starting unitcheck with ${CHECK_PARALLELISM} job ======"
+
+# hack, otherwise it fails
+mkdir -p $SRCDIR/instdir/program/.dir
+mkdir -p $SRCDIR/instdir/share/registry/.dir
+mkdir -p $SRCDIR/instdir/share/registry/res/.dir
+
+mkdir -p $SRCDIR/instdir/share/filter/.dir
+
+mkdir -p $SRCDIR/instdir/share/config/soffice.cfg/vcl/ui/.dir
+
+# all modules containing unitcheck
+export PARALLELISM=$CHECK_PARALLELISM
+# helpcontent2
+# idlc - tries to *write* /usr/lib/libreoffice/sdk/bin/idlc...
+# unoidl - tries to *write* /usr/lib/libreoffice/sdk/bin/unoidl-check (and more?)...
+# odk - tries to *write* to the SDK dirs and we do test _using_ the ODK
+# in odk-build-examples anyway
+# testtools - already tested in the "uno" test
+for i in `grep check */*.mk | grep -v helpcontent2 | grep -E -v '(idlc|unoidl)' | grep -v odk | grep -v testtools | cut -d"/" -f1 | sort | uniq | xargs`; do
+ echo
+ echo "====== Running unitcheck in module $i ======"; \
+ cd $i && \
+ make -rk unitcheck \
+ INSTDIR=/usr/lib/libreoffice \
+ verbose=t; \
+ cd ..;\
+done
+
+unapply
+
diff --git a/debian/tests/uno-import b/debian/tests/uno-import
new file mode 100755
index 000000000..e36ab16f9
--- /dev/null
+++ b/debian/tests/uno-import
@@ -0,0 +1,4 @@
+#!/usr/bin/python3
+
+import uno
+print(uno)