Re: [git-buildpackage] git-buildpackage: Test cases for non-native package

2016-02-19 Thread Guido Günther
On Fri, Feb 19, 2016 at 10:39:27AM +1100, Ben Finney wrote:
> On 18-Feb-2016, Ben Finney wrote:
> > When I add a test case for the overlay mode, it will be based on
> > those changes.
> 
> Writing the test case is difficult. The existing code does not appear
> able to distinguish “import the Debian changes” as a separate action
> *without* the upstream code.

You can do everything that gbp.git.repository.GitRepository can e.g. 
.commit_dir().

Cheers,
 -- Guido
___
git-buildpackage mailing list
git-buildpackage@lists.sigxcpu.org
http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage


Re: [git-buildpackage] git-buildpackage: Test cases for non-native package

2016-02-19 Thread Ben Finney
On 18-Feb-2016, Ben Finney wrote:
> When I add a test case for the overlay mode, it will be based on
> those changes.

Writing the test case is difficult. The existing code does not appear
able to distinguish “import the Debian changes” as a separate action
*without* the upstream code.

So I'm not clear how to use the existing unit test examples to set up
a repository that has only ‘debian/’ committed to the repo.

-- 
 \ “Whatever a man prays for, he prays for a miracle. Every prayer |
  `\   reduces itself to this: “Great God, grant that twice two be not |
_o__)   four.”” —Ivan Turgenev |
Ben Finney 


signature.asc
Description: PGP signature
___
git-buildpackage mailing list
git-buildpackage@lists.sigxcpu.org
http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage


Re: [git-buildpackage] git-buildpackage: Test cases for non-native package

2016-02-17 Thread Ben Finney
On 17-Feb-2016, Ben Finney wrote:
> My attempts began with refactoring the ‘deb.TestBuildpackage’ class
> https://notabug.org/bignose/debian_git-buildpackage/src/test-suite-refactor>,
> to extract common elements of each test case. Please feel free to
> merge those changes.

I have updated that branch to accommodate the new test case you added,
for building a non-native Debian package.

When I add a test case for the overlay mode, it will be based on those
changes.

-- 
 \ “We demand rigidly defined areas of doubt and uncertainty!” |
  `\—Vroomfondel, _The Hitch-Hiker's Guide To The Galaxy_, Douglas |
_o__)Adams |
Ben Finney 


signature.asc
Description: PGP signature
___
git-buildpackage mailing list
git-buildpackage@lists.sigxcpu.org
http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage


Re: [git-buildpackage] git-buildpackage: Test cases for non-native package

2016-02-17 Thread Guido Günther
On Wed, Feb 17, 2016 at 05:56:31PM +1100, Ben Finney wrote:
> On 20-Oct-2015, Guido Günther wrote:
> > A testcase using e.g. tests/component/deb/test_buildpackage.py
> > to make sure it doesn't get broken again would be welcome too.
> 
> I am trying to build a test case for this, but there does npt seem to
> be a good way to add a “non-native package using overlay” scenario in
> that module. I don't even see a “non-native package” starting point.

Check the dsc and import-orig component tests. They import a non native
package.

> My attempts began with refactoring the ‘deb.TestBuildpackage’ class
> https://notabug.org/bignose/debian_git-buildpackage/src/test-suite-refactor>,
> to extract common elements of each test case. Please feel free to
> merge those changes.
> 
> I was not able to figure out how to make a test case function
> ‘TestBuildpackage.test_non_native_buildpackage’ that would correctly
> test that scenario. Lacking that, I don't even know how to begin
> making a similar scenario ‘test_non_native_with_overlay_buildpackage’.

This is like test_debian_buildpackage but imports hello-debian instead
of git-buildpackage. I've pushed a patch that shows this:


https://git.sigxcpu.org/cgit/git-buildpackage/commit/?id=3a84c1132d642190eaab686c2600ae661ad6062d

Cheers,
 -- Guido
___
git-buildpackage mailing list
git-buildpackage@lists.sigxcpu.org
http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage


[git-buildpackage] git-buildpackage: Test cases for non-native package

2016-02-17 Thread Ben Finney
On 20-Oct-2015, Guido Günther wrote:
> A testcase using e.g. tests/component/deb/test_buildpackage.py
> to make sure it doesn't get broken again would be welcome too.

I am trying to build a test case for this, but there does npt seem to
be a good way to add a “non-native package using overlay” scenario in
that module. I don't even see a “non-native package” starting point.

My attempts began with refactoring the ‘deb.TestBuildpackage’ class
https://notabug.org/bignose/debian_git-buildpackage/src/test-suite-refactor>,
to extract common elements of each test case. Please feel free to
merge those changes.

I was not able to figure out how to make a test case function
‘TestBuildpackage.test_non_native_buildpackage’ that would correctly
test that scenario. Lacking that, I don't even know how to begin
making a similar scenario ‘test_non_native_with_overlay_buildpackage’.

-- 
 \ “The double standard that exempts religious activities from |
  `\   almost all standards of accountability should be dismantled |
_o__)   once and for all.” —Daniel Dennett, 2010-01-12 |
Ben Finney 


signature.asc
Description: PGP signature
___
git-buildpackage mailing list
git-buildpackage@lists.sigxcpu.org
http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage