python313Packages.oslo-concurrency: fix tests on darwin

Changed files
+9 -3
pkgs
development
python-modules
oslo-concurrency
+9 -3
pkgs/development/python-modules/oslo-concurrency/default.nix
···
oslotest,
pbr,
setuptools,
stestr,
}:
···
postPatch = ''
substituteInPlace oslo_concurrency/tests/unit/test_processutils.py \
--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"
'';
env.PBR_VERSION = version;
···
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
-
")
'';
pythonImportsCheck = [ "oslo_concurrency" ];
···
oslotest,
pbr,
setuptools,
+
stdenv,
stestr,
}:
···
postPatch = ''
substituteInPlace oslo_concurrency/tests/unit/test_processutils.py \
+
--replace-fail "/usr" "" \
--replace-fail "/bin/bash" "${bash}/bin/bash" \
--replace-fail "/bin/true" "${coreutils}/bin/true" \
+
--replace-fail "/bin/env" "${coreutils}/bin/env"
'';
env.PBR_VERSION = version;
···
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" ];