diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-04-14 02:54:53 +0200 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-04-15 01:39:55 +0200 |
commit | 3d0ccac7fe2247d5d9051d88ec45150b21d64b21 (patch) | |
tree | 9ec702b4420b119ed7a2290b6637a78e87a6c4a0 | |
parent | 2d1e788f6072b90899cd159dba288625870f52e6 (diff) |
home-assistant: reduce component tests processes
Component tests are often of lesser quality, which may lead to spurious errors when run with high parallelization. Reducing to 4 processes aligns the setup with what GitHub actions provides, which is what upstream uses to test.
-rw-r--r-- | pkgs/servers/home-assistant/default.nix | 2 | ||||
-rw-r--r-- | pkgs/servers/home-assistant/tests.nix | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index ded617b35f6cf..b74947e8ab75c 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -293,8 +293,6 @@ in python.pkgs.buildPythonApplication rec { ]; pytestFlagsArray = [ - # parallelize test run - "--numprocesses $NIX_BUILD_CORES" # assign tests grouped by file to workers "--dist loadfile" # retry racy tests that end in "RuntimeError: Event loop is closed" diff --git a/pkgs/servers/home-assistant/tests.nix b/pkgs/servers/home-assistant/tests.nix index 58bb1670e5a01..00b2e7fbac07e 100644 --- a/pkgs/servers/home-assistant/tests.nix +++ b/pkgs/servers/home-assistant/tests.nix @@ -56,7 +56,11 @@ in lib.listToAttrs (map (component: lib.nameValuePair component ( disabledTests = old.disabledTests ++ extraDisabledTests.${component} or []; disabledTestPaths = old.disabledTestPaths ++ extraDisabledTestPaths.${component} or [ ]; + # components are more often racy than the core + dontUsePytestXdist = true; + pytestFlagsArray = lib.remove "tests" old.pytestFlagsArray + ++ [ "--numprocesses=4" ] ++ extraPytestFlagsArray.${component} or [ ] ++ [ "tests/components/${component}" ]; |