From 4ac67163c4e2f93411018b21a6769fecc374cac4 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 8 Jun 2021 18:38:11 +0200 Subject: [PATCH] git: Drop POSIXPERM for the tests Shared permissions are forbidden in the Nix build sandbox which is why some of the tests fail. Dropping the POSIXPERM test prerequisite, that is added unconditionally on Linux, should help us avoiding uninteresting test failures after Git updates. The drawback is that this disables a few additional tests (as of Git 2.32.0 approx. 71 out of more than 20k subtests require POSIXPERM). --- .../version-management/git-and-tools/git/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/git/default.nix b/pkgs/applications/version-management/git-and-tools/git/default.nix index e153b59fd8e3..886f293d1058 100644 --- a/pkgs/applications/version-management/git-and-tools/git/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git/default.nix @@ -290,11 +290,13 @@ stdenv.mkDerivation { fi } - # Shared permissions are forbidden in sandbox builds. - disable_test t0001-init shared + # Shared permissions are forbidden in sandbox builds: + substituteInPlace t/test-lib.sh \ + --replace "test_set_prereq POSIXPERM" "" + # TODO: Investigate while these still fail (without POSIXPERM): + disable_test t0001-init 'shared overrides system' + disable_test t0001-init 'init honors global core.sharedRepository' disable_test t1301-shared-repo - disable_test t5324-split-commit-graph 'split commit-graph respects core.sharedrepository' - disable_test t4129-apply-samemode 'do not use core.sharedRepository for working tree files' # Our patched gettext never fallbacks disable_test t0201-gettext-fallbacks