summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-05-28 09:41:32 +0000
committerChris Wilson <chris+github@qwirx.com>2008-05-28 09:41:32 +0000
commit4a061582e4fa565e668dc3bf1b8535fa8bae3766 (patch)
treec409757c63fe79b9641f4c723a8cfcfdad818b9e
parentbce3067e26a24700ce54749e5500edb4720328cf (diff)
Add support to notifyscript to use a tag, useful for tests with
frequently-generated messages such as backup-start.
-rwxr-xr-xtest/bbackupd/testfiles/notifyscript.pl.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/bbackupd/testfiles/notifyscript.pl.in b/test/bbackupd/testfiles/notifyscript.pl.in
index 89741e46..d3e324e9 100755
--- a/test/bbackupd/testfiles/notifyscript.pl.in
+++ b/test/bbackupd/testfiles/notifyscript.pl.in
@@ -1,7 +1,16 @@
#!@TARGET_PERL@
-
my $f = 'testfiles/notifyran.'.$ARGV[0].'.';
+
+if (-e 'testfiles/notifyscript.tag')
+{
+ open FILE, '< testfiles/notifyscript.tag' or die $!;
+ my $tag = <FILE>;
+ chomp $tag;
+ $f .= "$tag.";
+ close FILE;
+}
+
my $n = 1;
while(-e $f.$n)