From b0647c95c9463a68911645f3d5b3d443b889a141 Mon Sep 17 00:00:00 2001 From: Antoine Eiche Date: Sun, 19 Apr 2020 15:12:19 +0200 Subject: [PATCH] Remove the GitLab runner related code --- tests/default.nix | 10 +--------- tests/lib/config.nix | 8 -------- tests/lib/pkgs.nokvm.nix | 32 -------------------------------- 3 files changed, 1 insertion(+), 49 deletions(-) delete mode 100644 tests/lib/pkgs.nokvm.nix diff --git a/tests/default.nix b/tests/default.nix index 7de029e..3515091 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -7,9 +7,6 @@ # - intern.nixpkgs_20.03 # - intern.nixpkgs_unstable -# Modify pkgs to run the tests on non KVM machines -{ noKVM ? false }: - with builtins; let @@ -25,15 +22,10 @@ let genTest = testName: release: let pkgs = releases."${release}"; - noKVMPkgs = p: if noKVM - then import ./lib/pkgs.nokvm.nix { pkgs = p; } - else p; test = pkgs.callPackage (./. + "/${testName}.nix") { }; in { "name"= builtins.replaceStrings ["." "-"] ["_" "_"] release; - "value"= test { - pkgs = (noKVMPkgs pkgs); - }; + "value"= test { inherit pkgs; }; }; releaseNames = [ diff --git a/tests/lib/config.nix b/tests/lib/config.nix index 187dd91..2cdc9d2 100644 --- a/tests/lib/config.nix +++ b/tests/lib/config.nix @@ -1,11 +1,3 @@ { security.dhparams.defaultBitSize = 1024; # minimum size required by dovecot - - # For slow non-kvm tests. - # nixos/modules/testing/test-instrumentation.nix also sets this. I don't know if there's a better way than etc to override theirs. - environment.etc."systemd/system.conf.d/bigdefaulttimeout.conf".text = '' - [Manager] - # Allow extremely slow start (default for test-VMs is 5 minutes) - DefaultTimeoutStartSec=15min - ''; } diff --git a/tests/lib/pkgs.nokvm.nix b/tests/lib/pkgs.nokvm.nix deleted file mode 100644 index 8832f08..0000000 --- a/tests/lib/pkgs.nokvm.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ pkgs }: - -let - patchedMachinePM = pkgs.writeTextFile { - name = "Machine.pm.patched-to-wait-longer-for-vm"; - text = builtins.replaceStrings ["alarm 600;"] ["alarm 1200;"] (builtins.readFile (+"/nixos/lib/test-driver/Machine.pm")); - }; -in -(pkgs // { - qemu_test = with pkgs; stdenv.mkDerivation { - name = "qemu_test_no_kvm"; - buildInputs = [ coreutils qemu_test ]; - inherit qemu_test; - inherit coreutils; - builder = builtins.toFile "builder.sh" '' - PATH=$coreutils/bin:$PATH - mkdir -p $out/bin - cp $qemu_test/bin/* $out/bin/ - ln -sf $out/bin/qemu-system-${stdenv.hostPlatform.qemuArch} $out/bin/qemu-kvm - ''; - }; - stdenv = pkgs.stdenv // { - mkDerivation = args: (pkgs.stdenv.mkDerivation (args // ( - pkgs.lib.optionalAttrs (args.name == "nixos-test-driver") { - installPhase = args.installPhase + '' - rm $libDir/Machine.pm - cp ${patchedMachinePM} $libDir/Machine.pm - ''; - } - ))); - }; -})