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:
parent
3a77a2e409
commit
ad87aef2ab
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue