fwupd/contrib/debian/fwupd-tests.postinst
Richard Hughes 297d1598ef trivial: Only dlopen the test plugin once
This causes problems in the self tests when not lazy-loading symbols.

Also use g_build_filename() for the paths to be more portable and readable.
2019-12-01 20:59:19 +00:00

24 lines
596 B
Bash

#!/bin/sh
set -e
#DEBHELPER#
#only enable on installation not upgrade
if [ "$1" = configure ] && [ -z "$2" ]; then
if [ -f /etc/fwupd/daemon.conf ]; then
if [ "$CI" = "true" ]; then
sed "s,^BlacklistPlugins=test;invalid,BlacklistPlugins=," -i /etc/fwupd/daemon.conf
else
echo "To enable test suite, modify /etc/fwupd/daemon.conf"
fi
fi
if [ -f /etc/fwupd/remotes.d/fwupd-tests.conf ]; then
if [ "$CI" = "true" ]; then
sed "s,^Enabled=false,Enabled=true," -i /etc/fwupd/remotes.d/fwupd-tests.conf
else
echo "To enable test suite, enable fwupd-tests remote"
fi
fi
fi