~ubuntu-branches/debian/sid/bzr-builddeb/sid

« back to all changes in this revision

Viewing changes to tests/blackbox/test_builddeb.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij, Colin Watson, Jelmer Vernooij, Robert Collins, James Westby
  • Date: 2010-08-11 18:23:54 UTC
  • Revision ID: james.westby@ubuntu.com-20100811182354-pgqznly5bbtoiso4
Tags: 2.5
[ Colin Watson ]
* Consider a .dsc without a Format: to be Format: 1.0.

[ Jelmer Vernooij ]
* export now uses the timestamp of the last revision, making them more
  deterministic, and so hopefully producing the same tarballs when it is
  used for that.
* Fix use of getattr to have 3 arguments to avoid exception. (LP: #572093)
* Implement the automatic_tag_name hook so that "bzr tag" with no arguments
  will tag based on the version in debian/changelog.
* Support upstream/VERSION tags, for compatibility with git-
  buildpackage. LP: #551362
* Support upstream tarballs without a pristine tar delta.
* Support -r argument to import-upstream.

[ Robert Collins ]
* Add import-upstream command which imports an upstream - useful for
  migrating existing packaging branches into pristine-tar using mode.
* Stop stripping .bzrignore from tarball imports. LP: #496907
* Make the upstream branch authoritative for file ids when importing a
  tarball, stopping errors when files are renamed. LP: #588060

[ James Westby ]
* Add a --package-merge option to builddeb to build with the -v and -sa
  appropriate when doing a merge from Debian or similar. LP: #576027
* Fixed a logic error that stops -r working in merge-upstream. LP: #594575

[ Jelmer Vernooij ]
* Determine Bazaar home directory using bzrlib to prevent test
  isolation issues. Closes: #614125
* Bump standards version to 3.9.1 (no changes).

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
    self.run_bzr("bd --help")
67
67
 
68
68
  def test_builddeb_not_package(self):
69
 
    self.run_bzr_error(['Could not find changelog'], 'builddeb '
70
 
            '--no-user-conf')
 
69
    self.run_bzr_error(['Could not find changelog'], 'builddeb')
71
70
 
72
71
  def build_really_simple_tree(self):
73
72
    tree = self.make_unpacked_source()
100
99
 
101
100
  def test_builddeb_uses_working_tree(self):
102
101
    self.build_really_simple_tree()
103
 
    self.run_bzr("builddeb --no-user-conf --native --builder true "
104
 
            "--dont-purge")
 
102
    self.run_bzr("builddeb --native --builder true --dont-purge")
105
103
    self.assertInBuildDir([self.commited_file, self.uncommited_file])
106
104
    self.assertNotInBuildDir([self.unadded_file])
107
105
 
110
108
    self.assertTrue(conflicts > 0)
111
109
    self.run_bzr_error(
112
110
      ['There are conflicts in the working tree. You must resolve these'],
113
 
      "builddeb --no-user-conf --native --builder true --dont-purge")
 
111
      "builddeb --native --builder true --dont-purge")
114
112
 
115
113
  def test_builddeb_uses_revision_when_told(self):
116
114
    self.build_really_simple_tree()
117
 
    self.run_bzr("builddeb --no-user-conf "
118
 
            "--native --builder true --dont-purge -r-1")
 
115
    self.run_bzr("builddeb --native --builder true --dont-purge -r-1")
119
116
    self.assertInBuildDir([self.commited_file])
120
117
    self.assertNotInBuildDir([self.unadded_file, self.uncommited_file])
121
118
 
122
119
  def test_builddeb_error_on_two_revisions(self):
123
120
    tree = self.make_unpacked_source()
124
121
    self.run_bzr_error(['--revision takes exactly one revision specifier.'],
125
 
                       "builddeb --no-user-conf --native --builder "
126
 
                       "true -r0..1")
 
122
                       "builddeb --native --builder true -r0..1")
127
123
 
128
124
  def test_builddeb_allows_building_revision_0(self):
129
125
    self.build_really_simple_tree()
130
126
    # This may break if there is something else that needs files in the
131
127
    # branch before the changelog is looked for.
132
128
    self.run_bzr_error(['Could not find changelog'],
133
 
                       "builddeb --no-user-conf --native --builder true "
134
 
                       "--dont-purge -r0")
 
129
                       "builddeb --native --builder true --dont-purge -r0")
135
130
    self.assertNotInBuildDir([self.commited_file, self.unadded_file,
136
131
                              self.uncommited_file])
137
132
 
146
141
 
147
142
  def test_builder(self):
148
143
    tree = self.make_unpacked_source()
149
 
    self.run_bzr('bd --no-user-conf --dont-purge --native --builder '
150
 
            '"touch built"')
 
144
    self.run_bzr('bd --dont-purge --native --builder "touch built"')
151
145
    self.assertInBuildDir('built')
152
146
 
153
147
  def test_hooks(self):
161
155
    finally:
162
156
      f.close()
163
157
    self.run_bzr('add .bzr-builddeb/default.conf')
164
 
    self.run_bzr('bd --no-user-conf --dont-purge --builder true')
 
158
    self.run_bzr('bd --dont-purge --builder true')
165
159
    self.failUnlessExists('pre-export')
166
160
    self.assertInBuildDir(['pre-build', 'post-build'])
167
161