tests: improve make-test-vm.nix

1. fixedTest: Remove some unneeded layers of function calls.

2. Don't add a modified version of `black` to the global pkgs set.
   Tests should not affect the pkgs of the tested system modules.
   Fix the driver build script instead by adding an extra arg to the
   call to `black`.
This commit is contained in:
Erik Arvstedt
2021-03-22 14:35:29 +01:00
parent 08fe9ba84a
commit 9ca52af523
3 changed files with 48 additions and 37 deletions
+1 -1
View File
@@ -212,7 +212,7 @@ vmTestNixExpr() {
fi
cat <<EOF
((import "$scriptDir/tests.nix" { scenario = "$scenario"; }).vm {}).overrideAttrs (old: rec {
(import "$scriptDir/tests.nix" { scenario = "$scenario"; }).vm.overrideAttrs (old: rec {
buildCommand = ''
export QEMU_OPTS="-smp $numCPUs -m $memoryMiB $extraQEMUOpts"
echo "VM stats: CPUs: $numCPUs, memory: $memoryMiB MiB"