From 216c5dc10dd9d842909fe256567e9aeda3212396 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Thu, 29 Sep 2022 12:41:59 +0200 Subject: nixos/doc: Disambiguate test option ids Changing this later on would break external links into the manual. --- nixos/doc/manual/default.nix | 1 + .../development/running-nixos-tests-interactively.section.md | 4 ++-- nixos/doc/manual/development/writing-nixos-tests.section.md | 12 ++++++------ .../running-nixos-tests-interactively.section.xml | 4 ++-- .../from_md/development/writing-nixos-tests.section.xml | 12 ++++++------ 5 files changed, 17 insertions(+), 16 deletions(-) (limited to 'nixos/doc/manual') diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix index ecd62eb4e8482..6db20cdd64182 100644 --- a/nixos/doc/manual/default.nix +++ b/nixos/doc/manual/default.nix @@ -63,6 +63,7 @@ let }; documentType = "none"; variablelistId = "test-options-list"; + optionIdPrefix = "test-opt-"; }; sources = lib.sourceFilesBySuffices ./. [".xml"]; diff --git a/nixos/doc/manual/development/running-nixos-tests-interactively.section.md b/nixos/doc/manual/development/running-nixos-tests-interactively.section.md index d9c316f4b139b..1130672cb3766 100644 --- a/nixos/doc/manual/development/running-nixos-tests-interactively.section.md +++ b/nixos/doc/manual/development/running-nixos-tests-interactively.section.md @@ -39,11 +39,11 @@ directory. ## Interactive-only test configuration {#sec-nixos-test-interactive-configuration} The `.driverInteractive` attribute combines the regular test configuration with -definitions from the [`interactive` submodule](#opt-interactive). This gives you +definitions from the [`interactive` submodule](#test-opt-interactive). This gives you a more usable, graphical, but slightly different configuration. You can add your own interactive-only test configuration by adding extra -configuration to the [`interactive` submodule](#opt-interactive). +configuration to the [`interactive` submodule](#test-opt-interactive). To interactively run only the regular configuration, build the `.driver` attribute instead, and call it with the flag `result/bin/nixos-test-driver --interactive`. diff --git a/nixos/doc/manual/development/writing-nixos-tests.section.md b/nixos/doc/manual/development/writing-nixos-tests.section.md index 99704ec3c1416..2efe52b9883c2 100644 --- a/nixos/doc/manual/development/writing-nixos-tests.section.md +++ b/nixos/doc/manual/development/writing-nixos-tests.section.md @@ -22,12 +22,12 @@ A NixOS test is a module that has the following structure: ``` We refer to the whole test above as a test module, whereas the values -in [`nodes.`](#opt-nodes) are NixOS modules themselves. +in [`nodes.`](#test-opt-nodes) are NixOS modules themselves. -The option [`testScript`](#opt-testScript) is a piece of Python code that executes the +The option [`testScript`](#test-opt-testScript) is a piece of Python code that executes the test (described below). During the test, it will start one or more virtual machines, the configuration of which is described by -the option [`nodes`](#opt-nodes). +the option [`nodes`](#test-opt-nodes). An example of a single-node test is [`login.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/login.nix). @@ -171,7 +171,7 @@ The following methods are available on machine objects: least one will be returned. ::: {.note} - This requires [`enableOCR`](#opt-enableOCR) to be set to `true`. + This requires [`enableOCR`](#test-opt-enableOCR) to be set to `true`. ::: `get_screen_text` @@ -180,7 +180,7 @@ The following methods are available on machine objects: machine\'s screen using optical character recognition. ::: {.note} - This requires [`enableOCR`](#opt-enableOCR) to be set to `true`. + This requires [`enableOCR`](#test-opt-enableOCR) to be set to `true`. ::: `send_monitor_command` @@ -291,7 +291,7 @@ The following methods are available on machine objects: `get_screen_text` and `get_screen_text_variants`). ::: {.note} - This requires [`enableOCR`](#opt-enableOCR) to be set to `true`. + This requires [`enableOCR`](#test-opt-enableOCR) to be set to `true`. ::: `wait_for_console_text` diff --git a/nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml b/nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml index 35d9bbd1c1fe1..16db709f8b917 100644 --- a/nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml +++ b/nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml @@ -44,14 +44,14 @@ $ ./result/bin/nixos-test-driver --keep-vm-state The .driverInteractive attribute combines the regular test configuration with definitions from the - interactive + interactive submodule. This gives you a more usable, graphical, but slightly different configuration. You can add your own interactive-only test configuration by adding extra configuration to the - interactive + interactive submodule. diff --git a/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml b/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml index 32f5fdb77f504..4db196273dad2 100644 --- a/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml +++ b/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml @@ -24,16 +24,16 @@ We refer to the whole test above as a test module, whereas the values in - nodes.<name> + nodes.<name> are NixOS modules themselves. The option - testScript + testScript is a piece of Python code that executes the test (described below). During the test, it will start one or more virtual machines, the configuration of which is described by the option - nodes. + nodes. An example of a single-node test is @@ -263,7 +263,7 @@ start_all() This requires - enableOCR + enableOCR to be set to true. @@ -281,7 +281,7 @@ start_all() This requires - enableOCR + enableOCR to be set to true. @@ -522,7 +522,7 @@ start_all() This requires - enableOCR + enableOCR to be set to true. -- cgit 1.4.1