Unverified Commit 5e9102e8 authored by Sergei Zimmerman's avatar Sergei Zimmerman
Browse files

ccache: use ctestCheckHook, writableTmpDirAsHomeHook

parent 042d7c5f
Loading
Loading
Loading
Loading
+14 −19
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@
  doctest,
  xcodebuild,
  makeWrapper,
  ctestCheckHook,
  writableTmpDirAsHomeHook,
  nix-update-script,
}:

@@ -82,15 +84,15 @@ stdenv.mkDerivation (finalAttrs: {
    # test/run requires the compgen function which is available in
    # bashInteractive, but not bash.
    bashInteractive
    ctestCheckHook
    writableTmpDirAsHomeHook
  ] ++ lib.optional stdenv.hostPlatform.isDarwin xcodebuild;

  checkInputs = [
    doctest
  ];

  checkPhase =
    let
      badTests =
  disabledTests =
    [
      "test.trim_dir" # flaky on hydra (possibly filesystem-specific?)
    ]
@@ -100,13 +102,6 @@ stdenv.mkDerivation (finalAttrs: {
      "test.multi_arch"
      "test.nocpp2"
    ];
    in
    ''
      runHook preCheck
      export HOME=$(mktemp -d)
      ctest --output-on-failure -E '^(${lib.concatStringsSep "|" badTests})$'
      runHook postCheck
    '';

  passthru = {
    # A derivation that provides gcc and g++ commands, but that