diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-10-29 18:01:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-29 18:01:23 +0000 |
commit | 64070c2fda8eb32abd3f622a6fc2e6e2cc35f3df (patch) | |
tree | 76c6379cd75aa481633b8b6e06a8bc4213f27da4 /nixos/lib/testing/run.nix | |
parent | 571f1df5e41d4aeab9f36c76ada75968c940b388 (diff) | |
parent | c9e3cc43c7baea00c41a4aa24a5e31a08fbfb894 (diff) | |
download | nixpkgs-64070c2fda8eb32abd3f622a6fc2e6e2cc35f3df.tar nixpkgs-64070c2fda8eb32abd3f622a6fc2e6e2cc35f3df.tar.gz nixpkgs-64070c2fda8eb32abd3f622a6fc2e6e2cc35f3df.tar.bz2 nixpkgs-64070c2fda8eb32abd3f622a6fc2e6e2cc35f3df.tar.lz nixpkgs-64070c2fda8eb32abd3f622a6fc2e6e2cc35f3df.tar.xz nixpkgs-64070c2fda8eb32abd3f622a6fc2e6e2cc35f3df.tar.zst nixpkgs-64070c2fda8eb32abd3f622a6fc2e6e2cc35f3df.zip |
Merge master into staging-next
Diffstat (limited to 'nixos/lib/testing/run.nix')
-rw-r--r-- | nixos/lib/testing/run.nix | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/nixos/lib/testing/run.nix b/nixos/lib/testing/run.nix index 0cd07d8afd2..9440c1acdfd 100644 --- a/nixos/lib/testing/run.nix +++ b/nixos/lib/testing/run.nix @@ -16,6 +16,15 @@ in ''; }; + rawTestDerivation = mkOption { + type = types.package; + description = mdDoc '' + Unfiltered version of `test`, for troubleshooting the test framework and `testBuildFailure` in the test framework's test suite. + This is not intended for general use. Use `test` instead. + ''; + internal = true; + }; + test = mkOption { type = types.package; # TODO: can the interactive driver be configured to access the network? @@ -29,25 +38,26 @@ in }; config = { - test = lib.lazyDerivation { # lazyDerivation improves performance when only passthru items and/or meta are used. - derivation = hostPkgs.stdenv.mkDerivation { - name = "vm-test-run-${config.name}"; + rawTestDerivation = hostPkgs.stdenv.mkDerivation { + name = "vm-test-run-${config.name}"; - requiredSystemFeatures = [ "kvm" "nixos-test" ]; + requiredSystemFeatures = [ "kvm" "nixos-test" ]; - buildCommand = '' - mkdir -p $out + buildCommand = '' + mkdir -p $out - # effectively mute the XMLLogger - export LOGFILE=/dev/null + # effectively mute the XMLLogger + export LOGFILE=/dev/null - ${config.driver}/bin/nixos-test-driver -o $out - ''; + ${config.driver}/bin/nixos-test-driver -o $out + ''; - passthru = config.passthru; + passthru = config.passthru; - meta = config.meta; - }; + meta = config.meta; + }; + test = lib.lazyDerivation { # lazyDerivation improves performance when only passthru items and/or meta are used. + derivation = config.rawTestDerivation; inherit (config) passthru meta; }; |