From f3295cf3e83eddb1a77e2958f380d97211cf5367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Borgstr=C3=B6m?= Date: Wed, 3 Jul 2013 22:30:04 +0200 Subject: [PATCH] Add testsuite shortcut to make remote repository testing more robust. --- darc/remote.py | 5 ++++- darc/testsuite/archiver.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/darc/remote.py b/darc/remote.py index 71cf87c76..0ea50d3c6 100644 --- a/darc/remote.py +++ b/darc/remote.py @@ -80,7 +80,10 @@ def __init__(self, location, create=False): self.unpacker = msgpack.Unpacker(use_list=False) self.msgid = 0 self.received_msgid = 0 - args = ['ssh', '-p', str(location.port), '%s@%s' % (location.user or getpass.getuser(), location.host), 'darc', 'serve'] + if location.host == '__testsuite__': + args = [sys.executable, '-m', 'darc.archiver', 'serve'] + else: + args = ['ssh', '-p', str(location.port), '%s@%s' % (location.user or getpass.getuser(), location.host), 'darc', 'serve'] self.p = Popen(args, bufsize=0, stdin=PIPE, stdout=PIPE) self.stdin_fd = self.p.stdin.fileno() self.stdout_fd = self.p.stdout.fileno() diff --git a/darc/testsuite/archiver.py b/darc/testsuite/archiver.py index 4df3f98dc..833670032 100644 --- a/darc/testsuite/archiver.py +++ b/darc/testsuite/archiver.py @@ -219,4 +219,4 @@ def test_usage(self): class RemoteArchiverTestCase(ArchiverTestCase): - prefix = 'localhost:' + prefix = '__testsuite__:'