Le lundi, 8 mars 2021, 12.00:00 h CET Martin-Éric Racine a écrit : > Greetings! > > I've been looking at the autopkgtest specifications for a while and > trying to think of what would be a suitable test to implement. I was > thus wondering whether any of the other CUPS backends comes with any > autopkgtest case that I could learn from or whether anyone on this > list has any clue of what would be good things to test for with > CUPS-PDF?
So what I've done in CUPS is the following: - re-use Fedora's tests, that'll run several printing tests against an installed CUPS server: https://sources.debian.org/src/cups/2.3.3op2-3/debian/tests/cups-basiccommands - wrote a "test-drivers" script, ready for re-use by driver packages; it will loop over the provided list of drivers, setup a CUPS printer with that driver, configured to "print to file", loop over a folder of files (usually PDFs) and print them to this printer; verify that the resulting raw content is not empty; then cleanup: https://sources.debian.org/src/cups/2.3.3op2-3/debian/tests/utils/test-drivers (It tries to have sane defaults, like picking files out of CUPS' data path /usr/share/cups/data/, which has default template and weird russian forms.) This then allows driver packages to use that script for simple autopkgtest test scripts, such as CUPS' which is basically $ /usr/share/cups/test-drivers -l 'raw' -p ./test/ 2>/dev/null See: https://sources.debian.org/src/cups/2.3.3op2-3/debian/tests/cups-core-drivers For the printers drivers I maintain, I have then usually done variations of this: . /usr/share/cups/ppd-updaters/printer-driver-escpr.ppd-updater /usr/share/cups/test-drivers -n adt-test-escpr-0 -r $DRIVER_REGEXP See: https://sources.debian.org/src/epson-inkjet-printer-escpr/1.7.8-1/debian/tests/printer-driver-escpr Now. For CUPS-PDF, I'd definitely add an autopkgtest, and testing this on salsa, with the Salsa CI Team Pipeline is a good way to get these tests running without having to do the setup locally: https://salsa.debian.org/salsa-ci-team/pipeline/ For a start, I'd try to use this CUPS script (or a variation inspired by it, with a CUPS-PDF driver, and would print PDFs through it. Would you need assistance for doing so? (That'd go to experimental anyway, given the freeze status we're in, but it's worth doing in any case!) Best regards, and happy to help if you so wish! OdyX
