From: Junio C Hamano <gitster@pobox•com>
To: Felipe Contreras <felipe.contreras@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH 2/2] remote-helpers: move tests out of contrib
Date: Mon, 21 Apr 2014 11:36:56 -0700 [thread overview]
Message-ID: <xmqq7g6ia5rr.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1398029971-1396-3-git-send-email-felipe.contreras@gmail.com> (Felipe Contreras's message of "Sun, 20 Apr 2014 16:39:31 -0500")
Felipe Contreras <felipe.contreras@gmail•com> writes:
> They should be tested by default.
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail•com>
> ---
> contrib/remote-helpers/Makefile | 14 --------------
> t/Makefile | 8 +++++++-
> .../remote-helpers/test-bzr.sh => t/remote-helpers/bzr.t | 2 +-
> .../test-hg-bidi.sh => t/remote-helpers/hg-bidi.t | 2 +-
> .../test-hg-hg-git.sh => t/remote-helpers/hg-hg-git.t | 2 +-
> contrib/remote-helpers/test-hg.sh => t/remote-helpers/hg.t | 2 +-
> 6 files changed, 11 insertions(+), 19 deletions(-)
> delete mode 100644 contrib/remote-helpers/Makefile
> rename contrib/remote-helpers/test-bzr.sh => t/remote-helpers/bzr.t (99%)
> rename contrib/remote-helpers/test-hg-bidi.sh => t/remote-helpers/hg-bidi.t (98%)
> rename contrib/remote-helpers/test-hg-hg-git.sh => t/remote-helpers/hg-hg-git.t (99%)
> rename contrib/remote-helpers/test-hg.sh => t/remote-helpers/hg.t (99%)
>
> diff --git a/contrib/remote-helpers/Makefile b/contrib/remote-helpers/Makefile
> deleted file mode 100644
> index 239161d..0000000
> --- a/contrib/remote-helpers/Makefile
> +++ /dev/null
> @@ -1,14 +0,0 @@
> -TESTS := $(wildcard test*.sh)
> -
> -export T := $(addprefix $(CURDIR)/,$(TESTS))
> -export MAKE := $(MAKE) -e
> -export PATH := $(CURDIR):$(PATH)
> -export TEST_LINT := test-lint-executable test-lint-shell-syntax
> -
> -test:
> - $(MAKE) -C ../../t $@
> -
> -$(TESTS):
> - $(MAKE) -C ../../t $(CURDIR)/$@
> -
> -.PHONY: $(TESTS)
> diff --git a/t/Makefile b/t/Makefile
> index 8fd1a72..818f4ed 100644
> --- a/t/Makefile
> +++ b/t/Makefile
> @@ -14,6 +14,7 @@ RM ?= rm -f
> PROVE ?= prove
> DEFAULT_TEST_TARGET ?= test
> TEST_LINT ?= test-lint-duplicates test-lint-executable
> +export TEST_DIRECTORY = $(CURDIR)
>
> ifdef TEST_OUTPUT_DIRECTORY
> TEST_RESULTS_DIRECTORY = $(TEST_OUTPUT_DIRECTORY)/test-results
> @@ -29,6 +30,9 @@ TEST_RESULTS_DIRECTORY_SQ = $(subst ','\'',$(TEST_RESULTS_DIRECTORY))
> T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))
> TSVN = $(sort $(wildcard t91[0-9][0-9]-*.sh))
> TGITWEB = $(sort $(wildcard t95[0-9][0-9]-*.sh))
> +TREMOTE = $(wildcard remote-helpers/*.t)
This step needs a bit more work, I am afraid, to at least have these
three test scripts follow the same numbering scheme. Especially given
that there were recent discussions on allowing a range of tests to
be run (or omitted) via notations like "5000,5020,9800-9812", not
doing so now will make it harder to implement such an enhancement.
Also, I noticed that, unlike say t9801 that shows this:
$ cd t && make T=t9801-*sh prove
rm -f -r 'test-results'
*** prove ***
t9801-git-p4-branch.sh .. skipped: skipping git p4 tests; no p4 or p4d
Files=1, Tests=0, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.00 ...
Result: NOTESTS
these are unnecessarily noisy when refusing to run:
$ cd t && make T=remote-helpers/bzr.t prove
*** prove ***
remote-helpers/bzr.t .. Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/buildtools/current/sitecustomize/sitecu...
return real_import(name, globals, locals, fromlist, level)
ImportError: No module named bzrlib
remote-helpers/bzr.t .. skipped: skipping remote-bzr tests; bzr not available
Files=1, Tests=0, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.02 ...
Can we squelch these expected import error messages?
Thanks.
next prev parent reply other threads:[~2014-04-21 18:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-20 21:39 [PATCH 0/2] remote-helpers: graduate Felipe Contreras
2014-04-20 21:39 ` [PATCH 1/2] remote-helpers: move out of contrib Felipe Contreras
2014-04-20 21:39 ` [PATCH 2/2] remote-helpers: move tests " Felipe Contreras
2014-04-21 18:36 ` Junio C Hamano [this message]
2014-04-21 18:53 ` Felipe Contreras
2014-04-21 19:24 ` Junio C Hamano
2014-04-21 19:23 ` Felipe Contreras
2014-04-21 18:06 ` [PATCH 0/2] remote-helpers: graduate Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq7g6ia5rr.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=felipe.contreras@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox