From: Kern Sibbald Date: Thu, 8 Apr 2010 19:09:57 +0000 (+0200) Subject: Make build and install of test-plugin for regress automatic X-Git-Tag: Release-5.2.1~1502 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=352f80e6810e6e4cdbe7258aeb693cf0ad8c6d66;p=bacula%2Fbacula Make build and install of test-plugin for regress automatic --- diff --git a/bacula/src/plugins/fd/Makefile.in b/bacula/src/plugins/fd/Makefile.in index 2c5b47a593..83800a91aa 100644 --- a/bacula/src/plugins/fd/Makefile.in +++ b/bacula/src/plugins/fd/Makefile.in @@ -35,6 +35,11 @@ install: all $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bpipe-fd.la $(DESTDIR)$(plugindir) $(RMF) $(DESTDIR)$(plugindir)/bpipe-fd.la +install-test-plugin: all + $(MKDIR) $(DESTDIR)$(plugindir) + $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) test-plugin-fd.la $(DESTDIR)$(plugindir) + $(RMF) $(DESTDIR)$(plugindir)/test-plugin-fd.la + libtool-clean: @find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF) @$(RMF) *.la diff --git a/bacula/src/plugins/fd/test-plugin-fd.c b/bacula/src/plugins/fd/test-plugin-fd.c index 051a669f8f..358352641b 100644 --- a/bacula/src/plugins/fd/test-plugin-fd.c +++ b/bacula/src/plugins/fd/test-plugin-fd.c @@ -219,17 +219,17 @@ static bRC handlePluginEvent(bpContext *ctx, bEvent *event, void *value) switch (event->eventType) { case bEventJobStart: bfuncs->DebugMessage(ctx, fi, li, dbglvl, "test-plugin-fd: JobStart=%s\n", (char *)value); -// bfuncs->AddExclude(ctx, "/home/kern/bacula/regress/README"); break; case bEventJobEnd: - case bEventStartBackupJob: case bEventEndBackupJob: case bEventLevel: case bEventSince: case bEventStartRestoreJob: case bEventEndRestoreJob: break; - + case bEventStartBackupJob: + bfuncs->AddExclude(ctx, "/home/kern/bacula/regress/README"); + break; /* Plugin command e.g. plugin = ::read command:write command */ case bEventRestoreCommand: /* Fall-through wanted */ diff --git a/regress/tests/test-plugin-test b/regress/tests/test-plugin-test index 3327ff1bb9..509a6173db 100755 --- a/regress/tests/test-plugin-test +++ b/regress/tests/test-plugin-test @@ -8,6 +8,12 @@ TestName="test-plugin-test" JobName=TestPluginTest . scripts/functions +# Build and install the test plugin +cd ${cwd}/build/src/plugins/fd +make +make install-test-plugin +cd ${cwd} + scripts/cleanup scripts/copy-plugin-confs file=encrypt-bug.jpg