diff options
author | Jacek Galowicz <jacek@galowicz.de> | 2023-05-05 08:12:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-05 08:12:36 +0200 |
commit | 3ba45b082e76a29b562ff014cd085f3364579bef (patch) | |
tree | 00758a0fee027d5fc300cb18222219b835ec932f /nixos/doc/manual/development | |
parent | 661117e16fef233387866691c749f2427d349c1f (diff) | |
parent | e207f4a116a64ee5468cd04d4311d5dc0b1e618e (diff) |
Merge pull request #228111 from alyssais/nixosTest-hostname
nixosTest: remove hostname limitations
Diffstat (limited to 'nixos/doc/manual/development')
-rw-r--r-- | nixos/doc/manual/development/developing-the-test-driver.chapter.md | 2 | ||||
-rw-r--r-- | nixos/doc/manual/development/writing-nixos-tests.section.md | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/nixos/doc/manual/development/developing-the-test-driver.chapter.md b/nixos/doc/manual/development/developing-the-test-driver.chapter.md index 4b70fe00af476..d64574fa62aaa 100644 --- a/nixos/doc/manual/development/developing-the-test-driver.chapter.md +++ b/nixos/doc/manual/development/developing-the-test-driver.chapter.md @@ -25,6 +25,8 @@ These include `pkgs.nixosTest`, `testing-python.nix` and `make-test-python.nix`. ## Testing changes to the test framework {#sec-test-the-test-framework} +We currently have limited unit tests for the framework itself. You may run these with `nix-build -A nixosTests.nixos-test-driver`. + When making significant changes to the test framework, we run the tests on Hydra, to avoid disrupting the larger NixOS project. For this, we use the `python-test-refactoring` branch in the `NixOS/nixpkgs` repository, and its [corresponding Hydra jobset](https://hydra.nixos.org/jobset/nixos/python-test-refactoring). diff --git a/nixos/doc/manual/development/writing-nixos-tests.section.md b/nixos/doc/manual/development/writing-nixos-tests.section.md index 3de46fda3df67..486a4b64a262f 100644 --- a/nixos/doc/manual/development/writing-nixos-tests.section.md +++ b/nixos/doc/manual/development/writing-nixos-tests.section.md @@ -130,6 +130,11 @@ starting them in parallel: start_all() ``` +If the hostname of a node contains characters that can't be used in a +Python variable name, those characters will be replaced with +underscores in the variable name, so `nodes.machine-a` will be exposed +to Python as `machine_a`. + ## Machine objects {#ssec-machine-objects} The following methods are available on machine objects: |