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