summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorFabian Möller <fabianm88@gmail.com>2022-01-22 21:21:13 +0100
committerFabian Möller <fabianm88@gmail.com>2022-01-22 21:21:13 +0100
commit8ae82554c915e8d1f0af53c4588e65e01d76f97d (patch)
treef9af64c1d152e53e24a7ba12fbbe76947d2193fb /nixos
parent4bbd574b2bd8c8ec47871258a3ae149043c1b684 (diff)
downloadnixpkgs-8ae82554c915e8d1f0af53c4588e65e01d76f97d.tar
nixpkgs-8ae82554c915e8d1f0af53c4588e65e01d76f97d.tar.gz
nixpkgs-8ae82554c915e8d1f0af53c4588e65e01d76f97d.tar.bz2
nixpkgs-8ae82554c915e8d1f0af53c4588e65e01d76f97d.tar.lz
nixpkgs-8ae82554c915e8d1f0af53c4588e65e01d76f97d.tar.xz
nixpkgs-8ae82554c915e8d1f0af53c4588e65e01d76f97d.tar.zst
nixpkgs-8ae82554c915e8d1f0af53c4588e65e01d76f97d.zip
nixos/tests/wine: fix gecko check and diskSize type
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/wine.nix15
1 files changed, 11 insertions, 4 deletions
diff --git a/nixos/tests/wine.nix b/nixos/tests/wine.nix
index c46c7d338b2..4d285df52fa 100644
--- a/nixos/tests/wine.nix
+++ b/nixos/tests/wine.nix
@@ -3,7 +3,7 @@
 }:
 
 let
-  inherit (pkgs.lib) concatMapStrings listToAttrs;
+  inherit (pkgs.lib) concatMapStrings listToAttrs optionals optionalString;
   inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest;
 
   hello32 = "${pkgs.pkgsCross.mingw32.hello}/bin/hello.exe";
@@ -17,7 +17,7 @@ let
 
       machine = { pkgs, ... }: {
         environment.systemPackages = [ pkgs."${packageSet}"."${variant}" ];
-        virtualisation.diskSize = "800";
+        virtualisation.diskSize = 800;
       };
 
       testScript = ''
@@ -27,6 +27,9 @@ let
               "bash -c 'wine ${exe} 2> >(tee wine-stderr >&2)'"
           )
           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(
               "fgrep 'Could not find Wine Gecko. HTML rendering will be disabled.' wine-stderr"
           )
@@ -37,5 +40,9 @@ let
 
   variants = [ "base" "full" "minimal" "staging" "unstable" ];
 
-in listToAttrs (map (makeWineTest "winePackages" [ hello32 ]) variants
-  ++ map (makeWineTest "wineWowPackages" [ hello32 hello64 ]) variants)
+in
+listToAttrs (
+  map (makeWineTest "winePackages" [ hello32 ]) variants
+  ++ optionals pkgs.stdenv.is64bit
+    (map (makeWineTest "wineWowPackages" [ hello32 hello64 ]) variants)
+)