summaryrefslogtreecommitdiff
path: root/rdiff-backup/testing/chdir-wrapper
diff options
context:
space:
mode:
authorben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-03-21 07:22:43 +0000
committerben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-03-21 07:22:43 +0000
commit8c37a5bdfdd46d5cfad6e9d67925ddef9ca382bf (patch)
tree8f19be83962ef31d8ad58429d575c6f17d89c0ea /rdiff-backup/testing/chdir-wrapper
parent8259a0d8a9ad1396a93cd6320943dc33446ac6ed (diff)
downloadrdiff-backup-8c37a5bdfdd46d5cfad6e9d67925ddef9ca382bf.tar.gz
First checkin
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@2 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/testing/chdir-wrapper')
-rwxr-xr-xrdiff-backup/testing/chdir-wrapper15
1 files changed, 15 insertions, 0 deletions
diff --git a/rdiff-backup/testing/chdir-wrapper b/rdiff-backup/testing/chdir-wrapper
new file mode 100755
index 0000000..413fcf2
--- /dev/null
+++ b/rdiff-backup/testing/chdir-wrapper
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+
+"""Used to emulate a remote connection by changing directories.
+
+If given an argument, will change to that directory, and then start
+the server. Otherwise will start the server without a chdir.
+
+"""
+
+execfile("commontest.py")
+rbexec("setconnections.py")
+
+if len(sys.argv) > 1: os.chdir(sys.argv[1])
+PipeConnection(sys.stdin, sys.stdout).Server()
+