discourse.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, 32GB RAM) as the reference
system, I see the following test run times:

- No change:
  25 mins, 49 secs

- Building a root image:
  4 mins, 44 secs

- Building a root image and bumping the core count:
  3 mins, 6 secs

The times include the time it takes to build the image (~40 secs).
This commit is contained in:
talyz 2021-10-06 10:27:33 +02:00 committed by Yuka
parent 329a4461a7
commit 2781f84bce

View File

@ -28,6 +28,8 @@ import ./make-test-python.nix (
{ nodes, ... }:
{
virtualisation.memorySize = 2048;
virtualisation.cores = 4;
virtualisation.useNixStoreImage = true;
imports = [ common/user-account.nix ];