From fffe54bddcc2bb0cf1ec78ca93da21d151ef1a9e Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 21 Jan 2024 09:26:48 +0100 Subject: [PATCH] libgit2: Enable tests The tests hanging comment dates from 2018. I did encounter a slow test when running them in a nix-shell - the nonetwork::bad_urls one. The name suggests that it might work fine, but it's still annoying when building in nix-shell, and it seems unlikely that this particular test will catch anything for us. --- pkgs/development/libraries/libgit2/default.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libgit2/default.nix b/pkgs/development/libraries/libgit2/default.nix index d21dbcb7ac0a..a47b53a9411a 100644 --- a/pkgs/development/libraries/libgit2/default.nix +++ b/pkgs/development/libraries/libgit2/default.nix @@ -46,7 +46,22 @@ stdenv.mkDerivation rec { propagatedBuildInputs = lib.optional (!stdenv.isLinux) libiconv; - doCheck = false; # hangs. or very expensive? + doCheck = true; + checkPhase = '' + testArgs=(-v -xonline) + + # slow + testArgs+=(-xclone::nonetwork::bad_urls) + + # failed to set permissions on ...: Operation not permitted + testArgs+=(-xrepo::init::extended_1) + testArgs+=(-xrepo::template::extended_with_template_and_shared_mode) + + ( + set -x + ./libgit2_tests ''${testArgs[@]} + ) + ''; passthru.tests = { inherit libgit2-glib;