On Thu, May 09, 2019 at 02:03:50PM +0200, Paul Gevers wrote:
> Hi Antonio,
> 
> On 09-05-2019 13:59, Antonio Terceiro wrote:
> >> Actually, I don't know where this mapping is documented, except for in
> >> the code.
> > 
> > the mapping comes from the name that was chosen by whoever implement the
> > corresponding support in autodep8. In this case "go" was chosen:
> 
> No offence, but I don't see any mapping there. If Daniel would use
> "Testsuite: autopkgtest-pkg-dkg-is-great" in his debian/control stanza,
> it would still be detected as go by autodep8 and tested by autopkgtest.

Ah, right. What happens is that language support provides two things:
one is the name, what is used if recognized. another part is a program
that autodetects the type of package from its contents, by looking for
specific files, or the contents of debian/control.

If the package declares `Testsuite: autopkgtest-pkg-$foo` and $foo is
known, then that is used. Otherwise, the autodetection program for each
language is tried. Maybe this autodetection is too much magic and we
want to get rid of it in the the long run, but OTOH that is what allowed
us to start testing a bunch of packages before having the Testsuite:
fields in place.

So, the mapping consists of two parts:

- the name of the directoty under /usr/share/autodep8/support/, which is
  matched against `Testsuite: autopkgtest-pkg-$foo`
- if the above fails, the autodetection script
  (/usr/share/autodep8/support/$foo/detect, for each support $foo) is
  executed, and if if exits with 0 then $foo is assumed to be the
  language of the package.

> [...]
> 
> >> P.s. we may need to improve this logic, I think the Testsuite header
> >> should explain this better. I.e. it should be something like "Testsuite:
> >> autopkgtest-autodep8"
> > 
> > do you mean supporting autopkgtest-autodep8-$foo alongside
> > autopkgtest-pkg-$foo?
> 
> No, really plain "Testsuite: autopkgtest-autodep8". autopkgtest and
> other consumers of that field don't need to know which language it is
> they are testing. Just that it needs autodep8 to detect what it is and
> how to test it.

OK, makes sense.

Attachment: signature.asc
Description: PGP signature

Reply via email to