/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_serve.py

  • Committer: Martin Pool
  • Date: 2009-03-13 07:54:48 UTC
  • mfrom: (4144 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4189.
  • Revision ID: mbp@sourcefrog.net-20090313075448-jlz1t7baz7gzipqn
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
        result = self.finish_bzr_subprocess(process)
49
49
        self.assertEqual('', result[0])
50
50
        self.assertEqual('', result[1])
51
 
    
 
51
 
52
52
    def assertServerFinishesCleanly(self, process):
53
53
        """Shutdown the bzr serve instance process looking for errors."""
54
54
        # Shutdown the server
97
97
        args = ['serve', '--port', 'localhost:0']
98
98
        args.extend(extra_options)
99
99
        process = self.start_bzr_subprocess(args, skip_if_plan_to_signal=True)
100
 
        port_line = process.stdout.readline()
 
100
        port_line = process.stderr.readline()
101
101
        prefix = 'listening on port: '
102
102
        self.assertStartsWith(port_line, prefix)
103
103
        port = int(port_line[len(prefix):])
148
148
        except ParamikoNotPresent:
149
149
            raise TestSkipped('Paramiko not installed')
150
150
        from bzrlib.tests.stub_sftp import StubServer
151
 
        
 
151
 
152
152
        # Make a branch
153
153
        self.make_branch('a_branch')
154
154
 
167
167
                proc = subprocess.Popen(
168
168
                    command, shell=True, stdin=subprocess.PIPE,
169
169
                    stdout=subprocess.PIPE, stderr=subprocess.PIPE)
170
 
                
 
170
 
171
171
                # XXX: horribly inefficient, not to mention ugly.
172
172
                # Start a thread for each of stdin/out/err, and relay bytes from
173
173
                # the subprocess to channel and vice versa.
200
200
        # Access the branch via a bzr+ssh URL.  The BZR_REMOTE_PATH environment
201
201
        # variable is used to tell bzr what command to run on the remote end.
202
202
        path_to_branch = osutils.abspath('a_branch')
203
 
        
 
203
 
204
204
        orig_bzr_remote_path = os.environ.get('BZR_REMOTE_PATH')
205
205
        bzr_remote_path = self.get_bzr_path()
206
206
        if sys.platform == 'win32':
226
226
            ['%s serve --inet --directory=/ --allow-writes'
227
227
             % bzr_remote_path],
228
228
            self.command_executed)
229
 
        
 
229