summaryrefslogtreecommitdiff
path: root/test/bbackupd/testfiles/extcheck1.pl
blob: 7481593dac19c5000bca1c8ee5d56ac254e63d0e (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
30
31
32
33
#!/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;
my $seen = 0;

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

close IN;

$ret = 2 unless $seen;

exit $ret;