nixos/tests/wine: fix gecko check and diskSize type
This commit is contained in:
parent
4bbd574b2b
commit
8ae82554c9
|
@ -3,7 +3,7 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.lib) concatMapStrings listToAttrs;
|
inherit (pkgs.lib) concatMapStrings listToAttrs optionals optionalString;
|
||||||
inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest;
|
inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest;
|
||||||
|
|
||||||
hello32 = "${pkgs.pkgsCross.mingw32.hello}/bin/hello.exe";
|
hello32 = "${pkgs.pkgsCross.mingw32.hello}/bin/hello.exe";
|
||||||
|
@ -17,7 +17,7 @@ let
|
||||||
|
|
||||||
machine = { pkgs, ... }: {
|
machine = { pkgs, ... }: {
|
||||||
environment.systemPackages = [ pkgs."${packageSet}"."${variant}" ];
|
environment.systemPackages = [ pkgs."${packageSet}"."${variant}" ];
|
||||||
virtualisation.diskSize = "800";
|
virtualisation.diskSize = 800;
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
|
@ -27,6 +27,9 @@ let
|
||||||
"bash -c 'wine ${exe} 2> >(tee wine-stderr >&2)'"
|
"bash -c 'wine ${exe} 2> >(tee wine-stderr >&2)'"
|
||||||
)
|
)
|
||||||
assert 'Hello, world!' in greeting
|
assert 'Hello, world!' in greeting
|
||||||
|
''
|
||||||
|
# only the full version contains Gecko, but the error is not printed reliably in other variants
|
||||||
|
+ optionalString (variant == "full") ''
|
||||||
machine.fail(
|
machine.fail(
|
||||||
"fgrep 'Could not find Wine Gecko. HTML rendering will be disabled.' wine-stderr"
|
"fgrep 'Could not find Wine Gecko. HTML rendering will be disabled.' wine-stderr"
|
||||||
)
|
)
|
||||||
|
@ -37,5 +40,9 @@ let
|
||||||
|
|
||||||
variants = [ "base" "full" "minimal" "staging" "unstable" ];
|
variants = [ "base" "full" "minimal" "staging" "unstable" ];
|
||||||
|
|
||||||
in listToAttrs (map (makeWineTest "winePackages" [ hello32 ]) variants
|
in
|
||||||
++ map (makeWineTest "wineWowPackages" [ hello32 hello64 ]) variants)
|
listToAttrs (
|
||||||
|
map (makeWineTest "winePackages" [ hello32 ]) variants
|
||||||
|
++ optionals pkgs.stdenv.is64bit
|
||||||
|
(map (makeWineTest "wineWowPackages" [ hello32 hello64 ]) variants)
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in a new issue