lol

nixos/testing: Improve interactive docs

+47 -10
+9 -3
nixos/doc/manual/development/running-nixos-tests-interactively.section.md
··· 38 38 39 39 ## Interactive-only test configuration {#sec-nixos-test-interactive-configuration} 40 40 41 - You can add configuration that is specific to the interactive test driver, by adding to the `interactive` option. 42 - `interactive` is a copy of the regular test options namespace, and is used by the interactive test driver. 43 - It can be helpful for troubleshooting changes that you don't want to apply to regular test runs. 41 + The `.driverInteractive` attribute combines the regular test configuration with 42 + definitions from the [`interactive` submodule](#opt-interactive). This gives you 43 + a more usable, graphical, but slightly different configuration. 44 + 45 + You can add your own interactive-only test configuration by adding extra 46 + configuration to the [`interactive` submodule](#opt-interactive). 47 + 48 + To interactively run only the regular configuration, build the `<test>.driver` attribute 49 + instead, and call it with the flag `result/bin/nixos-test-driver --interactive`.
+17 -6
nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml
··· 42 42 <section xml:id="sec-nixos-test-interactive-configuration"> 43 43 <title>Interactive-only test configuration</title> 44 44 <para> 45 - You can add configuration that is specific to the interactive test 46 - driver, by adding to the <literal>interactive</literal> option. 47 - <literal>interactive</literal> is a copy of the regular test 48 - options namespace, and is used by the interactive test driver. It 49 - can be helpful for troubleshooting changes that you don’t want to 50 - apply to regular test runs. 45 + The <literal>.driverInteractive</literal> attribute combines the 46 + regular test configuration with definitions from the 47 + <link linkend="opt-interactive"><literal>interactive</literal> 48 + submodule</link>. This gives you a more usable, graphical, but 49 + slightly different configuration. 50 + </para> 51 + <para> 52 + You can add your own interactive-only test configuration by adding 53 + extra configuration to the 54 + <link linkend="opt-interactive"><literal>interactive</literal> 55 + submodule</link>. 56 + </para> 57 + <para> 58 + To interactively run only the regular configuration, build the 59 + <literal>&lt;test&gt;.driver</literal> attribute instead, and call 60 + it with the flag 61 + <literal>result/bin/nixos-test-driver --interactive</literal>. 51 62 </para> 52 63 </section> 53 64 </section>
+21 -1
nixos/lib/testing/interactive.nix
··· 6 6 options = { 7 7 interactive = mkOption { 8 8 description = mdDoc '' 9 - Tests [can be run interactively](#sec-running-nixos-tests-interactively). 9 + Tests [can be run interactively](#sec-running-nixos-tests-interactively) 10 + using the program in the test derivation's `.driverInteractive` attribute. 10 11 11 12 When they are, the configuration will include anything set in this submodule. 12 13 13 14 You can set any top-level test option here. 15 + 16 + Example test module: 17 + 18 + ```nix 19 + { config, lib, ... }: { 20 + 21 + nodes.rabbitmq = { 22 + services.rabbitmq.enable = true; 23 + }; 24 + 25 + # When running interactively ... 26 + interactive.nodes.rabbitmq = { 27 + # ... enable the web ui. 28 + services.rabbitmq.managementPlugin.enable = true; 29 + }; 30 + } 31 + ``` 32 + 33 + For details, see the section about [running tests interactively](#sec-running-nixos-tests-interactively). 14 34 ''; 15 35 type = moduleType; 16 36 visible = "shallow";