diff --git a/test/make-test.nix b/test/make-test.nix index d20ed94..1450f8a 100644 --- a/test/make-test.nix +++ b/test/make-test.nix @@ -1,25 +1,12 @@ testArgs: let - stablePkgs = import { config = {}; overlays = []; }; - unstable = (import ../pkgs/nixpkgs-pinned.nix).nixpkgs-unstable; + pkgs = import { config = {}; overlays = []; }; - # Stable nixpkgs doesn't yet include the Python testing framework. - # Use unstable nixpkgs and patch it so that it uses stable nixpkgs for the VM - # machine configuration. - testingPkgs = - stablePkgs.runCommand "nixpkgs-testing" {} '' - cp -r ${unstable} $out - cd $out - chmod +w -R . - patch -p1 < ${./use-stable-pkgs.patch} - ''; - - test = (import "${testingPkgs}/nixos/tests/make-test-python.nix") testArgs; + test = (import "${pkgs.path}/nixos/tests/make-test-python.nix") testArgs; fixedTest = { system ? builtins.currentSystem, ... }@args: let - pkgs = (import testingPkgs { inherit system; config = {}; overlays = []; } ); pkgsFixed = pkgs // { # Fix the black Python code formatter that's used in the test to allow the test # script to have longer lines. The default width of 88 chars is too restrictive for @@ -35,7 +22,7 @@ let # QEMU 4.20 from unstable fails on Travis build nodes with message # "error: failed to set MSR 0x48b to 0x159ff00000000" # Use version 4.0.1 instead. - inherit (stablePkgs) qemu_test; + inherit (pkgs) qemu_test; }; in test (args // { pkgs = pkgsFixed; }); diff --git a/test/use-stable-pkgs.patch b/test/use-stable-pkgs.patch deleted file mode 100644 index 1a9f0b3..0000000 --- a/test/use-stable-pkgs.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/nixos/lib/build-vms.nix -+++ b/nixos/lib/build-vms.nix -@@ -30,10 +30,10 @@ rec { - buildVM = - nodes: configurations: - -- import ./eval-config.nix { -+ import { - inherit system; - modules = configurations ++ extraConfigurations; -- baseModules = (import ../modules/module-list.nix) ++ -+ baseModules = (import ) ++ - [ ../modules/virtualisation/qemu-vm.nix - ../modules/testing/test-instrumentation.nix # !!! should only get added for automated test runs - { key = "no-manual"; documentation.nixos.enable = false; } - - -services.connman doesn't exist in stable nixpkgs ---- a/nixos/modules/virtualisation/qemu-vm.nix -+++ b/nixos/modules/virtualisation/qemu-vm.nix -@@ -620,7 +620,6 @@ in - - # Wireless won't work in the VM. - networking.wireless.enable = mkVMOverride false; -- services.connman.enable = mkVMOverride false; - - # Speed up booting by not waiting for ARP. - networking.dhcpcd.extraConfig = "noarp";