diff options
author | Léo Gaspard <leo@gaspard.io> | 2018-08-04 12:18:28 +0900 |
---|---|---|
committer | Léo Gaspard <leo@gaspard.io> | 2018-10-30 21:31:39 +0900 |
commit | 02e1f00ffdd0c1a74fbc0be5f314b8921b0c9165 (patch) | |
tree | 36033a707a534eaffc6992a11dbb61ec779fbf07 /pkgs/servers/mail/dovecot | |
parent | de8f3b422aa390bb15900e482cef1a3ee227f3e5 (diff) | |
download | nixpkgs-02e1f00ffdd0c1a74fbc0be5f314b8921b0c9165.tar nixpkgs-02e1f00ffdd0c1a74fbc0be5f314b8921b0c9165.tar.gz nixpkgs-02e1f00ffdd0c1a74fbc0be5f314b8921b0c9165.tar.bz2 nixpkgs-02e1f00ffdd0c1a74fbc0be5f314b8921b0c9165.tar.lz nixpkgs-02e1f00ffdd0c1a74fbc0be5f314b8921b0c9165.tar.xz nixpkgs-02e1f00ffdd0c1a74fbc0be5f314b8921b0c9165.tar.zst nixpkgs-02e1f00ffdd0c1a74fbc0be5f314b8921b0c9165.zip |
dovecot, opensmtpd: add link to test in `meta.tests`
Rationale --------- Currently, tests are hard to discover. For instance, someone updating `dovecot` might not notice that the interaction of `dovecot` with `opensmtpd` is handled in the `opensmtpd.nix` test. And even for someone updating `opensmtpd`, it requires manual work to go check in `nixos/tests` whether there is actually a test, especially given not so many packages in `nixpkgs` have tests and this is thus most of the time useless. Finally, for the reviewer, it is much easier to check that the “Tested via one or more NixOS test(s)” has been checked if the file modified already includes the list of relevant tests. Implementation -------------- Currently, this commit only adds the metadata in the package. Each element of the `meta.tests` attribute is a derivation that, when it builds successfully, means the test has passed (ie. following the same convention as NixOS tests). Future Work ----------- In the future, the tools could be made aware of this `meta.tests` attribute, and for instance a `--with-tests` could be added to `nix-build` so that it also builds all the tests. Or a `--without-tests` to build without all the tests. @Profpatsch described in his NixCon talk such systems. Another thing that would help in the future would be the possibility to reasonably easily have cross-derivation nix tests without the whole NixOS VM stack. @7c6f434c already proposed such a system. This RFC currently handles none of these concerns. Only the addition of `meta.tests` as metadata to be used by maintainers to remember to run relevant tests.
Diffstat (limited to 'pkgs/servers/mail/dovecot')
-rw-r--r-- | pkgs/servers/mail/dovecot/default.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/servers/mail/dovecot/default.nix b/pkgs/servers/mail/dovecot/default.nix index 3e628f876dd..638393bd356 100644 --- a/pkgs/servers/mail/dovecot/default.nix +++ b/pkgs/servers/mail/dovecot/default.nix @@ -1,6 +1,7 @@ { stdenv, lib, fetchurl, perl, pkgconfig, systemd, openssl , bzip2, zlib, lz4, inotify-tools, pam, libcap , clucene_core_2, icu, openldap, libsodium, libstemmer, cyrus_sasl +, nixosTests # Auth modules , withMySQL ? false, mysql , withPgSQL ? false, postgresql @@ -74,5 +75,8 @@ stdenv.mkDerivation rec { description = "Open source IMAP and POP3 email server written with security primarily in mind"; maintainers = with stdenv.lib.maintainers; [ peti rickynils fpletz ]; platforms = stdenv.lib.platforms.unix; + tests = { + opensmtpd-interaction = nixosTests.opensmtpd; + }; }; } |