[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#976669: lintian: please warn about autopkgtests that test rebuilt source, not as-installed, where possible

Package: lintian
Severity: wishlist
X-Debbugs-Cc: debian-java@lists.debian.org

Hi lintian people,

the request is, of course, not generally solvable. However, for
a few buildsystems and ways to “test”, this is possible, and
these should be warned about (probably at Error level even).

It all begun with…

>  I find java packages with maven-debian-helper can be tested by:
>  ====
>  Test-Command: dh_auto_configure; dh_auto_test

The trouble here is that, with maven-debian-helper in Build-Depends
and used (if pom.xml exists, it’s used), this calls “mvn test”, and
Maven helpfully expands this to “mvn compile test” because the source
is not yet compiled. It’s probably much more involved to do as-installed
testing with Maven… but that’s for d-java@l.d.o to figure out.

But some people are using this, and this should be an Error.

Some other buildsystems also do this. I don’t know many, but
for example some Makefile-based ones also have a “test: build”
dependency. So maybe the mere presence of dh_auto_test in a
testcase should also be warned about, but with a much lower
severity than Error. Error should be used for these we positively
know about that rebuilds are caused and that the rebuilt code
is the code being tested.

Perhaps specialists for other buildsystems could also be asked
whether theirs do that, and errors tagged for those.

On Sun, 6 Dec 2020, Paul Wise wrote:

> On Sat, Dec 5, 2020 at 6:45 PM Thorsten Glaser wrote:
> > We probably should let maven-debian-helper’s dh module
> > abort any building (dh_auto_{build,test}) if run under
> > autopkgtests to enforce this.
> I'd suggest to start with a lintian warning about this and maybe when
> there are fewer packages using it, then change the dh module.

Good point. I’m doing so with this.

tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg


Mit unserem Consulting bieten wir Unternehmen maßgeschneiderte Angebote in
Form von Beratung, Trainings sowie Workshops in den Bereichen
Softwaretechnologie, IT Strategie und Architektur, Innovation und Umsetzung
sowie Agile Organisation.

Besuchen Sie uns auf https://www.tarent.de/consulting .
Wir freuen uns auf Ihren Kontakt.


Reply to: