diff options
Diffstat (limited to 'test/bbackupd')
-rw-r--r-- | test/bbackupd/testbbackupd.cpp | 2 | ||||
-rw-r--r-- | test/bbackupd/testfiles/bbackupd.conf.in (renamed from test/bbackupd/testfiles/bbackupd.conf) | 0 | ||||
-rwxr-xr-x | test/bbackupd/testfiles/extcheck1.pl.in | 19 | ||||
-rwxr-xr-x | test/bbackupd/testfiles/extcheck2.pl.in | 20 |
4 files changed, 32 insertions, 9 deletions
diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp index 51047177..7207680a 100644 --- a/test/bbackupd/testbbackupd.cpp +++ b/test/bbackupd/testbbackupd.cpp @@ -718,7 +718,7 @@ int test_bbackupd() // Wait and test... wait_for_backup_operation(); compareReturnValue = ::system("../../bin/bbackupquery/bbackupquery -q -c testfiles/bbackupd.conf -l testfiles/query3e.log \"compare -ac\" quit"); - TEST_THAT(compareReturnValue == 2*256); // should find differences + TEST_THAT(compareReturnValue == 3*256); // should find differences TestRemoteProcessMemLeaks("bbackupquery.memleaks"); // Check that it was reported correctly TEST_THAT(TestFileExists("testfiles/notifyran.read-error.1")); diff --git a/test/bbackupd/testfiles/bbackupd.conf b/test/bbackupd/testfiles/bbackupd.conf.in index 6d381d5b..6d381d5b 100644 --- a/test/bbackupd/testfiles/bbackupd.conf +++ b/test/bbackupd/testfiles/bbackupd.conf.in diff --git a/test/bbackupd/testfiles/extcheck1.pl.in b/test/bbackupd/testfiles/extcheck1.pl.in index edbacd0a..955515b9 100755 --- a/test/bbackupd/testfiles/extcheck1.pl.in +++ b/test/bbackupd/testfiles/extcheck1.pl.in @@ -1,7 +1,9 @@ #!@PERL@ use strict; -unless(open IN,"../../bin/bbackupquery/bbackupquery -q -c testfiles/bbackupd.conf -l testfiles/query4.log \"compare -ac\" quit|") +my $flags = $ARGV[0] or ""; + +unless(open IN,"../../bin/bbackupquery/bbackupquery -q -c testfiles/bbackupd.conf -l testfiles/query4.log \"compare -ac$flags\" quit|") { print "Couldn't open compare utility\n"; exit 2; @@ -15,14 +17,23 @@ while(<IN>) next unless m/\S/; if(m/continousupdate/) { - $ret = 2 unless m/exists/; + unless (/exists/) + { + print "FAIL: continousupdate line does not match\n"; + $ret = 2; + } $seen = 1; } else { - $ret = 2 unless m/\AWARNING/ || m/\ADifferences/ || /might be reason/ || /probably due to file mod/; + unless (/\AWARNING/ or /\ADifferences/ or /might be reason/ + or /probably due to file mod/) + { + print "FAIL: Summary line does not match\n"; + $ret = 2; + } } - print; + print "READ: $_"; } close IN; diff --git a/test/bbackupd/testfiles/extcheck2.pl.in b/test/bbackupd/testfiles/extcheck2.pl.in index 68baa045..bfa6f253 100755 --- a/test/bbackupd/testfiles/extcheck2.pl.in +++ b/test/bbackupd/testfiles/extcheck2.pl.in @@ -1,7 +1,9 @@ #!@PERL@ use strict; -unless(open IN,"../../bin/bbackupquery/bbackupquery -q -c testfiles/bbackupd.conf -l testfiles/query4.log \"compare -ac\" quit|") +my $flags = $ARGV[0] or ""; + +unless(open IN,"../../bin/bbackupquery/bbackupquery -q -c testfiles/bbackupd.conf -l testfiles/query4.log \"compare -ac$flags\" quit|") { print "Couldn't open compare utility\n"; exit 2; @@ -14,13 +16,23 @@ while(<IN>) next unless m/\S/; if(m/continousupdate/) { - $ret = 2 unless m/contents/ || m/attributes/; + unless (m/contents/ or m/attributes/) + { + print "FAIL: continuousupdate line does not match\n"; + $ret = 2; + } } else { - $ret = 2 unless m/\AWARNING/ || m/\ADifferences/ || /might be reason/ || /probably due to file mod/; + unless (/\AWARNING/ or /\ADifferences/ or /might be reason/ + or /probably due to file mod/) + { + print "FAIL: summary line does not match\n"; + $ret = 2; + } } - print; + + print "READ: $_"; } close IN; |