From a3205db0c5a056bbd9dc8c33f81fa5f921354ea9 Mon Sep 17 00:00:00 2001 From: "Berk D. Demir" Date: Sun, 1 May 2022 23:15:08 +0000 Subject: [PATCH] gitbatch: Fix tests requiring .git & writable HOME Disable the tests requiring access to gitlab.com Bug fixed by #173702 runs the previously skipped tests for this package. --- .../git-and-tools/gitbatch/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/gitbatch/default.nix b/pkgs/applications/version-management/git-and-tools/gitbatch/default.nix index 75fea7bf871f..0eb20db1462a 100644 --- a/pkgs/applications/version-management/git-and-tools/gitbatch/default.nix +++ b/pkgs/applications/version-management/git-and-tools/gitbatch/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, git }: buildGoModule rec { pname = "gitbatch"; @@ -15,7 +15,15 @@ buildGoModule rec { ldflags = [ "-s" "-w" ]; - checkFlags = [ "-short" ]; + nativeBuildInputs = [ + git # required by unit tests + ]; + + preCheck = '' + HOME=$(mktemp -d) + # Disable tests requiring network access to gitlab.com + buildFlagsArray+=("-run" "[^(Test(Run|Start|(Fetch|Pull)With(Go|)Git))]") + ''; meta = with lib; { description = "Running git UI commands";