Bug#1139439: dh-elpa: integration tests
Sean Whitton <[email protected]> Tue, 09 Jun 2026 09:58:08 +0100
| Newsgroups | gmane.linux.debian.devel.emacsen |
|---|---|
| Message-ID | <87bjdkum3j.fsf__19437.7292458498$1780996168$gmane$org@melete.silentflame.com> |
Xiyue Deng [08/Jun 6:36pm -07] wrote: > Package: dh-elpa > Version: 2.1.9 > Severity: wishlist > > I have modified and adapted the integration tests from dh-make-elpa to > work in dh-elpa. The tests work in a similar fashion as dh-make-elpa: in > a template repo that provides a minimal-ish set of files required for > dh_elpa command, run the command, and compare the output with an > expected repository, and check whether there are any diff. I hope this > provides a way to easily verify changes to the dh_elpa (and dh-elpa.el) > utility, especially debian/*.substvars to check whether the generated > "misc:Depends" and "elpa:Depends" are expected. > > During implementation, I found some limitation of how the "dh_elpa" > command works and used some workarounds to make it work. > > * The "dh_elpa" perl script uses global path that assumes a installed > dh-elpa is available. However, the build time test needs to run from > the source tree. As a result I extended the dh_elpa script to allow > referencing files from the source tree (as well as other tweaks) to > make it work during build time. The changes are guarded by a > "--test-source-root" parameter. > > * For multiple file packages, dh_elpa will create a tarball which cannot > be compared with "diff" directly (which bremner had warned me before). > For the time being, I just skip the tarball files as the unpacked > directory is also available in the generated templates so their > contents are still part of the comparisons. > > I hope the diff tests can give more confidence when modifying dh_elpa, > especially for testing ideas like in Bug#1138884. > > The changes are in an "integration-test" branch[1], and the diff against > master branch can be seen here[2]. An overview of how the tests work can > be found at the README.org[3]. I think you should try to cut down the Perl deps. Most of those aren't really necessary, I used them for the dh-make-elpa test suite because I didn't know much Perl at the time. -- Sean Whitton
signature.asc
(application/pgp-signature, 869 B)
-----BEGIN PGP SIGNATURE----- iQJNBAEBCgA3FiEEm5FwB64DDjbk/CSLaVt65L8GYkAFAmon1aAZHHNwd2hpdHRv bkBzcHdoaXR0b24ubmFtZQAKCRBpW3rkvwZiQCM3D/9MZp8SkNTt2aG250WmGGY0 hm72/X4iAbRbm5pc1WqMKWdc9HE7JJygXO+uSIAUo7PdcZANIyfEzLRygE2k7GV2 7JjfnMCYBxs/M+VsTVXQpjWNgieKeIc/J/RtVYzmsrLaw9x0SVI7Oo4NhX2yWNmR MWUMD4cCaFrD/55b67HMnRoODUV4yY4nLa8gLmD2IwLAK6xN+XJLnGZ9LH34scZO pVUPFaSKTEY08kVrrQeuD4iDu4MhmUwv9wb06ToY61Rvtt6DxIoJ+qVi8I8bQ8m6 qva3r+FzTywHe8/IMWnrGUt5BD0kv2wY8Wn6NLXu+PKYjsE/UcN0e28D9vjinX6K awY7/Oy9Oqn6r+vU1NjoqnIJgskf7ouC052theRfceDjVO7gzedsjYgGz3BtiODx 9VMirzc+UBsIlxwwqfMrlrvMlOxX9MxunSspkciFbjZRVhuOiNq/9n4LDpoIqVD/ 9GJvhF6WAGgiJHAI5dsNYIlePRF0Itf0x0c3DxmLCVE1unqoWEGp25BIJ9CbeMYc lu6bid8oK8F3LoIVk3Gy5E8USokqDqOc4sQaczUfEHOu3/S5NZSlgEknTKS4wklH KOA3UsOqVbaHG9rVNPk1zaiEr7UZ6rP/F4vE9RX+h/t+nI+4dUyfA4wPeE8KFtzO a6OdOGS65cTzjEuJPAi3LA== =O6qw -----END PGP SIGNATURE-----