Unverified Commit a4533f77 authored by Sergei Zimmerman's avatar Sergei Zimmerman Committed by Sergei Zimmerman
Browse files

mkcal: use ctestCheckHook

This greatly simplifies the test skipping code.
parent feab9efa
Loading
Loading
Loading
Loading
+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;