summaryrefslogtreecommitdiffstats
path: root/debian/tests/odk-build-examples
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:55:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:55:35 +0000
commit0e05dd0e4d67d88ca51780dafe4029744269e6fa (patch)
treeb49073fa569d8d4fbcc7002cf4df72fa840780c1 /debian/tests/odk-build-examples
parentAdding upstream version 4:24.2.0. (diff)
downloadlibreoffice-0e05dd0e4d67d88ca51780dafe4029744269e6fa.tar.xz
libreoffice-0e05dd0e4d67d88ca51780dafe4029744269e6fa.zip
Adding debian version 4:24.2.0-1.debian/4%24.2.0-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/odk-build-examples')
-rwxr-xr-xdebian/tests/odk-build-examples50
1 files changed, 50 insertions, 0 deletions
diff --git a/debian/tests/odk-build-examples b/debian/tests/odk-build-examples
new file mode 100755
index 0000000000..6a8e522963
--- /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
+