| 1 |
#!/bin/bash |
| 2 |
# autopkgtest check: Install a test extension shared |
| 3 |
# (c) 2017 Software in the Public Interest, Inc. |
| 4 |
# Authors: Rene Engelhard <[email protected]> |
| 5 |
|
| 6 |
set -e |
| 7 |
set -E |
| 8 |
|
| 9 |
if [ -n "$AUTOPKGTEST_TMP" ]; then |
| 10 |
TMP=`mktemp -q -p $AUTOPKGTEST_TMP` |
| 11 |
else |
| 12 |
TMP=`mktemp -q` |
| 13 |
fi |
| 14 |
|
| 15 |
|
| 16 |
echo |
| 17 |
echo "====== Add the extension ======" |
| 18 |
# does it install fine? |
| 19 |
unopkg add --shared -v /usr/share/libreoffice/TestExtension.oxt |
| 20 |
|
| 21 |
echo |
| 22 |
echo "====== Show extension status ======" |
| 23 |
# does it list? For whatever reason unopkg leaves a stale .lock behind when |
| 24 |
# doing this grep directly on the output so do it on a tmpfile |
| 25 |
unopkg list --shared | tee $TMP |
| 26 |
grep -q org.libreoffice.smoketest.TestExtension $TMP || exit 1 |
| 27 |
rm $TMP |
| 28 |
|
| 29 |
echo |
| 30 |
echo "====== Remove the extension ======" |
| 31 |
# does it remove? |
| 32 |
unopkg remove --shared -v org.libreoffice.smoketest.TestExtension |
| 33 |
|
| 34 |
|