Hi Markus,
On Fri, Nov 27, 2015 at 04:43:56PM +0200, Markus Lehtonen wrote:
> > > and I think we
> > > need to rethink the strategy for this submodule. For the deb component
> > > tests I'm keeping everything in HEAD and set up everything from
> > > there. The rpm tests need different commits to function which 
> > > causes/caused
> > > some breakackge here when pulling in more component tests so I think we
> > > would be better of needing only a single commit like in the deb
> > > case. Would that be doable?
> > 
> > I haven't figured out any better way – although I admit that this is not
> > the most elegant solution. The other branches in the testdata repository
> > basically represent various test packages (i.e. test repositories can be
> > constructed from those). I didn't find any nice and easy way to
> > serialize the test repositories (to construct them at test time) either.
> > And additional git submodules (per-testpackage submodule) don't work
> > either because the test repositories usually require multiple branches
> > (upstream, packaging, pristine-tar) and this is not supported in git
> > submodules which work on single HEAD commit. Better ideas are welcome,
> > of course.
> I played around with one idea I had earlier and came up with a solution
> to the problem of storing test package git repositories. Please see the
> 'feature/component-tests' branch in my Github repository
> https://github.com/marquiz/git-buildpackage-rpm
> Now, all test data is available in submodule 'HEAD' - test package git
> repositories are serialized as patches (and some additional data) in
> separate subdiretories. The branch also contains two patches for
> buildpackage-rpm (cherry-picked from the 'feature/buildpackage-rpm'
> branch) that are needed for the buildpackage-rpm unit tests to pass. It
> also contains one "optional" patch that makes names of the per-testcase
> temporary directories more user friendly.

Awesome! This makes the rpm and deb component tests use the same
"strategy" (the rpm ones being far more complete). Running the tests
fails on me with:

nosetests -x
ERROR: Basic test of native pkg
Traceback (most recent call last):
 line 116, in test_native_build
 line 58, in init_test_repo
    dirname = os.path.basename(cls.orig_repos[pkg_name].path)
KeyError: 'gbp-test-native'

though. This is the first error. I have the full log attached.

Two further things:

* please add gbp_*/ to .gitignore in the data repo so we don't get any
  untracked content after running the tests.

* It seems manage.py uses lots of code from gbp. Wouldn't it be better
  to reuse this. We can do this at a later time though, having the test
  data for the component tests correct is much more important.

> If you're not going to merge this in the near future, please update the
> rpm test data submodule into a valid commit. Currently, it points into
> some local commit of yours or something as I pointed out in my earlier
> email.

I'd be happy to pull this in in general. There are some details with

    common/buildpackage: support for different archive formats

which I need to work out but that can be done afterwards as well.

Cheers and thanks a lot!
 -- Guido
git-buildpackage mailing list

Reply via email to