~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/devscripts/ec2test/testrunner.py

  • Committer: Jeroen Vermeulen
  • Date: 2011-12-21 07:06:05 UTC
  • mto: This revision was merged to the branch mainline in revision 14574.
  • Revision ID: jeroen.vermeulen@canonical.com-20111221070605-80ijtuvo1mu2ojgz
Lint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
323
323
            # really wrong with the server or suite.
324
324
            user_connection.perform("sudo shutdown -P +%d &" % self.timeout)
325
325
        as_user = user_connection.perform
326
 
        as_user("sudo mount -o remount,data=writeback,commit=3600,async,relatime /")
 
326
        as_user(
 
327
            "sudo mount "
 
328
            "-o remount,data=writeback,commit=3600,async,relatime /")
327
329
        for d in ['/tmp', '/var/tmp']:
328
 
            as_user('sudo mkdir -p %s && sudo mount -t tmpfs none %s' % (d, d))
329
 
        as_user("sudo service postgresql-8.4 stop"
 
330
            as_user(
 
331
                "sudo mkdir -p %s && sudo mount -t tmpfs none %s" % (d, d))
 
332
        as_user(
 
333
            "sudo service postgresql-8.4 stop"
330
334
            "; sudo mv /var/lib/postgresql /tmp/postgresql-tmp"
331
335
            "&& sudo mkdir /var/lib/postgresql"
332
336
            "&& sudo mount -t tmpfs none /var/lib/postgresql"
367
371
        user_connection = self._instance.connect()
368
372
        # Clean up the test branch left in the instance image.
369
373
        user_connection.perform('rm -rf /var/launchpad/test')
370
 
        user_connection.perform('sudo mkdir /var/launchpad/test '
371
 
            '&& sudo mount -t tmpfs none /var/launchpad/test')
 
374
        user_connection.perform(
 
375
            'sudo mkdir /var/launchpad/test && '
 
376
            'sudo mount -t tmpfs none /var/launchpad/test')
372
377
        # Get trunk.
373
378
        user_connection.run_with_ssh_agent(
374
 
            'bzr branch --use-existing-dir %s /var/launchpad/test' % (self._trunk_branch,))
 
379
            'bzr branch --use-existing-dir %s /var/launchpad/test'
 
380
            % (self._trunk_branch,))
375
381
        # Merge the branch in.
376
382
        if self._branch is not None:
377
383
            user_connection.run_with_ssh_agent(