]> git.sur5r.net Git - bacula/bacula/commitdiff
Make build and install of test-plugin for regress automatic
authorKern Sibbald <kern@sibbald.com>
Thu, 8 Apr 2010 19:09:57 +0000 (21:09 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 2 Aug 2010 14:50:30 +0000 (16:50 +0200)
bacula/src/plugins/fd/Makefile.in
bacula/src/plugins/fd/test-plugin-fd.c
regress/tests/test-plugin-test

index 2c5b47a5935e760a474fe68cb2a4075b00ff6c97..83800a91aad911f6b930d9fd1a0c5a5e4134e6f7 100644 (file)
@@ -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
index 051a669f8fad7b6c099d9360010acca64c1d02c6..358352641b2b8b72f226f76725b2b5c50542b4da 100644 (file)
@@ -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 = <plugin-name>:<name-space>:read command:write command */
    case bEventRestoreCommand:
       /* Fall-through wanted */
index 3327ff1bb9dea02017d600b68ba230c557492bc9..509a6173dbe23dd0dd25331a0ac6aece06a9e32e 100755 (executable)
@@ -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