nixos/lib, doc: remove references to mdDoc (#300738)
* doc: remove references to mdDoc in nixos/doc/manual/development/option-declarations.section.md * nixos/lib: remove mdDoc in nixos/lib/make-options-doc/default.nix * nixos/lib: remove mdDoc in nixos/lib/systemd-types.nix * nixos/lib: remove mdDoc in nixos/lib/systemd-unit-options.nix * nixos/lib: remove mdDoc in nixos/lib/testing/driver.nix * nixos/lib: remove mdDoc in nixos/lib/testing/interactive.nix * nixos/lib: remove mdDoc in nixos/lib/testing/meta.nix * nixos/lib: remove mdDoc in nixos/lib/testing/name.nix * nixos/lib: remove mdDoc in nixos/lib/testing/network.nix * nixos/lib: remove mdDoc in nixos/lib/testing/nodes.nix * nixos/lib: remove mdDoc in nixos/lib/testing/run.nix * nixos/lib: remove mdDoc in nixos/lib/testing/testScript.nix
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{ config, lib, hostPkgs, ... }:
|
||||
let
|
||||
inherit (lib) mkOption types literalMD mdDoc;
|
||||
inherit (lib) mkOption types literalMD;
|
||||
|
||||
# Reifies and correctly wraps the python test driver for
|
||||
# the respective qemu version and with or without ocr support
|
||||
@@ -104,13 +104,13 @@ in
|
||||
options = {
|
||||
|
||||
driver = mkOption {
|
||||
description = mdDoc "Package containing a script that runs the test.";
|
||||
description = "Package containing a script that runs the test.";
|
||||
type = types.package;
|
||||
defaultText = literalMD "set by the test framework";
|
||||
};
|
||||
|
||||
hostPkgs = mkOption {
|
||||
description = mdDoc "Nixpkgs attrset used outside the nodes.";
|
||||
description = "Nixpkgs attrset used outside the nodes.";
|
||||
type = types.raw;
|
||||
example = lib.literalExpression ''
|
||||
import nixpkgs { inherit system config overlays; }
|
||||
@@ -118,14 +118,14 @@ in
|
||||
};
|
||||
|
||||
qemu.package = mkOption {
|
||||
description = mdDoc "Which qemu package to use for the virtualisation of [{option}`nodes`](#test-opt-nodes).";
|
||||
description = "Which qemu package to use for the virtualisation of [{option}`nodes`](#test-opt-nodes).";
|
||||
type = types.package;
|
||||
default = hostPkgs.qemu_test;
|
||||
defaultText = "hostPkgs.qemu_test";
|
||||
};
|
||||
|
||||
globalTimeout = mkOption {
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
A global timeout for the complete test, expressed in seconds.
|
||||
Beyond that timeout, every resource will be killed and released and the test will fail.
|
||||
|
||||
@@ -137,7 +137,7 @@ in
|
||||
};
|
||||
|
||||
enableOCR = mkOption {
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
Whether to enable Optical Character Recognition functionality for
|
||||
testing graphical programs. See [Machine objects](`ssec-machine-objects`).
|
||||
'';
|
||||
@@ -146,7 +146,7 @@ in
|
||||
};
|
||||
|
||||
extraPythonPackages = mkOption {
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
Python packages to add to the test driver.
|
||||
|
||||
The argument is a Python package set, similar to `pkgs.pythonPackages`.
|
||||
@@ -159,7 +159,7 @@ in
|
||||
};
|
||||
|
||||
extraDriverArgs = mkOption {
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
Extra arguments to pass to the test driver.
|
||||
|
||||
They become part of [{option}`driver`](#test-opt-driver) via `wrapProgram`.
|
||||
@@ -171,7 +171,7 @@ in
|
||||
skipLint = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
Do not run the linters. This may speed up your iteration cycle, but it is not something you should commit.
|
||||
'';
|
||||
};
|
||||
@@ -179,7 +179,7 @@ in
|
||||
skipTypeCheck = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
Disable type checking. This must not be enabled for new NixOS tests.
|
||||
|
||||
This may speed up your iteration cycle, unless you're working on the [{option}`testScript`](#test-opt-testScript).
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{ config, lib, moduleType, hostPkgs, ... }:
|
||||
let
|
||||
inherit (lib) mkOption types mdDoc;
|
||||
inherit (lib) mkOption types;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
interactive = mkOption {
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
Tests [can be run interactively](#sec-running-nixos-tests-interactively)
|
||||
using the program in the test derivation's `.driverInteractive` attribute.
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib) types mkOption mdDoc;
|
||||
inherit (lib) types mkOption;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
meta = lib.mkOption {
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
The [`meta`](https://nixos.org/manual/nixpkgs/stable/#chap-meta) attributes that will be set on the returned derivations.
|
||||
|
||||
Not all [`meta`](https://nixos.org/manual/nixpkgs/stable/#chap-meta) attributes are supported, but more can be added as desired.
|
||||
@@ -16,21 +16,21 @@ in
|
||||
maintainers = lib.mkOption {
|
||||
type = types.listOf types.raw;
|
||||
default = [];
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
The [list of maintainers](https://nixos.org/manual/nixpkgs/stable/#var-meta-maintainers) for this test.
|
||||
'';
|
||||
};
|
||||
timeout = lib.mkOption {
|
||||
type = types.nullOr types.int;
|
||||
default = 3600; # 1 hour
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
The [{option}`test`](#test-opt-test)'s [`meta.timeout`](https://nixos.org/manual/nixpkgs/stable/#var-meta-timeout) in seconds.
|
||||
'';
|
||||
};
|
||||
broken = lib.mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
Sets the [`meta.broken`](https://nixos.org/manual/nixpkgs/stable/#var-meta-broken) attribute on the [{option}`test`](#test-opt-test) derivation.
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib) mkOption types mdDoc;
|
||||
inherit (lib) mkOption types;
|
||||
in
|
||||
{
|
||||
options.name = mkOption {
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
The name of the test.
|
||||
|
||||
This is used in the derivation names of the [{option}`driver`](#test-opt-driver) and [{option}`test`](#test-opt-test) runner.
|
||||
|
||||
@@ -5,7 +5,6 @@ let
|
||||
attrNames concatMap concatMapStrings flip forEach head
|
||||
listToAttrs mkDefault mkOption nameValuePair optionalString
|
||||
range toLower types zipListsWith zipLists
|
||||
mdDoc
|
||||
;
|
||||
|
||||
nodeNumbers =
|
||||
@@ -89,7 +88,7 @@ let
|
||||
default = name;
|
||||
# We need to force this in specilisations, otherwise it'd be
|
||||
# readOnly = true;
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
The `name` in `nodes.<name>`; stable across `specialisations`.
|
||||
'';
|
||||
};
|
||||
@@ -98,7 +97,7 @@ let
|
||||
type = types.int;
|
||||
readOnly = true;
|
||||
default = nodeNumbers.${config.virtualisation.test.nodeName};
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
A unique number assigned for each node in `nodes`.
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -5,7 +5,6 @@ let
|
||||
literalExpression
|
||||
literalMD
|
||||
mapAttrs
|
||||
mdDoc
|
||||
mkDefault
|
||||
mkIf
|
||||
mkOption mkForce
|
||||
@@ -76,7 +75,7 @@ in
|
||||
nodes = mkOption {
|
||||
type = types.lazyAttrsOf config.node.type;
|
||||
visible = "shallow";
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
An attribute set of NixOS configuration modules.
|
||||
|
||||
The configurations are augmented by the [`defaults`](#test-opt-defaults) option.
|
||||
@@ -88,7 +87,7 @@ in
|
||||
};
|
||||
|
||||
defaults = mkOption {
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
NixOS configuration that is applied to all [{option}`nodes`](#test-opt-nodes).
|
||||
'';
|
||||
type = types.deferredModule;
|
||||
@@ -96,7 +95,7 @@ in
|
||||
};
|
||||
|
||||
extraBaseModules = mkOption {
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
NixOS configuration that, like [{option}`defaults`](#test-opt-defaults), is applied to all [{option}`nodes`](#test-opt-nodes) and can not be undone with [`specialisation.<name>.inheritParentConfig`](https://search.nixos.org/options?show=specialisation.%3Cname%3E.inheritParentConfig&from=0&size=50&sort=relevance&type=packages&query=specialisation).
|
||||
'';
|
||||
type = types.deferredModule;
|
||||
@@ -104,7 +103,7 @@ in
|
||||
};
|
||||
|
||||
node.pkgs = mkOption {
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
The Nixpkgs to use for the nodes.
|
||||
|
||||
Setting this will make the `nixpkgs.*` options read-only, to avoid mistakenly testing with a Nixpkgs configuration that diverges from regular use.
|
||||
@@ -117,7 +116,7 @@ in
|
||||
};
|
||||
|
||||
node.pkgsReadOnly = mkOption {
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
Whether to make the `nixpkgs.*` options read-only. This is only relevant when [`node.pkgs`](#test-opt-node.pkgs) is set.
|
||||
|
||||
Set this to `false` when any of the [`nodes`](#test-opt-nodes) needs to configure any of the `nixpkgs.*` options. This will slow down evaluation of your test a bit.
|
||||
@@ -130,7 +129,7 @@ in
|
||||
node.specialArgs = mkOption {
|
||||
type = types.lazyAttrsOf types.raw;
|
||||
default = { };
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
An attribute set of arbitrary values that will be made available as module arguments during the resolution of module `imports`.
|
||||
|
||||
Note that it is not possible to override these from within the NixOS configurations. If you argument is not relevant to `imports`, consider setting {option}`defaults._module.args.<name>` instead.
|
||||
@@ -139,7 +138,7 @@ in
|
||||
|
||||
nodesCompat = mkOption {
|
||||
internal = true;
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
Basically `_module.args.nodes`, but with backcompat and warnings added.
|
||||
|
||||
This will go away.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{ config, hostPkgs, lib, ... }:
|
||||
let
|
||||
inherit (lib) types mkOption mdDoc;
|
||||
inherit (lib) types mkOption;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
passthru = mkOption {
|
||||
type = types.lazyAttrsOf types.raw;
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
Attributes to add to the returned derivations,
|
||||
which are not necessarily part of the build.
|
||||
|
||||
@@ -18,7 +18,7 @@ in
|
||||
|
||||
rawTestDerivation = mkOption {
|
||||
type = types.package;
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
Unfiltered version of `test`, for troubleshooting the test framework and `testBuildFailure` in the test framework's test suite.
|
||||
This is not intended for general use. Use `test` instead.
|
||||
'';
|
||||
@@ -28,7 +28,7 @@ in
|
||||
test = mkOption {
|
||||
type = types.package;
|
||||
# TODO: can the interactive driver be configured to access the network?
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
Derivation that runs the test as its "build" process.
|
||||
|
||||
This implies that NixOS tests run isolated from the network, making them
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
testModuleArgs@{ config, lib, hostPkgs, nodes, moduleType, ... }:
|
||||
let
|
||||
inherit (lib) mkOption types mdDoc;
|
||||
inherit (lib) mkOption types;
|
||||
inherit (types) either str functionTo;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
testScript = mkOption {
|
||||
type = either str (functionTo str);
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
A series of python declarations and statements that you write to perform
|
||||
the test.
|
||||
'';
|
||||
@@ -25,7 +25,7 @@ in
|
||||
};
|
||||
withoutTestScriptReferences = mkOption {
|
||||
type = moduleType;
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
A parallel universe where the testScript is invalid and has no references.
|
||||
'';
|
||||
internal = true;
|
||||
|
||||
Reference in New Issue
Block a user