diff options
author | Scott Worley <scottworley@scottworley.com> | 2021-05-30 22:00:17 -0700 |
---|---|---|
committer | Scott Worley <scottworley@scottworley.com> | 2021-05-31 11:58:48 -0700 |
commit | 2690ab613b6226bdbb97503cc5754af213114ca5 (patch) | |
tree | 91c8772c4c955a5569e9e026ca52768c9aa7bc65 | |
parent | aa845c31004ea41d2205dbc5c2954437d374d9d2 (diff) | |
download | nixpkgs-2690ab613b6226bdbb97503cc5754af213114ca5.tar nixpkgs-2690ab613b6226bdbb97503cc5754af213114ca5.tar.gz nixpkgs-2690ab613b6226bdbb97503cc5754af213114ca5.tar.bz2 nixpkgs-2690ab613b6226bdbb97503cc5754af213114ca5.tar.lz nixpkgs-2690ab613b6226bdbb97503cc5754af213114ca5.tar.xz nixpkgs-2690ab613b6226bdbb97503cc5754af213114ca5.tar.zst nixpkgs-2690ab613b6226bdbb97503cc5754af213114ca5.zip |
nixos/tests/wine: Test all five wine variants
-rw-r--r-- | nixos/tests/wine.nix | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/nixos/tests/wine.nix b/nixos/tests/wine.nix index 29b8c482808..49ee19fe6af 100644 --- a/nixos/tests/wine.nix +++ b/nixos/tests/wine.nix @@ -1,14 +1,27 @@ -import ./make-test-python.nix ({ pkgs, ... }: { - name = "wine"; - meta = with pkgs.lib.maintainers; { maintainers = [ chkno ]; }; - - machine = { pkgs, ... }: { environment.systemPackages = [ pkgs.wine ]; }; - - testScript = '' - machine.wait_for_unit("multi-user.target") - greeting = machine.succeed( - 'wine ${pkgs.pkgsCross.mingw32.hello}/bin/hello.exe' - ) - assert 'Hello, world!' in greeting - ''; -}) +{ system ? builtins.currentSystem, pkgs ? import ../.. { + inherit system; + config = { }; +}, }: + +let + inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest; + + makeWineTest = variant: + makeTest { + name = "wine-${variant}"; + meta = with pkgs.lib.maintainers; { maintainers = [ chkno ]; }; + + machine = { pkgs, ... }: { + environment.systemPackages = [ pkgs.winePackages."${variant}" ]; + }; + + testScript = '' + machine.wait_for_unit("multi-user.target") + greeting = machine.succeed( + 'wine ${pkgs.pkgsCross.mingw32.hello}/bin/hello.exe' + ) + assert 'Hello, world!' in greeting + ''; + }; +in pkgs.lib.genAttrs [ "base" "full" "minimal" "staging" "unstable" ] +makeWineTest |