python3Packages.gst-python: disable tests on darwin (#456547)
This commit is contained in:
@@ -6,6 +6,9 @@
|
|||||||
fetchpatch,
|
fetchpatch,
|
||||||
meson,
|
meson,
|
||||||
ninja,
|
ninja,
|
||||||
|
# TODO: We can get rid of this once `buildPythonPackage` accepts `finalAttrs`.
|
||||||
|
# See: https://github.com/NixOS/nixpkgs/pull/271387
|
||||||
|
gst-python,
|
||||||
|
|
||||||
pkg-config,
|
pkg-config,
|
||||||
python,
|
python,
|
||||||
@@ -42,13 +45,6 @@ buildPythonPackage rec {
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
||||||
# The analytics tests often timeout under load on Darwin (e.g. on Hydra), so remove them
|
|
||||||
substituteInPlace testsuite/meson.build --replace-fail \
|
|
||||||
"['Test analytics', 'test_analytics.py', ['gst-plugins-bad/gst-libs/gst/analytics', 'gst-plugins-base/gst-libs/gst/video']]," \
|
|
||||||
""
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Python 2.x is not supported.
|
# Python 2.x is not supported.
|
||||||
disabled = !isPy3k;
|
disabled = !isPy3k;
|
||||||
|
|
||||||
@@ -80,11 +76,24 @@ buildPythonPackage rec {
|
|||||||
"-Dpygi-overrides-dir=${placeholder "out"}/${python.sitePackages}/gi/overrides"
|
"-Dpygi-overrides-dir=${placeholder "out"}/${python.sitePackages}/gi/overrides"
|
||||||
# Exec format error during configure
|
# Exec format error during configure
|
||||||
"-Dpython-exe=${python.pythonOnBuildForHost.interpreter}"
|
"-Dpython-exe=${python.pythonOnBuildForHost.interpreter}"
|
||||||
|
# This is needed to prevent the project from looking for `gst-rtsp-server`
|
||||||
|
# from `checkInputs`.
|
||||||
|
#
|
||||||
|
# TODO: This should probably be moved at least partially into the Meson hook.
|
||||||
|
#
|
||||||
|
# NB: We need to use `doInstallCheck` here because `buildPythonPackage`
|
||||||
|
# renames `doCheck` to `doInstallCheck`.
|
||||||
|
(lib.mesonEnable "tests" gst-python.doInstallCheck)
|
||||||
];
|
];
|
||||||
|
|
||||||
# TODO: Meson setup hook does not like buildPythonPackage
|
# Tests are very flaky on Darwin.
|
||||||
# https://github.com/NixOS/nixpkgs/issues/47390
|
# See: https://github.com/NixOS/nixpkgs/issues/454955
|
||||||
installCheckPhase = "meson test --print-errorlogs";
|
doCheck = !stdenv.hostPlatform.isDarwin;
|
||||||
|
|
||||||
|
# `buildPythonPackage` uses `installCheckPhase` and leaves `checkPhase`
|
||||||
|
# empty. It renames `doCheck` from its arguments, but not `checkPhase`.
|
||||||
|
# See: https://github.com/NixOS/nixpkgs/issues/47390
|
||||||
|
installCheckPhase = "mesonCheckPhase";
|
||||||
|
|
||||||
preCheck = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
preCheck = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
export DYLD_LIBRARY_PATH="${gst_all_1.gst-plugins-base}/lib"
|
export DYLD_LIBRARY_PATH="${gst_all_1.gst-plugins-base}/lib"
|
||||||
|
|||||||
Reference in New Issue
Block a user