Merge pull request #241184 from SuperSandro2000/matrix-no-test-parallel

matrix-synapse: limit parallelism to 4 cores to be improve stability, formatting

authored by

Sandro and committed by
GitHub
55a23e0f 76d738bb

+14 -6
+14 -6
pkgs/servers/matrix-synapse/default.nix
··· 86 87 doCheck = !stdenv.isDarwin; 88 89 - checkPhase = let testFlags = lib.optionalString (!stdenv.isAarch64) "-j $NIX_BUILD_CORES"; in '' 90 runHook preCheck 91 92 # remove src module, so tests use the installed module instead 93 rm -rf ./synapse 94 95 - PYTHONPATH=".:$PYTHONPATH" ${python3.interpreter} -m twisted.trial ${testFlags} tests 96 97 runHook postCheck 98 ''; 99 100 - passthru.tests = { inherit (nixosTests) matrix-synapse; }; 101 - passthru.plugins = plugins; 102 - passthru.tools = tools; 103 - passthru.python = python3; 104 105 meta = with lib; { 106 homepage = "https://matrix.org";
··· 86 87 doCheck = !stdenv.isDarwin; 88 89 + checkPhase = '' 90 runHook preCheck 91 92 # remove src module, so tests use the installed module instead 93 rm -rf ./synapse 94 95 + # high parallelisem makes test suite unstable 96 + # upstream uses 2 cores but 4 seems to be also stable 97 + # https://github.com/matrix-org/synapse/blob/develop/.github/workflows/latest_deps.yml#L103 98 + if (( $NIX_BUILD_CORES > 4)); then 99 + NIX_BUILD_CORES=4 100 + fi 101 + 102 + PYTHONPATH=".:$PYTHONPATH" ${python3.interpreter} -m twisted.trial -j $NIX_BUILD_CORES tests 103 104 runHook postCheck 105 ''; 106 107 + passthru = { 108 + tests = { inherit (nixosTests) matrix-synapse; }; 109 + inherit plugins tools; 110 + python = python3; 111 + }; 112 113 meta = with lib; { 114 homepage = "https://matrix.org";