我自己找到了答案…
从源代码编译cups时,有一个子目录
杯子
. 它也有一个
生成文件
特定于这个街道。该生成文件包含名为
“单元测试”
哪个是
不是
默认生成!
但是如果你跑
make unittests
它不仅运行它的单元测试,而且还创建了一些命令行实用程序,这些工具可能在单元测试之外也能被很好地使用。
为了解决我的问题,
testipp
cli实用程序是纯金的。看你自己:
sudo ./testipp /var/spool/cups/c00089
operation-attributes-tag:
attributes-charset (charset): utf-8
attributes-natural-language (naturalLanguage): en-us
job-attributes-tag:
printer-uri (uri): ipp://localhost:631/printers/hp
job-originating-user-name (nameWithoutLanguage): kurtpfeifle
job-name (nameWithoutLanguage): hosts
copies (integer): 1
finishings (enum): none
job-cancel-after (integer): 10800
job-hold-until (keyword): no-hold
job-priority (integer): 50
job-sheets (1setOf nameWithoutLanguage): none,none
number-up (integer): 1
job-uuid (uri): urn:uuid:ca854775-f721-34a5-57e0-b38b8fb0f4c8
job-originating-host-name (nameWithoutLanguage): localhost
time-at-creation (integer): 1472022731
time-at-processing (integer): 1472022731
time-at-completed (integer): 1472022732
job-id (integer): 89
job-state (enum): completed
job-state-reasons (keyword): processing-to-stop-point
job-media-sheets-completed (integer): 0
job-printer-uri (uri): ipp://host13.local:631/printers/hp
job-k-octets (integer): 1
document-format (mimeMediaType): text/plain
job-printer-state-message (textWithoutLanguage): Printing page 1, 4% complete.
job-printer-state-reasons (keyword): none
不幸的是,跑步
make install
不会将此工具安装到系统中,因此它永远不会暴露给任何cups管理员!而且,linux发行版打包程序可能很容易忽略它。
睾丸
对大多数杯具极客来说都是暗箱操作。
有一些更有用的实用程序是由
进行单元测试
:
这些是:
testadmin, testarray, testcache, testclient, testconflicts, testcreds, testcups, testdest, testfile, testgetdests, testhttp, testi18n, testlang, testoptions, testppd, testpwg, testraster, testsnmp
.
不幸的是,目前还没有linux发行版构建和发布这些有用的工具。
所以,如果你认识一个发行版包装商,请把他指给这里的这个发现,让她包装一个漂亮的包
所有最终用户
cups-test-utils.rpm
或
cups-test-utils.deb
或
cups-test-utils.tgz
或者不管他的$distro的包名后缀是什么!
`