fix(overlays): stabilize timing-sensitive tests
This commit is contained in:
@@ -4,10 +4,10 @@
|
|||||||
# nixpkgs binary cache cannot be used and upstream test suites run locally.
|
# nixpkgs binary cache cannot be used and upstream test suites run locally.
|
||||||
# The jeeves builder uses /tmp/nix-builds so filesystem tests run on tmpfs
|
# The jeeves builder uses /tmp/nix-builds so filesystem tests run on tmpfs
|
||||||
# instead of ZFS with normalization=formD and utf8only=on; those tests remain
|
# instead of ZFS with normalization=formD and utf8only=on; those tests remain
|
||||||
# enabled. The remaining workarounds cover UDP readiness and nested-worker
|
# enabled. The remaining workarounds cover UDP readiness, nested-worker
|
||||||
# scheduling races, plus architecture-dependent floating-point differences
|
# scheduling races, and mismatched timeout clocks, plus architecture-dependent
|
||||||
# whose risk we accept for our workloads. Keep these exceptions visible until
|
# floating-point differences whose risk we accept for our workloads. Keep these
|
||||||
# their causes are fixed.
|
# exceptions visible until their causes are fixed.
|
||||||
_final: prev: {
|
_final: prev: {
|
||||||
gnutls = prev.gnutls.overrideAttrs (old: {
|
gnutls = prev.gnutls.overrideAttrs (old: {
|
||||||
# This test uses a fixed four-second sleep instead of checking UDP
|
# This test uses a fixed four-second sleep instead of checking UDP
|
||||||
@@ -19,10 +19,23 @@ _final: prev: {
|
|||||||
|
|
||||||
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
||||||
(_pythonFinal: pythonPrev: {
|
(_pythonFinal: pythonPrev: {
|
||||||
|
backrefs = pythonPrev.backrefs.overridePythonAttrs (old: {
|
||||||
|
# regex measures its timeout in process CPU time, while this test used
|
||||||
|
# wall time and could miss the timeout when a busy builder descheduled it.
|
||||||
|
postPatch = (old.postPatch or "") + ''
|
||||||
|
substituteInPlace tests/test_bregex.py \
|
||||||
|
--replace-fail "time.time()" "time.process_time()"
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
pytest-xdist = pythonPrev.pytest-xdist.overridePythonAttrs (old: {
|
pytest-xdist = pythonPrev.pytest-xdist.overridePythonAttrs (old: {
|
||||||
# Its acceptance tests start nested worker pools. Limit the outer pool
|
# The suite exercises its own worker pools. Run the outer suite with one
|
||||||
# so deliberately crashing inner workers do not race under heavy load.
|
# worker and allow inner workers more time on heavily loaded builders.
|
||||||
preCheck = builtins.replaceStrings [ "--numprocesses=$NIX_BUILD_CORES" ] [ "--numprocesses=8" ] (
|
postPatch = (old.postPatch or "") + ''
|
||||||
|
substituteInPlace testing/test_remote.py \
|
||||||
|
--replace-fail "WAIT_TIMEOUT = 10.0" "WAIT_TIMEOUT = 60.0"
|
||||||
|
'';
|
||||||
|
preCheck = builtins.replaceStrings [ "--numprocesses=$NIX_BUILD_CORES" ] [ "--numprocesses=1" ] (
|
||||||
old.preCheck or ""
|
old.preCheck or ""
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user