#!@PERL@ use strict; my $flags = $ARGV[0] or ""; unless(open IN,"../../bin/bbackupquery/bbackupquery -q -c testfiles/bbackupd.conf -l testfiles/query4.log \"compare -ac$flags\" quit 2>&1 |") { print "Couldn't open compare utility\n"; exit 2; } my $ret = 1; while() { next unless m/\S/; print "READ: $_"; if (m/continousupdate/) { unless (m/contents/ or m/attributes/) { print "FAIL: continuousupdate line does not match\n"; $ret = 2; } } 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; exit $ret;