Commit 05f07f29 authored by Profpatsch's avatar Profpatsch

nixos/modules/testing/tests: add options.tests

An option for keeping module tests close to the modules they belong to.
parent 548a28f2
......@@ -755,6 +755,7 @@
./tasks/trackpoint.nix
./tasks/powertop.nix
./testing/service-runner.nix
./testing/tests.nix
./virtualisation/container-config.nix
./virtualisation/containers.nix
./virtualisation/docker.nix
......
{ lib, pkgs, ... }:
{
options.tests = lib.mkOption {
type = with lib.types; nestedOf attrsOf package;
default = {};
example = {
services.awesomeService.test1 = "VM test for awesomeService";
some.other.module = {
testsuite = "…";
miscTests.test1 = "testdrv";
miscTests.test2 = "otherdrv";
};
};
description = ''
A nested attribute set of module tests.
Modules should mirror their option namespace.
Continuous integration (e.g. hydra) can define
which tests to run by using the normal way of activating
<literal>enable</literal>-Options and evaluating the
<literal>config.tests</literal> attribute set generated
by evaluation of the module system.
'';
};
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment