From b53bfd4d41252426cb050ef896676034d92e3ef7 Mon Sep 17 00:00:00 2001 From: bescoto Date: Tue, 31 Dec 2002 08:46:22 +0000 Subject: 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 --- rdiff-backup/testing/commontest.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'rdiff-backup/testing/commontest.py') 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: -- cgit v1.2.1