summary refs log tree commit diff
path: root/nixos/lib/testing-python.nix
diff options
context:
space:
mode:
authorRaito Bezarius <masterancpp@gmail.com>2023-10-23 02:11:11 +0200
committerRaito Bezarius <masterancpp@gmail.com>2023-10-29 12:45:00 +0100
commitd4d7550108e4e3fe6f9303e2a57379fba10da77d (patch)
tree92ccb8f04ac8f18e17d23e489cd4bf9553256ec4 /nixos/lib/testing-python.nix
parent3244b1eaefd695fabf3bde663b749e826daf48a7 (diff)
downloadnixpkgs-d4d7550108e4e3fe6f9303e2a57379fba10da77d.tar
nixpkgs-d4d7550108e4e3fe6f9303e2a57379fba10da77d.tar.gz
nixpkgs-d4d7550108e4e3fe6f9303e2a57379fba10da77d.tar.bz2
nixpkgs-d4d7550108e4e3fe6f9303e2a57379fba10da77d.tar.lz
nixpkgs-d4d7550108e4e3fe6f9303e2a57379fba10da77d.tar.xz
nixpkgs-d4d7550108e4e3fe6f9303e2a57379fba10da77d.tar.zst
nixpkgs-d4d7550108e4e3fe6f9303e2a57379fba10da77d.zip
nixos/test-driver: provide a global timeout
Since the debut of the test-driver, we didn't obtain
a race timer with the test execution to ensure that tests doesn't run beyond
a certain amount of time.

This is particularly important when you are running into hanging tests
which cannot be detected by current facilities (requires more pvpanic wiring up, QMP
API stuff, etc.).

Two easy examples:

- Some QEMU tests may get stuck in some situation and run for more than 24 hours → we default to 1 hour max.
- Some QEMU tests may panic in the wrong place, e.g. UEFI firmware or worse → end users can set a "reasonable" amount of time

And then, we should let the retry logic retest them until they succeed and adjust
their global timeouts.

Of course, this does not help with the fact that the timeout may need to be
a function of the actual busyness of the machine running the tests.
This is only one step towards increased reliability.
Diffstat (limited to 'nixos/lib/testing-python.nix')
-rw-r--r--nixos/lib/testing-python.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix
index 4904ad6e359..f5222351518 100644
--- a/nixos/lib/testing-python.nix
+++ b/nixos/lib/testing-python.nix
@@ -42,6 +42,7 @@ rec {
     , nodes ? {}
     , testScript
     , enableOCR ? false
+    , globalTimeout ? (60 * 60)
     , name ? "unnamed"
     , skipTypeCheck ? false
       # Skip linting (mainly intended for faster dev cycles)