From 088b31deecddd24c54c61953166cf043cc1499a5 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 8 Apr 2010 21:09:57 +0200 Subject: [PATCH] Make build and install of test-plugin for regress automatic --- bacula/src/plugins/fd/Makefile.in | 5 +++++ bacula/src/plugins/fd/test-plugin-fd.c | 6 +++--- regress/tests/test-plugin-test | 6 ++++++ 3 files changed, 14 insertions(+), 3 deletions(-) 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 -- 2.39.5