diff options
author | talyz <kim.lindberger@gmail.com> | 2021-10-06 11:41:16 +0200 |
---|---|---|
committer | Yuka <yuka@yuka.dev> | 2021-10-28 12:55:01 +0200 |
commit | ed2497b4050946a148c1efa9688d951dce339b77 (patch) | |
tree | df5d85aa7532beaae08f86617d9601b3c3581346 /nixos | |
parent | 2781f84bce11789a7d8127559a6de0d5cdf92e93 (diff) | |
download | nixlib-ed2497b4050946a148c1efa9688d951dce339b77.tar nixlib-ed2497b4050946a148c1efa9688d951dce339b77.tar.gz nixlib-ed2497b4050946a148c1efa9688d951dce339b77.tar.bz2 nixlib-ed2497b4050946a148c1efa9688d951dce339b77.tar.lz nixlib-ed2497b4050946a148c1efa9688d951dce339b77.tar.xz nixlib-ed2497b4050946a148c1efa9688d951dce339b77.tar.zst nixlib-ed2497b4050946a148c1efa9688d951dce339b77.zip |
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).
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/gitlab.nix | 2 |
1 files changed, 2 insertions, 0 deletions
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"; |