diff --git a/pkgs/applications/science/misc/openmvs/default.nix b/pkgs/applications/science/misc/openmvs/default.nix index de972e4392a2..2832a52e5dc4 100644 --- a/pkgs/applications/science/misc/openmvs/default.nix +++ b/pkgs/applications/science/misc/openmvs/default.nix @@ -68,11 +68,6 @@ stdenv.mkDerivation rec { ''; doCheck = true; - checkPhase = '' - runHook preCheck - ctest - runHook postCheck - ''; meta = { description = "Open Multi-View Stereo reconstruction library"; diff --git a/pkgs/by-name/li/lib2geom/package.nix b/pkgs/by-name/li/lib2geom/package.nix index 437c79c94500..db3331621e28 100644 --- a/pkgs/by-name/li/lib2geom/package.nix +++ b/pkgs/by-name/li/lib2geom/package.nix @@ -10,6 +10,7 @@ cairo, double-conversion, gtest, + ctestCheckHook, lib, inkscape, pkgsCross, @@ -47,6 +48,7 @@ stdenv.mkDerivation (finalAttrs: { nativeCheckInputs = [ gtest + ctestCheckHook ]; cmakeFlags = [ @@ -56,41 +58,32 @@ stdenv.mkDerivation (finalAttrs: { ]; doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; + dontUseNinjaCheck = true; + disabledTests = + lib.optionals stdenv.hostPlatform.isMusl [ + # Fails due to rounding differences + # https://gitlab.com/inkscape/lib2geom/-/issues/70 + "circle-test" + ] + ++ lib.optionals (stdenv.hostPlatform.system != "x86_64-linux") [ + # Broken on all platforms, test just accidentally passes on some. + # https://gitlab.com/inkscape/lib2geom/-/issues/63 + "elliptical-arc-test" - # TODO: Update cmake hook to make it simpler to selectively disable cmake tests: #113829 - checkPhase = - let - disabledTests = - lib.optionals stdenv.hostPlatform.isMusl [ - # Fails due to rounding differences - # https://gitlab.com/inkscape/lib2geom/-/issues/70 - "circle-test" - ] - ++ lib.optionals (stdenv.hostPlatform.system != "x86_64-linux") [ - # Broken on all platforms, test just accidentally passes on some. - # https://gitlab.com/inkscape/lib2geom/-/issues/63 - "elliptical-arc-test" + # https://gitlab.com/inkscape/lib2geom/-/issues/69 + "polynomial-test" - # https://gitlab.com/inkscape/lib2geom/-/issues/69 - "polynomial-test" + # https://gitlab.com/inkscape/lib2geom/-/issues/75 + "line-test" - # https://gitlab.com/inkscape/lib2geom/-/issues/75 - "line-test" + # Failure observed on i686 + "angle-test" + "self-intersections-test" - # Failure observed on i686 - "angle-test" - "self-intersections-test" - - # Failure observed on aarch64-darwin - "bezier-test" - "ellipse-test" - ]; - in - '' - runHook preCheck - ctest --output-on-failure -E '^${lib.concatStringsSep "|" disabledTests}$' - runHook postCheck - ''; + # Failure observed on aarch64-darwin + "bezier-test" + "ellipse-test" + ]; passthru = { tests = { diff --git a/pkgs/by-name/mk/mkcal/package.nix b/pkgs/by-name/mk/mkcal/package.nix index 22f115c3a5b7..5dab56aada40 100644 --- a/pkgs/by-name/mk/mkcal/package.nix +++ b/pkgs/by-name/mk/mkcal/package.nix @@ -12,6 +12,7 @@ perl, pkg-config, tzdata, + ctestCheckHook, }: stdenv.mkDerivation (finalAttrs: { @@ -62,6 +63,7 @@ stdenv.mkDerivation (finalAttrs: { nativeCheckInputs = [ tzdata + ctestCheckHook ]; cmakeFlags = [ @@ -69,25 +71,17 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "BUILD_TESTS" finalAttrs.finalPackage.doCheck) (lib.cmakeBool "INSTALL_TESTS" false) (lib.cmakeBool "BUILD_DOCUMENTATION" true) - (lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" ( - lib.concatStringsSep ";" [ - # Exclude tests - "-E" - (lib.strings.escapeShellArg "(${ - lib.concatStringsSep "|" [ - # Test expects to be passed a real, already existing database to test migrations. We don't have one - "tst_perf" - - # 10/97 tests fail. Half seem related to time (zone) issues w/ local time / Helsinki timezone - # Other half are x-1/x on lists of alarms/events - "tst_storage" - ] - })") - ] - )) ]; doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; + disabledTests = [ + # Test expects to be passed a real, already existing database to test migrations. We don't have one + "tst_perf" + + # 10/97 tests fail. Half seem related to time (zone) issues w/ local time / Helsinki timezone + # Other half are x-1/x on lists of alarms/events + "tst_storage" + ]; # Parallelism breaks tests enableParallelChecking = false;