3
0
Fork 0
forked from mirrors/nixpkgs

nixos/tests/chromium: Allow to override packages.

Of course, this could be done via packageOverrides, but this is more
explicit and makes it possible to run the tests with various Chromium
overrides.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2014-11-19 15:48:14 +01:00
parent 3a77a2e409
commit ad87aef2ab
No known key found for this signature in database
GPG key ID: D0EBD0EC8C2DC961

View file

@ -1,4 +1,12 @@
import ./make-test.nix ({ pkgs, ... }: rec { import ./make-test.nix (
{ pkgs
, channelMap ? {
stable = pkgs.chromium;
beta = pkgs.chromiumBeta;
dev = pkgs.chromiumDev;
}
, ...
}: rec {
name = "chromium"; name = "chromium";
machine.imports = [ ./common/x11.nix ]; machine.imports = [ ./common/x11.nix ];
@ -116,11 +124,10 @@ import ./make-test.nix ({ pkgs, ... }: rec {
$machine->shutdown; $machine->shutdown;
} }
for ( for (${let
["stable", "${pkgs.chromium}"], mkArray = name: pkg: "[\"${name}\", \"${pkg}\"]";
["beta", "${pkgs.chromiumBeta}"], chanArrays = pkgs.lib.mapAttrsToList mkArray channelMap;
["dev", "${pkgs.chromiumDev}"] in pkgs.lib.concatStringsSep ", " chanArrays}) {
) {
my ($channel, $pkg) = @$_; my ($channel, $pkg) = @$_;
chromiumTest $channel, $pkg, sub { chromiumTest $channel, $pkg, sub {
testNewWin "check sandbox", sub { testNewWin "check sandbox", sub {