diff options
Diffstat (limited to 'contrib/credential')
-rw-r--r-- | contrib/credential/netrc/Makefile | 3 | ||||
-rwxr-xr-x | contrib/credential/netrc/t-git-credential-netrc.sh | 9 | ||||
-rwxr-xr-x | contrib/credential/netrc/test.pl | 5 | ||||
-rw-r--r-- | contrib/credential/wincred/git-credential-wincred.c | 3 |
4 files changed, 13 insertions, 7 deletions
diff --git a/contrib/credential/netrc/Makefile b/contrib/credential/netrc/Makefile index 0ffa407191..6174e3bb83 100644 --- a/contrib/credential/netrc/Makefile +++ b/contrib/credential/netrc/Makefile @@ -1,3 +1,6 @@ +# The default target of this Makefile is... +all:: + test: ./t-git-credential-netrc.sh diff --git a/contrib/credential/netrc/t-git-credential-netrc.sh b/contrib/credential/netrc/t-git-credential-netrc.sh index 58191a62f8..07227d0228 100755 --- a/contrib/credential/netrc/t-git-credential-netrc.sh +++ b/contrib/credential/netrc/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 ) diff --git a/contrib/credential/netrc/test.pl b/contrib/credential/netrc/test.pl index 1e1001030e..c0fb3718b2 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; @@ -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 @@ $cred = run_credential( ['-f', $netrcGpg, '-g', 'test.command-option-gpg', 'get' 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 @_; diff --git a/contrib/credential/wincred/git-credential-wincred.c b/contrib/credential/wincred/git-credential-wincred.c index 86518cd93d..5bdad41de1 100644 --- a/contrib/credential/wincred/git-credential-wincred.c +++ b/contrib/credential/wincred/git-credential-wincred.c @@ -75,7 +75,8 @@ static CredDeleteWT CredDeleteW; static void load_cred_funcs(void) { /* load DLLs */ - advapi = LoadLibrary("advapi32.dll"); + advapi = LoadLibraryExA("advapi32.dll", NULL, + LOAD_LIBRARY_SEARCH_SYSTEM32); if (!advapi) die("failed to load advapi32.dll"); |