tests/functional: support loading (contributed) plugins
This is useful to test extended features in Lix. Change-Id: Idb2416a080329116677809b883950e6c33028a44 Signed-off-by: Raito Bezarius <raito@lix.systems>
This commit is contained in:
@@ -251,6 +251,21 @@ runinpty() {
|
||||
@python@ @runinpty@ "$@"
|
||||
}
|
||||
|
||||
# Add a plugin to `plugin-files` configuration.
|
||||
loadPlugin() {
|
||||
local plugin_path="$1"
|
||||
sed -i 's|plugin-files .*|& '"$plugin_path"'|' "$NIX_CONF_DIR"/nix.conf
|
||||
}
|
||||
|
||||
loadContribPlugin() {
|
||||
local plugin_name="$1"
|
||||
libext=so
|
||||
if [[ "$(uname -s)" == Darwin ]]; then
|
||||
libext=dylib
|
||||
fi
|
||||
loadPlugin "$MESON_BUILD_ROOT/contrib/plugins/libplugin_$plugin_name.$libext"
|
||||
}
|
||||
|
||||
set -x
|
||||
|
||||
onError() {
|
||||
|
||||
@@ -27,6 +27,7 @@ gc-reserved-space = 0
|
||||
substituters =
|
||||
flake-registry = $TEST_ROOT/registry.json
|
||||
show-trace = true
|
||||
plugin-files =
|
||||
include nix.conf.extra
|
||||
trusted-users = $(whoami || id -u)
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user