Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/tests: add missing tests #156314

Merged
merged 3 commits into from
Jan 24, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ in
borgbackup = handleTest ./borgbackup.nix {};
botamusique = handleTest ./botamusique.nix {};
bpf = handleTestOn ["x86_64-linux" "aarch64-linux"] ./bpf.nix {};
brscan5 = handleTest ./brscan5.nix {};
btrbk = handleTest ./btrbk.nix {};
buildbot = handleTest ./buildbot.nix {};
buildkite-agents = handleTest ./buildkite-agents.nix {};
Expand Down Expand Up @@ -121,6 +122,7 @@ in
docker-tools-cross = handleTestOn ["x86_64-linux" "aarch64-linux"] ./docker-tools-cross.nix {};
docker-tools-overlay = handleTestOn ["x86_64-linux"] ./docker-tools-overlay.nix {};
documize = handleTest ./documize.nix {};
doh-proxy-rust = handleTest ./doh-proxy-rust.nix {};
dokuwiki = handleTest ./dokuwiki.nix {};
domination = handleTest ./domination.nix {};
dovecot = handleTest ./dovecot.nix {};
Expand All @@ -130,6 +132,7 @@ in
ecryptfs = handleTest ./ecryptfs.nix {};
ejabberd = handleTest ./xmpp/ejabberd.nix {};
elk = handleTestOn ["x86_64-linux"] ./elk.nix {};
emacs-daemon = handleTest ./emacs-daemon.nix {};
engelsystem = handleTest ./engelsystem.nix {};
enlightenment = handleTest ./enlightenment.nix {};
env = handleTest ./env.nix {};
Expand All @@ -141,6 +144,7 @@ in
etesync-dav = handleTest ./etesync-dav.nix {};
fancontrol = handleTest ./fancontrol.nix {};
fcitx = handleTest ./fcitx {};
fenics = handleTest ./fenics.nix {};
ferm = handleTest ./ferm.nix {};
firefox = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox; };
firefox-esr = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox-esr; }; # used in `tested` job
Expand All @@ -157,6 +161,7 @@ in
fsck = handleTest ./fsck.nix {};
ft2-clone = handleTest ./ft2-clone.nix {};
gerrit = handleTest ./gerrit.nix {};
geth = handleTest ./geth.nix {};
ghostunnel = handleTest ./ghostunnel.nix {};
gitdaemon = handleTest ./gitdaemon.nix {};
gitea = handleTest ./gitea.nix {};
Expand All @@ -181,6 +186,7 @@ in
hadoop.all = handleTestOn [ "x86_64-linux" ] ./hadoop/hadoop.nix {};
hadoop.hdfs = handleTestOn [ "x86_64-linux" ] ./hadoop/hdfs.nix {};
hadoop.yarn = handleTestOn [ "x86_64-linux" ] ./hadoop/yarn.nix {};
haka = handleTest ./haka.nix {};
handbrake = handleTestOn ["x86_64-linux"] ./handbrake.nix {};
haproxy = handleTest ./haproxy.nix {};
hardened = handleTest ./hardened.nix {};
Expand Down Expand Up @@ -219,14 +225,19 @@ in
iodine = handleTest ./iodine.nix {};
ipfs = handleTest ./ipfs.nix {};
ipv6 = handleTest ./ipv6.nix {};
iscsi-multipath-root = handleTest ./iscsi-multipath-root.nix {};
iscsi-root = handleTest ./iscsi-root.nix {};
isso = handleTest ./isso.nix {};
jackett = handleTest ./jackett.nix {};
jellyfin = handleTest ./jellyfin.nix {};
jenkins = handleTest ./jenkins.nix {};
jenkins-cli = handleTest ./jenkins-cli.nix {};
jibri = handleTest ./jibri.nix {};
jirafeau = handleTest ./jirafeau.nix {};
jitsi-meet = handleTest ./jitsi-meet.nix {};
k3s = handleTest ./k3s.nix {};
k3s-single-node = handleTest ./k3s-single-node.nix {};
k3s-single-node-docker = handleTest ./k3s-single-node-docker.nix {};
kafka = handleTest ./kafka.nix {};
kbd-setfont-decompress = handleTest ./kbd-setfont-decompress.nix {};
kbd-update-search-paths-patch = handleTest ./kbd-update-search-paths-patch.nix {};
Expand Down Expand Up @@ -274,6 +285,7 @@ in
matrix-conduit = handleTest ./matrix-conduit.nix {};
matrix-synapse = handleTest ./matrix-synapse.nix {};
mattermost = handleTest ./mattermost.nix {};
mediatomb = handleTest ./mediatomb.nix {};
mediawiki = handleTest ./mediawiki.nix {};
meilisearch = handleTest ./meilisearch.nix {};
memcached = handleTest ./memcached.nix {};
Expand All @@ -286,6 +298,7 @@ in
misc = handleTest ./misc.nix {};
mjolnir = handleTest ./matrix/mjolnir.nix {};
mod_perl = handleTest ./mod_perl.nix {};
molly-brown = handleTest ./molly-brown.nix {};
mongodb = handleTest ./mongodb.nix {};
moodle = handleTest ./moodle.nix {};
morty = handleTest ./morty.nix {};
Expand Down Expand Up @@ -379,6 +392,7 @@ in
php74 = handleTest ./php { php = pkgs.php74; };
php80 = handleTest ./php { php = pkgs.php80; };
php81 = handleTest ./php { php = pkgs.php81; };
pict-rs = handleTest ./pict-rs.nix {};
pinnwand = handleTest ./pinnwand.nix {};
plasma5 = handleTest ./plasma5.nix {};
plasma5-systemd-start = handleTest ./plasma5-systemd-start.nix {};
Expand Down Expand Up @@ -420,12 +434,16 @@ in
rasdaemon = handleTest ./rasdaemon.nix {};
redis = handleTest ./redis.nix {};
redmine = handleTest ./redmine.nix {};
resolv = handleTest ./resolv.nix {};
restartByActivationScript = handleTest ./restart-by-activation-script.nix {};
restic = handleTest ./restic.nix {};
riak = handleTest ./riak.nix {};
robustirc-bridge = handleTest ./robustirc-bridge.nix {};
roundcube = handleTest ./roundcube.nix {};
rspamd = handleTest ./rspamd.nix {};
rss2email = handleTest ./rss2email.nix {};
rstudio-server = handleTest ./rstudio-server.nix {};
rsyncd = handleTest ./rsyncd.nix {};
rsyslogd = handleTest ./rsyslogd.nix {};
rxe = handleTest ./rxe.nix {};
sabnzbd = handleTest ./sabnzbd.nix {};
Expand All @@ -446,6 +464,7 @@ in
smokeping = handleTest ./smokeping.nix {};
snapcast = handleTest ./snapcast.nix {};
snapper = handleTest ./snapper.nix {};
soapui = handleTest ./soapui.nix {};
sogo = handleTest ./sogo.nix {};
solanum = handleTest ./solanum.nix {};
solr = handleTest ./solr.nix {};
Expand Down Expand Up @@ -482,6 +501,7 @@ in
systemd-timesyncd = handleTest ./systemd-timesyncd.nix {};
systemd-unit-path = handleTest ./systemd-unit-path.nix {};
taskserver = handleTest ./taskserver.nix {};
teeworlds = handleTest ./teeworlds.nix {};
telegraf = handleTest ./telegraf.nix {};
teleport = handleTest ./teleport.nix {};
thelounge = handleTest ./thelounge.nix {};
Expand Down Expand Up @@ -525,6 +545,7 @@ in
vscodium = discoverTests (import ./vscodium.nix);
wasabibackend = handleTest ./wasabibackend.nix {};
wiki-js = handleTest ./wiki-js.nix {};
wine = handleTest ./wine.nix {};
wireguard = handleTest ./wireguard {};
without-nix = handleTest ./without-nix.nix {};
wmderland = handleTest ./wmderland.nix {};
Expand Down
4 changes: 3 additions & 1 deletion pkgs/applications/blockchains/go-ethereum/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, buildGoModule, fetchFromGitHub, libobjc, IOKit }:
{ lib, stdenv, buildGoModule, fetchFromGitHub, libobjc, IOKit, nixosTests }:

let
# A list of binaries to put into separate outputs
Expand Down Expand Up @@ -50,6 +50,8 @@ in buildGoModule rec {
propagatedBuildInputs =
lib.optionals stdenv.isDarwin [ libobjc IOKit ];

passthru.tests = { inherit (nixosTests) geth; };

meta = with lib; {
homepage = "https://geth.ethereum.org/";
description = "Official golang implementation of the Ethereum protocol";
Expand Down
3 changes: 2 additions & 1 deletion pkgs/applications/editors/emacs/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
, Xaw3d, libXcursor, pkg-config, gettext, libXft, dbus, libpng, libjpeg, giflib
, libtiff, librsvg, gconf, libxml2, imagemagick, gnutls, libselinux
, alsa-lib, cairo, acl, gpm, AppKit, GSS, ImageIO, m17n_lib, libotf
, sigtool, jansson, harfbuzz, sqlite
, sigtool, jansson, harfbuzz, sqlite, nixosTests
, dontRecurseIntoAttrs ,emacsPackagesFor
, libgccjit, targetPlatform, makeWrapper # native-comp params
, systemd ? null
Expand Down Expand Up @@ -208,6 +208,7 @@ let emacs = stdenv.mkDerivation (lib.optionalAttrs nativeComp {
passthru = {
inherit nativeComp;
pkgs = dontRecurseIntoAttrs (emacsPackagesFor emacs);
tests = { inherit (nixosTests) emacs-daemon; };
};

meta = with lib; {
Expand Down
6 changes: 5 additions & 1 deletion pkgs/applications/editors/rstudio/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
, server ? false # build server version
, sqlite
, pam
, nixosTests
}:

let
Expand Down Expand Up @@ -209,7 +210,10 @@ in
platforms = platforms.linux;
};

passthru = { inherit server; };
passthru = {
inherit server;
tests = { inherit (nixosTests) rstudio-server; };
};
} // lib.optionalAttrs (!server) {
qtWrapperArgs = [
"--suffix PATH : ${lib.makeBinPath [ gnumake ]}"
Expand Down
4 changes: 3 additions & 1 deletion pkgs/applications/graphics/sane/backends/brscan5/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, callPackage, patchelf, makeWrapper, coreutils, libusb1, avahi-compat, glib, libredirect }:
{ stdenv, lib, fetchurl, callPackage, patchelf, makeWrapper, coreutils, libusb1, avahi-compat, glib, libredirect, nixosTests }:
let
myPatchElf = file: with lib; ''
patchelf --set-interpreter \
Expand Down Expand Up @@ -88,6 +88,8 @@ stdenv.mkDerivation rec {

dontPatchELF = true;

passthru.tests = { inherit (nixosTests) brscan5; };

meta = {
description = "Brother brscan5 sane backend driver";
homepage = "https://www.brother.com";
Expand Down
3 changes: 3 additions & 0 deletions pkgs/applications/networking/cluster/k3s/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
, fetchzip
, fetchgit
, zstd
, nixosTests
}:

with lib;
Expand Down Expand Up @@ -289,5 +290,7 @@ stdenv.mkDerivation rec {

passthru.updateScript = ./update.sh;

passthru.tests = { inherit (nixosTests) k3s-single-node k3s-single-node-docker; };

meta = baseMeta;
}
4 changes: 3 additions & 1 deletion pkgs/applications/networking/soapui/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ fetchurl, lib, stdenv, writeText, jdk, makeWrapper }:
{ fetchurl, lib, stdenv, writeText, jdk, makeWrapper, nixosTests }:

stdenv.mkDerivation rec {
pname = "soapui";
Expand Down Expand Up @@ -46,6 +46,8 @@ stdenv.mkDerivation rec {
'')
];

passthru.tests = { inherit (nixosTests) soapui; };

meta = with lib; {
description = "The Most Advanced REST & SOAP Testing Tool in the World";
homepage = "https://www.soapui.org/";
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/libraries/science/math/fenics/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
, zlib
, blas
, lapack
, nixosTests
}:
let
version = "2019.1.0";
Expand Down Expand Up @@ -260,6 +261,7 @@ let
pythonPackages.pybind11
];
doCheck = false; # Tries to orte_ess_init and call ssh to localhost
passthru.tests = { inherit (nixosTests) fenics; };
meta = {
description = "Python bindings for the DOLFIN FEM compiler";
homepage = "https://fenicsproject.org/";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
'';

passthru = {
tests = { inherit (nixosTests) jenkins; };
tests = { inherit (nixosTests) jenkins jenkins-cli; };

updateScript = writeScript "update.sh" ''
#!${stdenv.shell}
Expand Down
7 changes: 5 additions & 2 deletions pkgs/misc/emulators/wine/base.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ stdenv, lib, pkgArches, callPackage,
name, version, src, mingwGccs, monos, geckos, platforms,
bison, flex, fontforge, makeWrapper, pkg-config,
autoconf, hexdump, perl,
autoconf, hexdump, perl, nixosTests,
supportFlags,
patches,
buildScript ? null, configureFlags ? []
Expand Down Expand Up @@ -144,7 +144,10 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) {
++ lib.optional (stdenv.hostPlatform.isDarwin) "fortify"
++ lib.optional (supportFlags.mingwSupport) "format";

passthru = { inherit pkgArches; };
passthru = {
inherit pkgArches;
tests = { inherit (nixosTests) wine; };
};
meta = {
inherit version platforms;
homepage = "https://www.winehq.org/";
Expand Down
4 changes: 3 additions & 1 deletion pkgs/os-specific/linux/multipath-tools/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, perl, lvm2, libaio, gzip, readline, systemd, liburcu, json_c, kmod }:
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, perl, lvm2, libaio, gzip, readline, systemd, liburcu, json_c, kmod, nixosTests }:

stdenv.mkDerivation rec {
pname = "multipath-tools";
Expand Down Expand Up @@ -53,6 +53,8 @@ stdenv.mkDerivation rec {
"SYSTEMDPATH=lib"
];

passthru.tests = { inherit (nixosTests) iscsi-multipath-root; };

meta = with lib; {
description = "Tools for the Linux multipathing driver";
homepage = "http://christophe.varoqui.free.fr/";
Expand Down
4 changes: 3 additions & 1 deletion pkgs/os-specific/linux/open-iscsi/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ lib, stdenv, fetchFromGitHub, automake, autoconf, libtool, gettext
, util-linux, open-isns, openssl, kmod, perl, systemd, pkgconf
, util-linux, open-isns, openssl, kmod, perl, systemd, pkgconf, nixosTests
}:

stdenv.mkDerivation rec {
Expand Down Expand Up @@ -42,6 +42,8 @@ stdenv.mkDerivation rec {
sed -i "s|/sbin/iscsiadm|$out/bin/iscsiadm|" $out/bin/iscsi_fw_login
'';

passthru.tests = { inherit (nixosTests) iscsi-root iscsi-multipath-root; };

meta = with lib; {
description = "A high performance, transport independent, multi-platform implementation of RFC3720";
license = licenses.gpl2Plus;
Expand Down
4 changes: 3 additions & 1 deletion pkgs/servers/dns/doh-proxy-rust/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, rustPlatform, fetchCrate, stdenv, Security, libiconv }:
{ lib, rustPlatform, fetchCrate, stdenv, Security, libiconv, nixosTests }:

rustPlatform.buildRustPackage rec {
pname = "doh-proxy-rust";
Expand All @@ -14,6 +14,8 @@ rustPlatform.buildRustPackage rec {

buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv ];

passthru.tests = { inherit (nixosTests) doh-proxy-rust; };

meta = with lib; {
homepage = "https://github.com/jedisct1/doh-server";
description = "Fast, mature, secure DoH server proxy written in Rust";
Expand Down
3 changes: 3 additions & 0 deletions pkgs/servers/gerbera/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
, fetchFromGitHub
, cmake
, pkg-config
, nixosTests
# required
, libiconv
, libupnp
Expand Down Expand Up @@ -96,6 +97,8 @@ stdenv.mkDerivation rec {
zlib
] ++ flatten (builtins.catAttrs "packages" (builtins.filter (e: e.enable) options));

passthru.tests = { inherit (nixosTests) mediatomb; };

meta = with lib; {
homepage = "https://docs.gerbera.io/";
description = "UPnP Media Server for 2020";
Expand Down
4 changes: 3 additions & 1 deletion pkgs/servers/isso/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, nodejs, lib, python3Packages, fetchFromGitHub }:
{ pkgs, nodejs, lib, python3Packages, fetchFromGitHub, nixosTests }:
let
nodeEnv = import ./node-env.nix {
inherit (pkgs) stdenv lib python2 runCommand writeTextFile;
Expand Down Expand Up @@ -53,6 +53,8 @@ with python3Packages; buildPythonApplication rec {
${python.interpreter} setup.py nosetests
'';

passthru.tests = { inherit (nixosTests) isso; };

meta = with lib; {
description = "A commenting server similar to Disqus";
homepage = "https://posativ.org/isso/";
Expand Down
4 changes: 3 additions & 1 deletion pkgs/servers/mediatomb/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ lib, stdenv, fetchgit
, sqlite, expat, mp4v2, flac, spidermonkey_68, taglib, libexif, curl, ffmpeg, file
, pkg-config, autoreconfHook }:
, pkg-config, autoreconfHook, nixosTests }:

stdenv.mkDerivation rec {
pname = "mediatomb";
Expand All @@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
buildInputs = [ sqlite expat spidermonkey_68 taglib libexif curl ffmpeg file mp4v2 flac
pkg-config autoreconfHook ];

passthru.tests = { inherit (nixosTests) mediatomb; };

meta = with lib; {
homepage = "http://mediatomb.cc";
repositories.git = "git://mediatomb.git.sourceforge.net/gitroot/mediatomb/mediatomb";
Expand Down
4 changes: 3 additions & 1 deletion pkgs/servers/nosql/riak/2.2.0.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, unzip, erlang, which, pam }:
{ stdenv, lib, fetchurl, unzip, erlang, which, pam, nixosTests }:

let
solrName = "solr-4.10.4-yz-2.tgz";
Expand Down Expand Up @@ -90,6 +90,8 @@ stdenv.mkDerivation {
runHook postInstall
'';

passthru.tests = { inherit (nixosTests) riak; };

meta = with lib; {
maintainers = with maintainers; [ cstrahan mdaiter ];
description = "Dynamo inspired NoSQL DB by Basho";
Expand Down
Loading