summaryrefslogtreecommitdiff
path: root/test/bbackupd
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2009-03-31 15:58:19 +0200
committerReinhard Tartler <siretart@tauware.de>2009-03-31 15:58:19 +0200
commit25db897553a0db0f912602b375029e724f51556e (patch)
tree613c8c23e22481e31a4d2f474e022ad87728da24 /test/bbackupd
parent2787035d98661881477d696403ca2a78b49322d5 (diff)
Import upstream version 0.11~rc2+r2072
Diffstat (limited to 'test/bbackupd')
-rw-r--r--test/bbackupd/testbbackupd.cpp39
-rw-r--r--test/bbackupd/testextra39
-rwxr-xr-xtest/bbackupd/testfiles/bbackupd.conf54
-rwxr-xr-xtest/bbackupd/testfiles/extcheck1.pl90
-rwxr-xr-xtest/bbackupd/testfiles/extcheck2.pl86
-rwxr-xr-xtest/bbackupd/testfiles/notifyscript.pl54
-rwxr-xr-xtest/bbackupd/testfiles/syncallowscript.pl72
7 files changed, 0 insertions, 434 deletions
diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp
index e68f4682..a0732c21 100644
--- a/test/bbackupd/testbbackupd.cpp
+++ b/test/bbackupd/testbbackupd.cpp
@@ -1,42 +1,3 @@
-// distribution boxbackup-0.11rc2 (svn version: 2072)
-//
-// Copyright (c) 2003 - 2008
-// Ben Summers and contributors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-// 3. All use of this software and associated advertising materials must
-// display the following acknowledgment:
-// This product includes software developed by Ben Summers.
-// 4. The names of the Authors may not be used to endorse or promote
-// products derived from this software without specific prior written
-// permission.
-//
-// [Where legally impermissible the Authors do not disclaim liability for
-// direct physical injury or death caused solely by defects in the software
-// unless it is modified by a third party.]
-//
-// THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
-// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT,
-// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-//
-//
// --------------------------------------------------------------------------
//
// File
diff --git a/test/bbackupd/testextra b/test/bbackupd/testextra
index 780d335f..798c8c67 100644
--- a/test/bbackupd/testextra
+++ b/test/bbackupd/testextra
@@ -1,42 +1,3 @@
-# distribution boxbackup-0.11rc2 (svn version: 2072)
-#
-# Copyright (c) 2003 - 2008
-# Ben Summers and contributors. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All use of this software and associated advertising materials must
-# display the following acknowledgment:
-# This product includes software developed by Ben Summers.
-# 4. The names of the Authors may not be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# [Where legally impermissible the Authors do not disclaim liability for
-# direct physical injury or death caused solely by defects in the software
-# unless it is modified by a third party.]
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-#
-#
mkdir testfiles/0_0
mkdir testfiles/0_1
mkdir testfiles/0_2
diff --git a/test/bbackupd/testfiles/bbackupd.conf b/test/bbackupd/testfiles/bbackupd.conf
deleted file mode 100755
index 643978f2..00000000
--- a/test/bbackupd/testfiles/bbackupd.conf
+++ /dev/null
@@ -1,54 +0,0 @@
-
-CertificateFile = testfiles/clientCerts.pem
-PrivateKeyFile = testfiles/clientPrivKey.pem
-TrustedCAsFile = testfiles/clientTrustedCAs.pem
-
-KeysFile = testfiles/bbackupd.keys
-
-DataDirectory = testfiles/bbackupd-data
-
-StoreHostname = localhost
-AccountNumber = 0x01234567
-
-UpdateStoreInterval = 3
-MinimumFileAge = 4
-MaxUploadWait = 24
-DeleteRedundantLocationsAfter = 10
-
-FileTrackingSizeThreshold = 1024
-DiffingUploadSizeThreshold = 1024
-
-MaximumDiffingTime = 3
-KeepAliveTime = 1
-
-ExtendedLogging = no
-ExtendedLogFile = testfiles/bbackupd.log
-
-CommandSocket = testfiles/bbackupd.sock
-
-NotifyScript = /usr/bin/perl testfiles/notifyscript.pl
-SyncAllowScript = /usr/bin/perl testfiles/syncallowscript.pl
-
-Server
-{
- PidFile = testfiles/bbackupd.pid
-}
-
-BackupLocations
-{
- Test1
- {
- Path = testfiles/TestDir1
-
- ExcludeFile = testfiles/TestDir1/excluded_1
- ExcludeFile = testfiles/TestDir1/excluded_2
- ExcludeFilesRegex = \.excludethis$
- ExcludeFilesRegex = EXCLUDE
- AlwaysIncludeFile = testfiles/TestDir1/dont.excludethis
- ExcludeDir = testfiles/TestDir1/exclude_dir
- ExcludeDir = testfiles/TestDir1/exclude_dir_2
- ExcludeDirsRegex = not_this_dir
- AlwaysIncludeDirsRegex = ALWAYSINCLUDE
- }
-}
-
diff --git a/test/bbackupd/testfiles/extcheck1.pl b/test/bbackupd/testfiles/extcheck1.pl
deleted file mode 100755
index 5fc4013a..00000000
--- a/test/bbackupd/testfiles/extcheck1.pl
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/usr/bin/perl
-# distribution boxbackup-0.11rc2 (svn version: 2072)
-#
-# Copyright (c) 2003 - 2008
-# Ben Summers and contributors. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All use of this software and associated advertising materials must
-# display the following acknowledgment:
-# This product includes software developed by Ben Summers.
-# 4. The names of the Authors may not be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# [Where legally impermissible the Authors do not disclaim liability for
-# direct physical injury or death caused solely by defects in the software
-# unless it is modified by a third party.]
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-#
-#
-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;
-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;
-
-$ret = 2 unless $seen;
-
-exit $ret;
-
diff --git a/test/bbackupd/testfiles/extcheck2.pl b/test/bbackupd/testfiles/extcheck2.pl
deleted file mode 100755
index 9e3a9c48..00000000
--- a/test/bbackupd/testfiles/extcheck2.pl
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/perl
-# distribution boxbackup-0.11rc2 (svn version: 2072)
-#
-# Copyright (c) 2003 - 2008
-# Ben Summers and contributors. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All use of this software and associated advertising materials must
-# display the following acknowledgment:
-# This product includes software developed by Ben Summers.
-# 4. The names of the Authors may not be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# [Where legally impermissible the Authors do not disclaim liability for
-# direct physical injury or death caused solely by defects in the software
-# unless it is modified by a third party.]
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-#
-#
-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(<IN>)
-{
- 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;
-
diff --git a/test/bbackupd/testfiles/notifyscript.pl b/test/bbackupd/testfiles/notifyscript.pl
deleted file mode 100755
index 5f726ca8..00000000
--- a/test/bbackupd/testfiles/notifyscript.pl
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/perl
-# distribution boxbackup-0.11rc2 (svn version: 2072)
-#
-# Copyright (c) 2003 - 2008
-# Ben Summers and contributors. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All use of this software and associated advertising materials must
-# display the following acknowledgment:
-# This product includes software developed by Ben Summers.
-# 4. The names of the Authors may not be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# [Where legally impermissible the Authors do not disclaim liability for
-# direct physical injury or death caused solely by defects in the software
-# unless it is modified by a third party.]
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-#
-#
-
-
-my $f = 'testfiles/notifyran.'.$ARGV[0].'.';
-my $n = 1;
-
-while(-e $f.$n)
-{
- $n ++;
-}
-
-open FL,'>'.$f.$n;
-print FL localtime();
-close FL;
-
diff --git a/test/bbackupd/testfiles/syncallowscript.pl b/test/bbackupd/testfiles/syncallowscript.pl
deleted file mode 100755
index ae5e10ee..00000000
--- a/test/bbackupd/testfiles/syncallowscript.pl
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/usr/bin/perl
-# distribution boxbackup-0.11rc2 (svn version: 2072)
-#
-# Copyright (c) 2003 - 2008
-# Ben Summers and contributors. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All use of this software and associated advertising materials must
-# display the following acknowledgment:
-# This product includes software developed by Ben Summers.
-# 4. The names of the Authors may not be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# [Where legally impermissible the Authors do not disclaim liability for
-# direct physical injury or death caused solely by defects in the software
-# unless it is modified by a third party.]
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-#
-#
-
-use strict;
-use warnings;
-
-my $control_file = 'testfiles/syncallowscript.control';
-if (! -r $control_file)
-{
- print "now\n";
- exit 0;
-}
-
-my $control_state;
-open CONTROL, "< $control_file" or die "$control_file: $!";
-$control_state = <CONTROL>;
-defined $control_state or die "$control_file: read failed: $!";
-close CONTROL;
-
-my $marker_file_root = 'testfiles/syncallowscript.notifyran.';
-my $n = 1;
-my $marker_file;
-
-while($marker_file = $marker_file_root.$n and -e $marker_file)
-{
- $n ++;
-}
-
-open FL,'>'.$marker_file or die "$marker_file: $!";
-print FL localtime();
-close FL;
-
-print $control_state;
-exit 0;