From b5293b7e5322077fb6c1040d9741ba2377e6ab2f Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 12 Dec 2022 11:57:15 +0100 Subject: [PATCH] test: support `run`, `debug` commands in basic NixOS tests Currently, this only affects the basic NixOS test `clightning-replication`. --- test/lib/make-test-vm.nix | 7 ++++++- test/lib/make-test.nix | 6 ------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/test/lib/make-test-vm.nix b/test/lib/make-test-vm.nix index f5abd98..b8aa6da 100644 --- a/test/lib/make-test-vm.nix +++ b/test/lib/make-test-vm.nix @@ -27,4 +27,9 @@ let inherit (test) meta passthru; } // test; in - runTest + runTest // { + # A VM runner for interactive use + run = pkgs.writers.writeBashBin "run-vm" '' + . ${./run-vm.sh} ${runTest.driver} "$@" + ''; + } diff --git a/test/lib/make-test.nix b/test/lib/make-test.nix index dd212d4..7ac85b2 100644 --- a/test/lib/make-test.nix +++ b/test/lib/make-test.nix @@ -52,11 +52,6 @@ let ]; }; - # A VM runner for interactive use - run = pkgs.writers.writeBashBin "run-vm" '' - . ${./run-vm.sh} ${test.driver} "$@" - ''; - mkContainer = legacyInstallDirs: extra-container.lib.buildContainers { inherit system legacyInstallDirs; @@ -139,7 +134,6 @@ let in test // { inherit - run vm container # For NixOS with `system.stateVersion` <22.05