mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 11:45:45 +03:00
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.
This commit is contained in:
parent
3244b1eaef
commit
d4d7550108
4 changed files with 48 additions and 0 deletions
|
@ -94,6 +94,7 @@ let
|
|||
wrapProgram $out/bin/nixos-test-driver \
|
||||
--set startScripts "''${vmStartScripts[*]}" \
|
||||
--set testScript "$out/test-script" \
|
||||
--set globalTimeout "${toString config.globalTimeout}" \
|
||||
--set vlans '${toString vlans}' \
|
||||
${lib.escapeShellArgs (lib.concatMap (arg: ["--add-flags" arg]) config.extraDriverArgs)}
|
||||
'';
|
||||
|
@ -123,6 +124,18 @@ in
|
|||
defaultText = "hostPkgs.qemu_test";
|
||||
};
|
||||
|
||||
globalTimeout = mkOption {
|
||||
description = mdDoc ''
|
||||
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.
|
||||
|
||||
By default, we use a 1 hour timeout.
|
||||
'';
|
||||
type = types.int;
|
||||
default = 60 * 60;
|
||||
example = 10 * 60;
|
||||
};
|
||||
|
||||
enableOCR = mkOption {
|
||||
description = mdDoc ''
|
||||
Whether to enable Optical Character Recognition functionality for
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue