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.
This commit is contained in:
parent
2d1e788f60
commit
3d0ccac7fe
|
@ -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"
|
||||
|
|
|
@ -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}" ];
|
||||
|
||||
|
|
Loading…
Reference in a new issue