From 76bd03fb33b3b551a46ea5541b494b0d5c6659d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 1 Sep 2025 23:58:28 +0200 Subject: [PATCH] python313Packages.oslo-concurrency: fix tests on darwin --- .../python-modules/oslo-concurrency/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/oslo-concurrency/default.nix b/pkgs/development/python-modules/oslo-concurrency/default.nix index 6d85d1349e5a..2ecfdda87e27 100644 --- a/pkgs/development/python-modules/oslo-concurrency/default.nix +++ b/pkgs/development/python-modules/oslo-concurrency/default.nix @@ -16,6 +16,7 @@ oslotest, pbr, setuptools, + stdenv, stestr, }: @@ -33,10 +34,10 @@ buildPythonPackage rec { postPatch = '' substituteInPlace oslo_concurrency/tests/unit/test_processutils.py \ + --replace-fail "/usr" "" \ --replace-fail "/bin/bash" "${bash}/bin/bash" \ - --replace-fail "/usr/bin/true" "${coreutils}/bin/true" \ --replace-fail "/bin/true" "${coreutils}/bin/true" \ - --replace-fail "/usr/bin/env" "${coreutils}/bin/env" + --replace-fail "/bin/env" "${coreutils}/bin/env" ''; env.PBR_VERSION = version; @@ -69,7 +70,12 @@ buildPythonPackage rec { oslo_concurrency.tests.unit.test_lockutils_eventlet.TestInternalLock.test_fair_lock_with_spawn_n oslo_concurrency.tests.unit.test_lockutils_eventlet.TestInternalLock.test_lock_with_spawn oslo_concurrency.tests.unit.test_lockutils_eventlet.TestInternalLock.test_lock_with_spawn_n - ") + ${lib.optionalString stdenv.hostPlatform.isDarwin '' + oslo_concurrency.tests.unit.test_lockutils.FileBasedLockingTestCase.test_interprocess_nonblocking_external_lock + oslo_concurrency.tests.unit.test_lockutils.LockTestCase.test_lock_externally + oslo_concurrency.tests.unit.test_lockutils.LockTestCase.test_lock_externally_lock_dir_not_exist + oslo_concurrency.tests.unit.test_processutils.PrlimitTestCase.test_stack_size + ''}") ''; pythonImportsCheck = [ "oslo_concurrency" ];