From 51c349d0cc39fa8f692386e3f6d25653a91e17db Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 24 Sep 2014 23:48:31 +0200 Subject: [PATCH] test-driver: Use netpbm instead of imagemagick Imagemagick pulls in 100s of megabytes of dependencies. --- nixos/lib/test-driver/Machine.pm | 2 +- nixos/lib/testing.nix | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/lib/test-driver/Machine.pm b/nixos/lib/test-driver/Machine.pm index e2bd3393d872..85c2bfa88e1a 100644 --- a/nixos/lib/test-driver/Machine.pm +++ b/nixos/lib/test-driver/Machine.pm @@ -482,7 +482,7 @@ sub screenshot { my $name = basename($filename); $self->nest("making screenshot ‘$name’", sub { $self->sendMonitorCommand("screendump $tmp"); - system("convert $tmp ${filename}") == 0 + system("pnmtopng $tmp > ${filename}") == 0 or die "cannot convert screenshot"; unlink $tmp; }, { image => $name } ); diff --git a/nixos/lib/testing.nix b/nixos/lib/testing.nix index 75e9c3977763..73b55ed6c060 100644 --- a/nixos/lib/testing.nix +++ b/nixos/lib/testing.nix @@ -27,7 +27,7 @@ rec { cp ${./test-driver/Logger.pm} $libDir/Logger.pm wrapProgram $out/bin/nixos-test-driver \ - --prefix PATH : "${pkgs.qemu_kvm}/bin:${pkgs.vde2}/bin:${imagemagick}/bin:${coreutils}/bin" \ + --prefix PATH : "${qemu_kvm}/bin:${vde2}/bin:${netpbm}/bin:${coreutils}/bin" \ --prefix PERL5LIB : "${lib.makePerlPath [ perlPackages.TermReadLineGnu perlPackages.XMLWriter perlPackages.IOTty ]}:$out/lib/perl5/site_perl" ''; }; @@ -41,7 +41,7 @@ rec { requiredSystemFeatures = [ "kvm" "nixos-test" ]; - buildInputs = [ pkgs.libxslt ]; + buildInputs = [ libxslt ]; buildCommand = '' @@ -153,7 +153,7 @@ rec { startAll; $client->waitForUnit("multi-user.target"); ${preBuild} - $client->succeed("env -i ${pkgs.bash}/bin/bash ${buildrunner} /tmp/xchg/saved-env >&2"); + $client->succeed("env -i ${bash}/bin/bash ${buildrunner} /tmp/xchg/saved-env >&2"); ${postBuild} $client->succeed("sync"); # flush all data before pulling the plug '';