Commit cf22247b authored by Junio C Hamano's avatar Junio C Hamano

Merge branch 'tz/cred-netrc-cleanup'

Build and test procedure for netrc credential helper (in contrib/)
has been updated.

* tz/cred-netrc-cleanup:
  git-credential-netrc: make "all" default target of Makefile
  git-credential-netrc: fix exit status when tests fail
  git-credential-netrc: use in-tree Git.pm for tests
  git-credential-netrc: minor whitespace cleanup in test script
parents 18404434 04542b60
# The default target of this Makefile is...
all::
test:
./t-git-credential-netrc.sh
......
......@@ -17,15 +17,16 @@
# set up test repository
test_expect_success \
'set up test repository' \
'git config --add gpg.program test.git-config-gpg'
'set up test repository' \
'git config --add gpg.program test.git-config-gpg'
# 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
'git-credential-netrc' \
perl "$GIT_BUILD_DIR"/contrib/credential/netrc/test.pl
test_done
)
#!/usr/bin/perl
use lib (split(/:/, $ENV{GITPERLLIB}));
use warnings;
use strict;
......@@ -12,7 +11,6 @@ BEGIN
# t-git-credential-netrc.sh kicks off our testing, so we have to go
# from there.
Test::More->builder->current_test(1);
Test::More->builder->no_ending(1);
}
my @global_credential_args = @ARGV;
......@@ -104,6 +102,9 @@ BEGIN
ok(scalar keys %$cred == 2, 'Got keys decrypted by command option');
my $is_passing = eval { Test::More->is_passing };
exit($is_passing ? 0 : 1) unless $@ =~ /Can't locate object method/;
sub run_credential
{
my $args = shift @_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment