~barry/ubuntu/natty/python-distutils-extra/670188-ftbfs

« back to all changes in this revision

Viewing changes to test/testBzrBuild.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-01 16:39:54 UTC
  • mfrom: (1.1.13 karmic)
  • Revision ID: james.westby@ubuntu.com-20090701163954-3ewvhmu8l9oci2w9
Tags: 2.3
* auto.py: Fix recognition of GtkBuilder *.ui files as glade-3 writes them.
* auto.py: Add automatic calculation of "requires" unless explicitly given.
* auto.py: Add automatic calculation of "provides" unless explicitly given.
* Drop test/testBzrBuild.py, it's specific to Sebastian's computer.
* setup.py: Drop nose.collector, we don't use it.
* Add debian/local/python-mkdebian: Create/update debian packaging
  (debian/*) from python egg-info data. Not terribly pretty, but working and
  reasonably policy compliant.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import unittest
2
 
import os
3
 
import shutil
4
 
from bzrlib.branch import Branch
5
 
from bzrlib.plugins.builddeb import cmd_builddeb
6
 
 
7
 
class TestBuildGnomeAppInstall(unittest.TestCase):
8
 
    def setUp(self):
9
 
        #self.branch_url = "http://bazaar.launchpad.net/~ubuntu-core-dev/gnome-app-install/main/"
10
 
        self.branch_url = "/home/renate/Entwicklung/gnome-app-install/sebi"
11
 
        self.name = "gnome-app-install"
12
 
 
13
 
    def testBuild(self):
14
 
        """
15
 
        Creates a lightweight checkout of the bzr repository and builds
16
 
        the package
17
 
        """
18
 
        branch_path = os.path.join("temp", "%s-bzr" % self.name)
19
 
        build_path = os.path.join("temp", "%s-build" % self.name)
20
 
        if not os.path.exists("temp"):
21
 
            os.mkdir("temp")
22
 
        if os.path.exists(branch_path):
23
 
            shutil.rmtree(branch_path)
24
 
        if os.path.exists(build_path):
25
 
            shutil.rmtree(build_path)
26
 
        br = Branch.open(self.branch_url)
27
 
        wt = br.create_checkout(branch_path, lightweight=True)
28
 
        builder = cmd_builddeb()
29
 
        builder.run(branch=branch_path, build_dir=build_path,
30
 
                    native=True)
31
 
 
32
 
class TestBuildUpdateManager(TestBuildGnomeAppInstall):
33
 
    def setUp(self):
34
 
        #self.branch_url = " https://launchpad.net/~ubuntu-core-dev/+branch/update-manager/main"
35
 
        self.branch_url = "/home/renate/Entwicklung/update-manager/main"
36
 
        self.name = "update-manager"
37
 
 
38
 
class TestDisplayConfigGTK(TestBuildGnomeAppInstall):
39
 
    def setUp(self):
40
 
        #self.branch_url = " https://launchpad.net/~displayconfig-gtk/displayconfig-gtk/ubuntu/"
41
 
        self.branch_url = "/home/renate/Entwicklung/displayconfig/ubuntu"
42
 
        self.name = "displayconfig-gtk"
43
 
 
44
 
class TestSoftwareProperties(TestBuildGnomeAppInstall):
45
 
    def setUp(self):
46
 
        #self.branch_url = " http://bazaar.launchpad.net/~ubuntu-core-dev/software-properties/main/"
47
 
        self.branch_url = "/home/renate/Entwicklung/software-properties/ubuntu"
48
 
        self.name = "software-properties"
49
 
 
50
 
if __name__ == '__main__':
51
 
        unittest.main()