~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to test_on_merge.py

  • Committer: Gary Poster
  • Date: 2010-04-06 23:42:18 UTC
  • mto: (7675.623.23 launchpad)
  • mto: This revision was merged to the branch mainline in revision 10635.
  • Revision ID: gary.poster@canonical.com-20100406234218-7vfo4c9vv6givygu
remove disgusting bit: we will change buildbot

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
# GNU Affero General Public License version 3 (see the file LICENSE).
5
5
 
6
6
"""Tests that get run automatically on a merge."""
7
 
 
8
 
import sys, os
9
 
 
10
 
# In order to be more robust in the face of system Pythons, we want to
11
 
# run without site-packages loaded.  Normally, we do this by just making the
12
 
# script run with bin/py or as an executable.  However, buildbot's
13
 
# configuration starts this file with ``python2.5 -t test_on_merge.py -vv``.
14
 
# Eventually, we probably ought to change this.  However, for now, we will
15
 
# handle this here by restarting.
16
 
if ('site' in sys.modules and
17
 
    not os.path.abspath(sys.modules['site'].__file__).startswith(
18
 
        os.path.abspath(os.path.dirname(__file__)))):
19
 
    # We will restart with python -S.
20
 
    args = sys.argv[:]
21
 
    args[0:0] = [sys.executable, '-S']
22
 
    os.execv(sys.executable, args)
23
 
 
24
7
import _pythonpath
25
8
 
26
 
import time
27
 
import errno
 
9
import sys, time
 
10
import os, errno
28
11
import tabnanny
29
12
from StringIO import StringIO
30
13
import psycopg2