Debian Codegraph @

debian/tests/uicheck-uitest

raw symbols SCIP
1 #!/bin/bash
2 # autopkgtest check: Run uicheck against an installed version of LibreOffice
3 # (c) 2017 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 WORKDIR=`mktemp -q -d -p $AUTOPKGTEST_TMP`
13 else
14 WORKDIR=`mktemp -q -d`
15 fi
16
17 function unapply() {
18 echo
19 echo "====== Unapplying the patch ======"
20 patch -p1 -R < ./debian/tests/patches/uicheck-standalone.diff
21 }
22
23 trap "unapply" ERR
24
25 echo
26 echo "====== Patching the tree to build uicheck against an existing installation ======"
27 patch -p1 < ./debian/tests/patches/uicheck-standalone.diff
28
29 if [ ! -f config_host.mk ]; then
30 # this normally shouldn't be needed but otherwise it wants a automatic
31 # re-autogen.
32 echo
33 echo "====== Generating configuration ======="
34 rm -f config_host.mk
35 ./debian/rules config_host.mk
36 fi
37
38 echo
39 echo "====== Enabling core dumps ======"
40 # yes, we want core dumps and stack traces
41 ulimit -c unlimited || true
42
43 echo
44 echo "====== Generating en_US.UTF-8 locale ======"
45 cd $WORKDIR
46 $SRCDIR/debian/scripts/locale-gen
47
48 OOO_TEST_SOFFICE="${1:-path:/usr/lib/libreoffice/program/soffice}"
49
50 echo
51 echo "====== Starting uicheck with ${CHECK_PARALLELISM} job against ${OOO_TEST_SOFFICE} ======"
52
53 cd $SRCDIR
54 export PARALLELISM=$CHECK_PARALLELISM
55 export LOCPATH=$WORKDIR/debian/locales
56 export LANG=en_US.UTF-8
57 export LC_ALL=en_US.UTF-8
58 make -rk \
59 OOO_TEST_SOFFICE=${OOO_TEST_SOFFICE} \
60 uitest.uicheck verbose=t
61
62 unapply
63