lintian doesn't like orphan packages with uploaders...
[debian/amanda] / installcheck / pp-scripts.pl
index ee0ea9ac29ad5e3f274f71472a70f6486466282a..1e13355192c5bc587f228d9c84131d93a207fb16 100644 (file)
@@ -1,8 +1,9 @@
-# Copyright (c) 2008,2009 Zmanda, Inc.  All Rights Reserved.
+# Copyright (c) 2008-2012 Zmanda, Inc.  All Rights Reserved.
 #
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 as published
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -140,6 +141,24 @@ localhost diskname2 $diskname {
     }
     script {
        plugin "amlog-script"
+       single-execution yes
+       execute-where server
+       execute-on pre-host-amcheck, post-host-amcheck, pre-host-estimate, post-host-estimate, pre-host-backup, post-host-backup
+       property "logfile" "$templog"
+    }
+}
+EODLE
+$testconf->add_dle(<<EODLE);
+localhost diskname3 $diskname {
+    installcheck-test
+    program "APPLICATION"
+    application {
+       plugin "amgtar"
+       property "atime-preserve" "no"
+    }
+    script {
+       plugin "amlog-script"
+       single-execution yes
        execute-where server
        execute-on pre-host-amcheck, post-host-amcheck, pre-host-estimate, post-host-estimate, pre-host-backup, post-host-backup
        property "logfile" "$templog"
@@ -152,8 +171,8 @@ unlink $templog;
 ok(run('amcheck', '-c', 'TESTCONF'), "amcheck runs successfully for server scripts.");
 
 verify_log("amcheck invokes correct script commands",
-    "check TESTCONF pre-host-amcheck server localhost diskname2 $diskname",
-    "check TESTCONF post-host-amcheck server localhost diskname2 $diskname",
+    "check TESTCONF pre-host-amcheck server localhost diskname3 $diskname",
+    "check TESTCONF post-host-amcheck server localhost diskname3 $diskname",
 );
 
 unlink $templog;
@@ -161,10 +180,10 @@ ok(run('amdump', 'TESTCONF'), "amdump runs successfully for server scripts.")
     or amdump_diag();
 
 verify_log("amdump invokes correct script commands",
-    "estimate TESTCONF pre-host-estimate server localhost diskname2 $diskname 0",
-    "estimate TESTCONF post-host-estimate server localhost diskname2 $diskname 0",
-    "backup TESTCONF pre-host-backup server localhost diskname2 $diskname",
-    "backup TESTCONF post-host-backup server localhost diskname2 $diskname",
+    "estimate TESTCONF pre-host-estimate server localhost diskname3 $diskname",
+    "estimate TESTCONF post-host-estimate server localhost diskname3 $diskname",
+    "backup TESTCONF pre-host-backup server localhost diskname3 $diskname",
+    "backup TESTCONF post-host-backup server localhost diskname3 $diskname",
 );
 
 unlink $templog;