diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2020-11-06 12:51:56 +0100 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2020-11-06 12:51:56 +0100 |
commit | 99fb79ae843e9bc29513365e17418d4f1aee4ce0 (patch) | |
tree | 95fe1827d215ad2d101d15590332a8b46c09dc4c /nixos/tests | |
parent | c7176d55ac8a801a0368014a3c76c4ebbd5eacaa (diff) | |
parent | da04a8e39741bbf336344b75b9842f2a7dc76ac1 (diff) |
Merge master into staging-next
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/all-tests.nix | 2 | ||||
-rw-r--r-- | nixos/tests/oh-my-zsh.nix | 18 | ||||
-rw-r--r-- | nixos/tests/scala.nix | 33 |
3 files changed, 53 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index ae672ceda7513..f36b70bae7fcc 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -255,6 +255,7 @@ in novacomd = handleTestOn ["x86_64-linux"] ./novacomd.nix {}; nsd = handleTest ./nsd.nix {}; nzbget = handleTest ./nzbget.nix {}; + oh-my-zsh = handleTest ./oh-my-zsh.nix {}; openarena = handleTest ./openarena.nix {}; openldap = handleTest ./openldap.nix {}; opensmtpd = handleTest ./opensmtpd.nix {}; @@ -313,6 +314,7 @@ in samba = handleTest ./samba.nix {}; sanoid = handleTest ./sanoid.nix {}; sbt = handleTest ./sbt.nix {}; + scala = handleTest ./scala.nix {}; sddm = handleTest ./sddm.nix {}; service-runner = handleTest ./service-runner.nix {}; shadowsocks = handleTest ./shadowsocks {}; diff --git a/nixos/tests/oh-my-zsh.nix b/nixos/tests/oh-my-zsh.nix new file mode 100644 index 0000000000000..57a073b086e88 --- /dev/null +++ b/nixos/tests/oh-my-zsh.nix @@ -0,0 +1,18 @@ +import ./make-test-python.nix ({ pkgs, ... }: { + name = "oh-my-zsh"; + + machine = { pkgs, ... }: + + { + programs.zsh = { + enable = true; + ohMyZsh.enable = true; + }; + }; + + testScript = '' + start_all() + machine.succeed("touch ~/.zshrc") + machine.succeed("zsh -c 'source /etc/zshrc && echo $ZSH | grep oh-my-zsh-${pkgs.oh-my-zsh.version}'") + ''; +}) diff --git a/nixos/tests/scala.nix b/nixos/tests/scala.nix new file mode 100644 index 0000000000000..f99d9e563ffe3 --- /dev/null +++ b/nixos/tests/scala.nix @@ -0,0 +1,33 @@ +{ system ? builtins.currentSystem, + config ? {}, + pkgs ? import ../.. { inherit system config; } +}: + +with pkgs.lib; + +let + common = name: package: (import ./make-test-python.nix ({ + inherit name; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ nequissimus ]; + }; + + nodes = { + scala = { ... }: { + environment.systemPackages = [ package ]; + }; + }; + + testScript = '' + start_all() + + scala.succeed("scalac -version 2>&1 | grep '^Scala compiler version ${package.version}'") + ''; + }) { inherit system; }); + +in with pkgs; { + scala_2_10 = common "scala_2_10" scala_2_10; + scala_2_11 = common "scala_2_11" scala_2_11; + scala_2_12 = common "scala_2_12" scala_2_12; + scala_2_13 = common "scala_2_13" scala_2_13; +} |