From ed2497b4050946a148c1efa9688d951dce339b77 Mon Sep 17 00:00:00 2001 From: talyz Date: Wed, 6 Oct 2021 11:41:16 +0200 Subject: [PATCH] gitlab.tests: Improve test performance Massively reduce the time it takes running the test by building a proper root disk image and increasing the virtualized core count to 4. This should make it much easier for the tests to pass even on weaker systems. With my laptop (AMD Ryzen 7 PRO 2700U) as the reference system, I see the following test run times: - No change: Times out after 28 mins - Building a root image: 7 mins, 48 secs - Building a root image and bumping the core count: 7 mins, 17 secs The times include the time it takes to build the image (~1 min, 20 secs). --- nixos/tests/gitlab.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/tests/gitlab.nix b/nixos/tests/gitlab.nix index 3e9feeb0769d..dc3b889c8e8e 100644 --- a/nixos/tests/gitlab.nix +++ b/nixos/tests/gitlab.nix @@ -14,6 +14,8 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : with lib; { imports = [ common/user-account.nix ]; virtualisation.memorySize = if pkgs.stdenv.is64bit then 4096 else 2047; + virtualisation.cores = 4; + virtualisation.useNixStoreImage = true; systemd.services.gitlab.serviceConfig.Restart = mkForce "no"; systemd.services.gitlab-workhorse.serviceConfig.Restart = mkForce "no"; systemd.services.gitaly.serviceConfig.Restart = mkForce "no";