diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-12-31 08:46:22 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-12-31 08:46:22 +0000 |
commit | b53bfd4d41252426cb050ef896676034d92e3ef7 (patch) | |
tree | 5d03aedc0a408da049390e8e9d8a7d28ad596c49 /rdiff-backup/testing/commontest.py | |
parent | c08ca27a381443d6e72ee8d16269e5a535df58d1 (diff) | |
download | rdiff-backup-b53bfd4d41252426cb050ef896676034d92e3ef7.tar.gz |
Various changes for v0.11.1 (see CHANGELOG)
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@256 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/testing/commontest.py')
-rw-r--r-- | rdiff-backup/testing/commontest.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/rdiff-backup/testing/commontest.py b/rdiff-backup/testing/commontest.py index 19b2c60..dae825a 100644 --- a/rdiff-backup/testing/commontest.py +++ b/rdiff-backup/testing/commontest.py @@ -3,7 +3,7 @@ import os, sys from rdiff_backup.log import Log from rdiff_backup.rpath import RPath from rdiff_backup import Globals, Hardlink, SetConnections, Main, \ - selection, highlevel, lazy, Time, rpath + selection, lazy, Time, rpath SourceDir = "../src" AbsCurdir = os.getcwd() # Absolute path name of current directory @@ -13,6 +13,9 @@ __no_execute__ = 1 # Keeps the actual rdiff-backup program from running def Myrm(dirstring): """Run myrm on given directory string""" + root_rp = rpath.RPath(Globals.local_connection, dirstring) + for rp in selection.Select(root_rp).set_iter(): + if rp.isdir(): rp.chmod(0700) # otherwise may not be able to remove assert not os.system("rm -rf %s" % (dirstring,)) def Make(): @@ -21,6 +24,13 @@ def Make(): os.system("python ./Make") os.chdir(AbsCurdir) +def MakeOutputDir(): + """Initialize the testfiles/output directory""" + Myrm("testfiles/output") + rp = rpath.RPath(Globals.local_connection, "testfiles/output") + rp.mkdir() + return rp + def rdiff_backup(source_local, dest_local, src_dir, dest_dir, current_time = None, extra_options = ""): """Run rdiff-backup with the given options @@ -121,6 +131,7 @@ def InternalRestore(mirror_local, dest_local, mirror_dir, dest_dir, time): the testing directory and will be modified for remote trials. """ + Main.force = 1 remote_schema = '%s' #_reset_connections() if not mirror_local: |