~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Matt Nordhoff
  • Date: 2009-04-04 02:50:01 UTC
  • mfrom: (4253 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4256.
  • Revision ID: mnordhoff@mattnordhoff.com-20090404025001-z1403k0tatmc8l91
Merge bzr.dev, fixing conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
 
18
18
"""Tests of the bzr serve command."""
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
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