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";
|
||||
|
||||
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 {
|
||||
|
|
Loading…
Reference in a new issue