git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [RFC PATCH 0/2] contrib/credential/netrc Makefile & test improvements
@ 2018-06-07  5:19 Todd Zullinger
  2018-06-07  5:19 ` [RFC PATCH 1/2] git-credential-netrc: make "all" default target of Makefile Todd Zullinger
                   ` (7 more replies)
  0 siblings, 8 replies; 20+ messages in thread
From: Todd Zullinger @ 2018-06-07  5:19 UTC (permalink / raw)
  To: git; +Cc: Luis Marsano, Ted Zlatanov,
	Ævar Arnfjörð Bjarmason

Hi,

I noticed failures from the contrib/credential/netrc tests
while building 2.18.0 release candidates.  I was surprised
to see the tests being run when called with a simple 'make'
command.

The first patch in the series adds an empty 'all::' make
target to match most of our other Makefiles and avoid the
surprise of running tests by default.  (When the netrc
helper was added to the fedora builds, it copied the same
'make -C contrib/credential/...' pattern from other
credential helpers -- despite the lack of anything to
build.)

The actual test failures were initially due to my build
environment lacking the perl autodie module, which was added
in 786ef50a23 ("git-credential-netrc: accept gpg option",
2018-05-12).

After installing the autodie module, the failures were due
to the build environment lacking a git install (specifically
the perl Git module).  The tests needing a pre-installed
perl Git seemed odd and worth fixing.

The second patch in the series aims to fix this.  I'm not
sure if there's a better or more preferable way to fix this,
which is one of the reasons for the RFC tag. (It's also why
I added you to the Cc Ævar, as you're one of the
knowledgeable perl folks here.)

The other reason for the RFC tag is that I'm unsure of how
to fix the last issue I found.  The tests exit cleanly even
when there are failures, which seems undesirable.  I'm not
familiar with the perl test_external framework to suggest a
fix in patch form.  It might be a matter of adding something
like this, from t/t9700/test.pl:

    my $is_passing = eval { Test::More->is_passing };
    exit($is_passing ? 0 : 1) unless $@ =~ /Can't locate object method/;

?  But that's a wild guess which I haven't tested.

Here's the output from 'make test' showing that most tests
fail and we still get a clean exit status:

$ make -C contrib/credential/netrc test ; echo "netrc test exit status: $?"
make: Entering directory '/builddir/build/BUILD/git-2.18.0.rc1/contrib/credential/netrc'
./t-git-credential-netrc.sh
ok 1 - set up test repository
# run 1: git-credential-netrc (perl /builddir/build/BUILD/git-2.18.0.rc1/t/../contrib/credential/netrc/test.pl)
ok 2 - Got 0 keys from insecure file
ok 3 - Got 0 keys from missing file
not ok 4 - Got first found keys with bad data
ok 5 - Got no corovamilkbar keys
not ok 6 - Got 2 Github keys
not ok 7 - Got correct Github password
not ok 8 - Got correct Github username
not ok 9 - Got 2 username-specific keys
not ok 10 - Got correct user-specific password
not ok 11 - Got correct user-specific protocol
not ok 12 - Got 2 host:port-specific keys
not ok 13 - Got correct host:port-specific password
not ok 14 - Got correct host:port-specific username
not ok 15 - Got 2 'host:port kills host' keys
not ok 16 - Got correct 'host:port kills host' password
not ok 17 - Got correct 'host:port kills host' username
not ok 18 - Got keys decrypted by git config option
not ok 19 - Got keys decrypted by command option
# test_external test git-credential-netrc was ok
make: Leaving directory '/builddir/build/BUILD/git-2.18.0.rc1/contrib/credential/netrc'
netrc test exit status: 0

Todd Zullinger (2):
  git-credential-netrc: make "all" default target of Makefile
  git-credential-netrc: use in-tree Git.pm for tests

 contrib/credential/netrc/Makefile | 3 +++
 contrib/credential/netrc/test.pl  | 3 +++
 2 files changed, 6 insertions(+)

Thanks all.

-- 
2.18.0.rc1

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2018-06-13 17:43 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-07  5:19 [RFC PATCH 0/2] contrib/credential/netrc Makefile & test improvements Todd Zullinger
2018-06-07  5:19 ` [RFC PATCH 1/2] git-credential-netrc: make "all" default target of Makefile Todd Zullinger
2018-06-07  5:19 ` [RFC PATCH 2/2] git-credential-netrc: use in-tree Git.pm for tests Todd Zullinger
2018-06-09 21:18 ` [RFC PATCH 0/2] contrib/credential/netrc Makefile & test improvements Luis Marsano
2018-06-10  2:28   ` Todd Zullinger
2018-06-10  8:36     ` Ævar Arnfjörð Bjarmason
2018-06-13  3:08       ` Todd Zullinger
2018-06-13  6:15         ` Luis Marsano
2018-06-13  7:48           ` [PATCH] git-credential-netrc: remove use of "autodie" Ævar Arnfjörð Bjarmason
2018-06-13 16:48             ` Junio C Hamano
2018-06-13 17:26               ` Todd Zullinger
2018-06-13  3:10 ` [RFC PATCH v2 0/4] contrib/credential/netrc Makefile & test improvements Todd Zullinger
2018-06-13  6:59   ` Luis Marsano
2018-06-13  3:10 ` [RFC PATCH v2 1/4] git-credential-netrc: make "all" default target of Makefile Todd Zullinger
2018-06-13  3:10 ` [RFC PATCH v2 2/4] git-credential-netrc: minor whitespace cleanup in test script Todd Zullinger
2018-06-13  5:42   ` Eric Sunshine
2018-06-13 17:21     ` Todd Zullinger
2018-06-13 17:43       ` Eric Sunshine
2018-06-13  3:10 ` [RFC PATCH v2 3/4] git-credential-netrc: use in-tree Git.pm for tests Todd Zullinger
2018-06-13  3:10 ` [RFC PATCH v2 4/4] git-credential-netrc: fix exit status when tests fail Todd Zullinger

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).