[git-buildpackage] git-mock
Guido Günther
agx at sigxcpu.org
Sat Jan 24 23:17:15 CET 2015
On Tue, Dec 30, 2014 at 11:16:37AM +0100, Tzafrir Cohen wrote:
> On Sun, Dec 28, 2014 at 02:27:51PM +0100, Tzafrir Cohen wrote:
> > On Sun, Dec 28, 2014 at 01:22:27PM +0100, Guido Günther wrote:
> >
> > > ======================================================================
> > > ERROR: test suite for <class 'tests.component.rpm.test_pq_rpm.TestPqRpm'>
> >
> > Speaking of tests, I think that the following should also be included in
> > the branch (unless I missed it elsewhere):
> >
> > http://git.tzafrir.org.il/cgit/git-buildpackage.git/commit/?id=b2d8fa3bdb750ddf974cb605de4e5f0c9b4281cb
> >
> > That repo also has a brute-force rebase of buildpackage-rpm on top of
> > 0.6.22 (just that command. Others are still missing).
>
> On top of that I now have an initial version of --git-mock - using mock
> as a chroot builder for rpm packages. I basically copied the way
> pbuilder is used (created a separate git-mock and used it as a builder).
> Mock is already installed by default with its own permission elavtion
> handler.
The tests on buildpackage-rpm branch at
git://git.tzafrir.org.il/git/git-buildpackage.git fail for me like:
======================================================================
ERROR: Basic test for apply action
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 243, in test_apply
eq_(mock_pq(['apply', tmp_patch.name]), 0)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 36, in mock_pq
return pq(['arg0'] + args)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 477, in main
apply_single_patch(repo, current, patch, fallback_author=None)
TypeError: apply_single_patch() takes exactly 5 arguments (4 given)
-------------------- >> begin captured logging << --------------------
gbp: error: No patch name given.
--------------------- >> end captured logging << ---------------------
======================================================================
ERROR: Test exporting pq-branch with merge commits
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 331, in test_export_with_merges
eq_(mock_pq(['apply', patches[0]]), 0)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 36, in mock_pq
return pq(['arg0'] + args)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 477, in main
apply_single_patch(repo, current, patch, fallback_author=None)
TypeError: apply_single_patch() takes exactly 5 arguments (4 given)
======================================================================
ERROR: Test force import
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 203, in test_force_import
eq_(mock_pq(['import']), 1)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 36, in mock_pq
return pq(['arg0'] + args)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 470, in main
import_spec_patches(repo, options)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 295, in import_spec_patches
if is_pq_branch(current):
TypeError: is_pq_branch() takes exactly 2 arguments (1 given)
======================================================================
ERROR: Basic test for patch import and export
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 79, in test_import_export
eq_(mock_pq(['import']), 0)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 36, in mock_pq
return pq(['arg0'] + args)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 470, in main
import_spec_patches(repo, options)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 295, in import_spec_patches
if is_pq_branch(current):
TypeError: is_pq_branch() takes exactly 2 arguments (1 given)
======================================================================
ERROR: Another test for import and export
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 108, in test_import_export2
eq_(mock_pq(['import']), 0)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 36, in mock_pq
return pq(['arg0'] + args)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 470, in main
import_spec_patches(repo, options)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 295, in import_spec_patches
if is_pq_branch(current):
TypeError: is_pq_branch() takes exactly 2 arguments (1 given)
======================================================================
ERROR: Test running gbp-rpm-pq from a subdir in the git tree
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 127, in test_import_in_subdir
eq_(mock_pq(['import']), 0)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 36, in mock_pq
return pq(['arg0'] + args)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 470, in main
import_spec_patches(repo, options)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 295, in import_spec_patches
if is_pq_branch(current):
TypeError: is_pq_branch() takes exactly 2 arguments (1 given)
-------------------- >> begin captured logging << --------------------
gbp: warning: Switching to topdir before running commands
--------------------- >> end captured logging << ---------------------
======================================================================
ERROR: Test import when a patch does not apply
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 374, in test_import_unapplicable_patch
eq_(mock_pq(['import']), 1)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 36, in mock_pq
return pq(['arg0'] + args)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 470, in main
import_spec_patches(repo, options)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 295, in import_spec_patches
if is_pq_branch(current):
TypeError: is_pq_branch() takes exactly 2 arguments (1 given)
======================================================================
ERROR: Test the --import-files cmdline option
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 348, in test_option_import_files
eq_(mock_pq(['import']), 0)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 36, in mock_pq
return pq(['arg0'] + args)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 470, in main
import_spec_patches(repo, options)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 295, in import_spec_patches
if is_pq_branch(current):
TypeError: is_pq_branch() takes exactly 2 arguments (1 given)
======================================================================
ERROR: Test --packaging-dir command line option
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 309, in test_option_packaging_dir
eq_(mock_pq(['import', '--packaging-dir=foo']), 1)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 36, in mock_pq
return pq(['arg0'] + args)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 470, in main
import_spec_patches(repo, options)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 295, in import_spec_patches
if is_pq_branch(current):
TypeError: is_pq_branch() takes exactly 2 arguments (1 given)
======================================================================
ERROR: Test the --patch-numbers cmdline option
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 261, in test_option_patch_numbers
eq_(mock_pq(['export', '--no-patch-numbers']), 0)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 36, in mock_pq
return pq(['arg0'] + args)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 468, in main
export_patches(repo, options)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 195, in export_patches
if is_pq_branch(current):
TypeError: is_pq_branch() takes exactly 2 arguments (1 given)
======================================================================
ERROR: Test --spec-file commandline option
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 291, in test_option_spec_file
eq_(mock_pq(['import', '--spec-file=foo.spec']), 1)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 36, in mock_pq
return pq(['arg0'] + args)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 470, in main
import_spec_patches(repo, options)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 295, in import_spec_patches
if is_pq_branch(current):
TypeError: is_pq_branch() takes exactly 2 arguments (1 given)
======================================================================
ERROR: Test the --tmp-dir cmdline option
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 270, in test_option_tmp_dir
eq_(mock_pq(['import', '--tmp-dir=foo/bar']), 0)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 36, in mock_pq
return pq(['arg0'] + args)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 470, in main
import_spec_patches(repo, options)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 295, in import_spec_patches
if is_pq_branch(current):
TypeError: is_pq_branch() takes exactly 2 arguments (1 given)
======================================================================
ERROR: Test the --upstream-tag cmdline option
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 279, in test_option_upstream_tag
eq_(mock_pq(['import', '--upstream-tag=foobar/%(upstreamversion)s']), 1)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 36, in mock_pq
return pq(['arg0'] + args)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 470, in main
import_spec_patches(repo, options)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 295, in import_spec_patches
if is_pq_branch(current):
TypeError: is_pq_branch() takes exactly 2 arguments (1 given)
======================================================================
ERROR: Basic test for rebase action
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 144, in test_rebase
eq_(mock_pq(['rebase']), 0)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 36, in mock_pq
return pq(['arg0'] + args)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 474, in main
rebase_pq(repo, options)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 358, in rebase_pq
if is_pq_branch(current):
TypeError: is_pq_branch() takes exactly 2 arguments (1 given)
======================================================================
ERROR: Basic test for switch action
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 163, in test_switch
eq_(mock_pq(['switch']), 0)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 36, in mock_pq
return pq(['arg0'] + args)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 479, in main
switch_pq(repo, current)
TypeError: switch_pq() takes exactly 3 arguments (2 given)
======================================================================
ERROR: Basic test for drop action
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 180, in test_switch_drop
eq_(mock_pq(['drop']), 1)
File "/var/scratch/src/git-buildpackage/git-buildpackage/tests/component/rpm/test_pq_rpm.py", line 36, in mock_pq
return pq(['arg0'] + args)
File "/var/scratch/src/git-buildpackage/git-buildpackage/gbp/scripts/pq_rpm.py", line 472, in main
drop_pq(repo, current)
TypeError: drop_pq() takes exactly 3 arguments (2 given)
Before I look further: Is that branch supposed to build?
Cheers,
-- Guido
More information about the git-buildpackage
mailing list