4 changes: 2 additions & 2 deletions tests/test-version-plugin.sh
Expand Up @@ -43,10 +43,10 @@ do_test ()
{
vg=; [ "$NBDKIT_VALGRIND" = "1" ] && vg="-valgrind"
case "$1$vg" in
python-valgrind | ruby-valgrind | tcl-valgrind)
python-valgrind | ruby-valgrind | tar-valgrind | tcl-valgrind)
echo "$0: skipping $1$vg because this language doesn't support valgrind"
;;
example4* | tar*)
example4*)
# These tests are written in Perl so we have to check that
# the Perl plugin was compiled.
if nbdkit perl --version; then run_test $1; fi
Expand Down
21 changes: 17 additions & 4 deletions wrapper.c
Expand Up @@ -78,14 +78,20 @@
static const char **cmd;
static size_t len;

/* Plugins written in scripting languages (only Perl right now) need
* to be rewritten on the command line in a different way from plugins
* written in C. So we have to list those here.
/* Plugins written in scripting languages need to be rewritten on the
* command line in a different way from plugins written in C. So we
* have to list those here.
*/
static bool
is_perl_plugin (const char *name)
{
return strcmp (name, "example4") == 0 || strcmp (name, "tar") == 0;
return strcmp (name, "example4") == 0;
}

static bool
is_python_plugin (const char *name)
{
return strcmp (name, "tar") == 0;
}

static void
Expand Down Expand Up @@ -263,6 +269,13 @@ main (int argc, char *argv[])
passthru_format ("%s/plugins/%s/nbdkit-%s-plugin",
builddir, argv[optind], argv[optind]);
}
/* Special plugins written in Python. */
else if (is_python_plugin (argv[optind])) {
passthru_format ("%s/plugins/python/.libs/nbdkit-python-plugin.so",
builddir);
passthru_format ("%s/plugins/%s/nbdkit-%s-plugin",
builddir, argv[optind], argv[optind]);
}
else {
passthru_format ("%s/plugins/%s/.libs/nbdkit-%s-plugin.so",
builddir, argv[optind], argv[optind]);
Expand Down