Building a testsuite

Asked by Jerome Alet

Hi,

I'd like to generate a testsuite for my pkpgcounter software (http://www.pykota.com/software/pkpgcounter), from a set of predefined Postscript documents.

I've begun working on all the available ghostscript output devices (http://svn.librelogiciel.com/cgi-bin/viewcvs.cgi/pkpgcounter/trunk/tests/gstests.py?rev=328&view=markup) but hpijs requires different parameters than the base devices included in ghostscript.

That's why I'd like to know how to extract at least the list of available "print classes" from hpijs. Is there a command line option for this somewhere, or should I grep the sources, or is this not possible at all excepted manually ? Of course the more information I could get the better, since I'd like to test my software on as many configurations (really printer driver options) as possible.

Thx in advance

Jerome Alet

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Jerome Alet
Solved:
Last query:
Last reply:
Revision history for this message
dwelch91 (dwelch91) said :
#1

All the classes are listed in prnt/hpijs/models.h

Revision history for this message
Jerome Alet (jalet) said :
#2

This answer is valid, many thanks for it.

However I was thinking about automating things, maybe something like :

  $ hpijs --list-models

or simply :

  $ hpijs -l

I would have written the patch without the comment about ModelName being deprecated in models.h, but since this comment recommends to not use it, then I don't know what to do.

Maybe this could be integrated in the project's TODO ?

Revision history for this message
Jerome Alet (jalet) said :
#3

NB : by automating I meant something different than grepping the sources...

Revision history for this message
David Suffield (david-suffield) said :
#4

HPIJS currently support about 20 different device classes. So this means all you need to test is about 20 different printers. If you look at http://hplip.sourceforge.net/tech_docs/printable_areas.html all the current devices classes are listed. This data was generated from hpijs so it is up-to-date.

You can create printer-ready-files with standard gs commands. For example:

$ gs -sDEVICE=ijs -sIjsServer=hpijs -dIjsUseOutputFD -sDeviceManufacturer="HEWLETT-PACKARD" \
  -sDeviceModel="DESKJET 990" -r300 -dNOPAUSE -dSAFER -sOutputFile="/dev/lp0" file.ps -c quit

A good way to get gs commands is from the cups error_log with loglevel=debug.

-dave

Revision history for this message
Jerome Alet (jalet) said :
#5

That's mostly what I've done : I've manually extracted the device classes names and put them in my testsuite (http://svn.librelogiciel.com/cgi-bin/viewcvs.cgi/pkpgcounter/trunk/tests/gstests.py?rev=378&view=markup)

This sucks big time IMHO, especially considering that ghostscript CAN list all its supported devices easily in a parsable way :

/bin/echo "devicenames ==" | gs -dBATCH -dQUIET -dNOPAUSE -dPARANOIDSAFER -sDEVICE=nullpage -

This would be great if hpijs could do the same, even if it doesn't change for a long time.

Anyway, my problem is solved. I just don't like the way it is.