summaryrefslogtreecommitdiff
path: root/test/bbackupd/testfiles/extcheck2.pl
blob: a0c7d3cdd3da190472940e8279258e7f407be6da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/perl
use strict;

unless(open IN,"../../bin/bbackupquery/bbackupquery -q -c testfiles/bbackupd.conf -l testfiles/query4.log \"compare -ac\" quit|")
{
	print "Couldn't open compare utility\n";
	exit 2;
}

my $ret = 1;

while(<IN>)
{
	next unless m/\S/;
	if(m/continousupdate/)
	{
		$ret = 2 unless m/contents/ || m/attributes/;
	}
	else
	{
		$ret = 2 unless m/\AWARNING/ || m/\ADifferences/ || /might be reason/ || /probably due to file mod/;
	}
	print;
}

close IN;

exit $ret;