summaryrefslogtreecommitdiff
path: root/test/bbackupd/testfiles/extcheck1.pl.in
diff options
context:
space:
mode:
Diffstat (limited to 'test/bbackupd/testfiles/extcheck1.pl.in')
-rwxr-xr-xtest/bbackupd/testfiles/extcheck1.pl.in58
1 files changed, 58 insertions, 0 deletions
diff --git a/test/bbackupd/testfiles/extcheck1.pl.in b/test/bbackupd/testfiles/extcheck1.pl.in
new file mode 100755
index 00000000..5b70c677
--- /dev/null
+++ b/test/bbackupd/testfiles/extcheck1.pl.in
@@ -0,0 +1,58 @@
+#!@PERL@
+use strict;
+
+my $flags = $ARGV[0] or "";
+
+unless(open IN,"../../bin/bbackupquery/bbackupquery -Wwarning " .
+ "-c testfiles/bbackupd.conf " .
+ "-l testfiles/query4.log " .
+ "\"compare -ac$flags\" quit 2>&1 |")
+{
+ print "FAIL: opening compare utility\n";
+ exit 2;
+}
+
+my $ret = 1;
+my $seen = 0;
+
+while(<IN>)
+{
+ next unless m/\S/;
+ print "READ: $_";
+
+ if (m/continousupdate/)
+ {
+ unless (/exists/)
+ {
+ print "FAIL: continousupdate line does not match\n";
+ $ret = 2;
+ }
+ $seen = 1;
+ }
+ elsif (m/^No entry for terminal type/ or
+ m/^using dumb terminal settings/)
+ {
+ # skip these lines, may happen in Debian buildd
+ # with no terminal.
+ }
+ else
+ {
+ unless (/\AWARNING/ or /\ADifferences/ or /might be reason/
+ or /probably due to file mod/)
+ {
+ print "FAIL: Summary line does not match\n";
+ $ret = 2;
+ }
+ }
+}
+
+close IN;
+
+unless ($seen)
+{
+ print "FAIL: missing line matching continousupdate\n";
+ $ret = 2;
+}
+
+exit $ret;
+