3
0
Fork 0
forked from mirrors/nixpkgs

nixos.tests.printing: fix

Two fixes:

Not really sure why removing `--fail` from the curl calls is necessary,
but with that option, curl erronously reports 404 (which it shouldn't
per my interactive vm testing).

Fix paths to example files used for the printing test

Toghether, these changes allow the test to run to completion on my machine.
This commit is contained in:
Joachim Fasting 2016-04-18 01:16:19 +02:00
parent 192a1ada24
commit 49894ac857
No known key found for this signature in database
GPG key ID: 4330820E1E04DCF4

View file

@ -40,9 +40,9 @@ import ./make-test.nix ({pkgs, ... }: {
$client->sleep(10); # wait until cups is fully initialized
$client->succeed("lpstat -r") =~ /scheduler is running/ or die;
$client->succeed("lpstat -H") =~ "/var/run/cups/cups.sock" or die;
$client->succeed("curl --fail http://localhost:631/");
$client->succeed("curl --fail http://server:631/");
$server->fail("curl --fail --connect-timeout 2 http://client:631/");
$client->succeed("curl http://localhost:631/");
$client->succeed("curl http://server:631/");
$server->fail("curl --connect-timeout 2 http://client:631/");
# Add a HP Deskjet printer connected via USB to the server.
$server->succeed("lpadmin -p DeskjetLocal -E -v usb://foobar/printers/foobar");
@ -60,10 +60,10 @@ import ./make-test.nix ({pkgs, ... }: {
$client->succeed("lpq") =~ /DeskjetRemote is ready.*no entries/s or die;
# Test printing various file types.
foreach my $file ("${pkgs.groff.doc}/share/doc/*/examples/mom/penguin.pdf",
"${pkgs.groff.doc}/share/doc/*/meref.ps",
foreach my $file ("${pkgs.groff.doc}/share/doc/examples/mom/penguin.pdf",
"${pkgs.groff.doc}/share/doc/meref.ps",
"${pkgs.cups}/share/doc/cups/images/cups.png",
"${pkgs.pcre.doc}/share/doc/pcre/pcre.txt")
"${pkgs.pcre.doc}/share/doc/pcre.txt")
{
$file =~ /([^\/]*)$/; my $fn = $1;