test: add option `extraTestScript`

This allows extending tests.py.
This commit is contained in:
Erik Arvstedt 2021-10-01 11:52:05 +02:00
parent 2cf12d8765
commit e61c743644
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
2 changed files with 6 additions and 1 deletions

View File

@ -42,6 +42,7 @@ name: testConfig:
builtins.concatStringsSep "\n\n" [
initData
(builtins.readFile ./../tests.py)
cfg.test.extraTestScript
# Don't run tests in interactive mode.
# is_interactive is set in ../run-tests.sh
''

View File

@ -19,7 +19,11 @@ with lib;
dictionary variable 'test_data'. The data is exported via JSON.
'';
};
extraTestScript = mkOption {
type = types.lines;
default = "";
description = "Extra lines added to the Python test script.";
};
container = {
# Forwarded to extra-container. For descriptions, see
# https://github.com/erikarvstedt/extra-container/blob/master/eval-config.nix