Unverified Commit c2941150 authored by Emily's avatar Emily Committed by GitHub
Browse files

{mkcal,lib2geom}: use ctestCheckHook, openmvs: remove redundant check phase (#415713)

parents 28a213f3 1ec72988
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -68,11 +68,6 @@ stdenv.mkDerivation rec {
  '';

  doCheck = true;
  checkPhase = ''
    runHook preCheck
    ctest
    runHook postCheck
  '';

  meta = {
    description = "Open Multi-View Stereo reconstruction library";
+24 −31
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
  cairo,
  double-conversion,
  gtest,
  ctestCheckHook,
  lib,
  inkscape,
  pkgsCross,
@@ -47,6 +48,7 @@ stdenv.mkDerivation (finalAttrs: {

  nativeCheckInputs = [
    gtest
    ctestCheckHook
  ];

  cmakeFlags = [
@@ -56,10 +58,7 @@ stdenv.mkDerivation (finalAttrs: {
  ];

  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;

  # TODO: Update cmake hook to make it simpler to selectively disable cmake tests: #113829
  checkPhase =
    let
  dontUseNinjaCheck = true;
  disabledTests =
    lib.optionals stdenv.hostPlatform.isMusl [
      # Fails due to rounding differences
@@ -85,12 +84,6 @@ stdenv.mkDerivation (finalAttrs: {
      "bezier-test"
      "ellipse-test"
    ];
    in
    ''
      runHook preCheck
      ctest --output-on-failure -E '^${lib.concatStringsSep "|" disabledTests}$'
      runHook postCheck
    '';

  passthru = {
    tests = {
+10 −16
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
  perl,
  pkg-config,
  tzdata,
  ctestCheckHook,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -62,6 +63,7 @@ stdenv.mkDerivation (finalAttrs: {

  nativeCheckInputs = [
    tzdata
    ctestCheckHook
  ];

  cmakeFlags = [
@@ -69,26 +71,18 @@ 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 "|" [
  ];

  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"
          ]
        })")
      ]
    ))
  ];

  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;

  # Parallelism breaks tests
  enableParallelChecking = false;