summaryrefslogtreecommitdiff
path: root/rdiff-backup/testing/chdir-wrapper
blob: 413fcf222fa980a2d7e555c73d278e3a44298a27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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()