git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC PATCH v2 3/4] git-credential-netrc: use in-tree Git.pm for tests

From
Todd Zullinger <tmz@pobox.com>
Date
Jun 13, 2018, 03:10 UTC
Message-ID
<20180613031040.3109-4-tmz@pobox.com>
In-Reply-To
<20180607051958.759-1-tmz@pobox.com>
From: Luis Marsano <luis.marsano@gmail.com>

The netrc test.pl script calls git-credential-netrc which imports the Git module. Pass GITPERLLIB to git-credential-netrc via PERL5LIB to ensure the in-tree Git module is used for testing.

Signed-off-by: Luis Marsano <luis.marsano@gmail.com>
---
 contrib/credential/netrc/t-git-credential-netrc.sh | 3 ++-
 contrib/credential/netrc/test.pl                   | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/credential/netrc/t-git-credential-netrc.sh b/contrib/credential/netrc/t-git-credential-netrc.sh
index c5661087fe..07227d0228 100755
--- a/contrib/credential/netrc/t-git-credential-netrc.sh
+++ b/contrib/credential/netrc/t-git-credential-netrc.sh
@@ -23,9 +23,10 @@
 	# The external test will outputs its own plan
 	test_external_has_tap=1
 
+	export PERL5LIB="$GITPERLLIB"
 	test_external \
 		'git-credential-netrc' \
-		perl "$TEST_DIRECTORY"/../contrib/credential/netrc/test.pl
+		perl "$GIT_BUILD_DIR"/contrib/credential/netrc/test.pl
 
 	test_done
 )
diff --git a/contrib/credential/netrc/test.pl b/contrib/credential/netrc/test.pl
index 1e1001030e..2b5280ad6a 100755
--- a/contrib/credential/netrc/test.pl
+++ b/contrib/credential/netrc/test.pl
@@ -1,5 +1,4 @@
 #!/usr/bin/perl
-use lib (split(/:/, $ENV{GITPERLLIB}));
 
 use warnings;
 use strict;
Previous: Eric SunshineNext: Todd Zullinger
Message 19 of 20 in “contrib/credential/netrc Makefile & test improvements”
  1. 0/2 contrib/credential/netrc Makefile & test improvementsTodd Zullinger, Jun 7, 2018
  2. 1/2 git-credential-netrc: make "all" default target of MakefileTodd Zullinger, Jun 7, 2018
  3. 2/2 git-credential-netrc: use in-tree Git.pm for testsTodd Zullinger, Jun 7, 2018
  4. Luis MarsanoJun 9, 2018
  5. Todd ZullingerJun 10, 2018
  6. Ævar Arnfjörð BjarmasonJun 10, 2018
  7. Todd ZullingerJun 13, 2018
  8. Luis MarsanoJun 13, 2018
  9. git-credential-netrc: remove use of "autodie"Ævar Arnfjörð Bjarmason, Jun 13, 2018
  10. Junio C HamanoJun 13, 2018
  11. Todd ZullingerJun 13, 2018
  12. 0/4 contrib/credential/netrc Makefile & test improvementsTodd Zullinger, Jun 13, 2018
  13. Luis MarsanoJun 13, 2018
  14. 1/4 git-credential-netrc: make "all" default target of MakefileTodd Zullinger, Jun 13, 2018
  15. 2/4 git-credential-netrc: minor whitespace cleanup in test scriptTodd Zullinger, Jun 13, 2018
  16. Eric SunshineJun 13, 2018
  17. Todd ZullingerJun 13, 2018
  18. Eric SunshineJun 13, 2018
  19. 3/4 git-credential-netrc: use in-tree Git.pm for testsTodd Zullinger, Jun 13, 2018
  20. 4/4 git-credential-netrc: fix exit status when tests failTodd Zullinger, Jun 13, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.