Debian Codegraph @

debian/tests/testtools-bridgetest-with-java

raw
1 #!/bin/bash
2 # autopkgtest check: Run UNO tests against an installed version of the URE
3 # (c) 2018 Software in the Public Interest, Inc.
4 # Authors: Rene Engelhard <[email protected]>
5
6 set -e
7 set -E
8
9 SRCDIR=`pwd`
10 CHECK_PARALLELISM=1
11 if [ -n "$AUTOPKGTEST_TMP" ]; then
12 TMP=`mktemp -q -p $AUTOPKGTEST_TMP`
13 WORKDIR=`mktemp -q -d -p $AUTOPKGTEST_TMP`
14 else
15 TMP=`mktemp -q`
16 WORKDIR=`mktemp -q -d`
17 fi
18
19 function unapply() {
20 cd $SRCDIR
21 echo
22 echo "====== Unapplying the patches ======"
23 patch -p1 -R < ./debian/tests/patches/testtools-standalone.diff
24 }
25
26 trap "unapply" ERR
27
28 echo
29 echo "====== Patching the tree to only build the testtools unittest against an existing installation ======"
30 patch -p1 < ./debian/tests/patches/testtools-standalone.diff
31
32 echo
33 echo "====== Enabling core dumps ======"
34 # yes, we want core dumps and stack traces
35 ulimit -c unlimited || true
36
37 if [ ! -f config_host.mk ] || grep -q ENABLE_JAVA=$ config_host.mk; then
38 # this normally shouldn't be needed but otherwise it wants a automatic
39 # re-autogen.
40 echo
41 echo "====== Generating configuration ======="
42 rm -f config_host.mk
43 ./debian/rules config_host.mk ENABLE_PDFIUM=n ENABLE_MERGELIBS=n BUILD_GTK=n BUILD_GTK3=n BUILD_KDE=n
44 fi
45
46 echo
47 echo "====== Starting uno test with ${CHECK_PARALLELISM} job against /usr/lib/libreoffice/program/uno ======"
48
49 export PARALLELISM=$CHECK_PARALLELISM
50
51 export LD_LIBRARY_PATH=/usr/lib/libreoffice/program:$LD_LIBRARY_PATH
52 make testtools.allcheck verbose=t
53
54 cd $SRCDIR
55
56 unapply
57