From: Jeff King <peff@peff.net>
To: "Robin H. Johnson" <robbat2@gentoo.org>
Cc: Johannes Sixt <j6t@kdbg.org>, Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] NO_PERL support
Date: Fri, 3 Apr 2009 09:20:29 -0400 [thread overview]
Message-ID: <20090403132029.GC21153@coredump.intra.peff.net> (raw)
In-Reply-To: <20090403T065545Z@curie.orbis-terrarum.net>
[cc'ing Johannes because of some possibly related work in the test
scripts; see below]
On Fri, Apr 03, 2009 at 12:03:50AM -0700, Robin H. Johnson wrote:
> The attached patch adds NO_PERL to the build system, in the same fashion
> as NO_TCLTK.
I think this is a good change. One of my less-abled test platforms has a
broken perl, and I end up having to manually skip a lot of tests. Being
able to set NO_PERL and have the tests themselves realize they must be
skipped will be much cleaner.
> Effects:
> - No perl-based scripts or code are installed:
> $SCRIPT_PERL
> git-instaweb
> gitweb
> git-cvsserver
> git-svn
> - git-add does NOT have interactive support.
> - None of the tests for the disabled stuff gets run.
Hmm. With this patch, a user with a NO_PERL build will just get:
$ git svn
git: 'svn' is not a git-command. See 'git --help'.
$ git add -i
error: unknown switch `i'
usage: ...
I wonder if we should be a little nicer and say "we know about this
command or option, but we did not build support for it". OTOH, what you
have mirrors what NO_TCLTK does, so perhaps it is not a big deal.
> @@ -1067,6 +1079,11 @@ endif
> ifeq ($(TCLTK_PATH),)
> NO_TCLTK=NoThanks
> endif
> +ifeq ($(PERL_PATH),)
> +NO_PERL=NoThanks
> +export NO_PERL
> +export NO_PERL_MAKEMAKER
> +endif
Do we have to actually export here? NO_TCLTK doesn't. If it's for the
test scripts, then should it be part of GIT-BUILD-OPTIONS?
> +if test -n "$NO_PERL"
> +then
> + test_expect_success 'skipping git-svn tests, NO_PERL defined' :
> + test_done
> + exit
> +fi
This probably got copied from an older example, but I think the
recommended way to skip tests these days is to use 'say' instead of
test_expect_success (since we have statistics on passing/failing tests
now).
Also, it may make sense to integrate this with Johannes Sixt's
test_have_prereq work (which is still in next), but I haven't looked too
closely at that.
> -test_expect_success \
> +[ -z "$NO_PERL" ] && test_expect_success \
I think it is nicer to actually say "skipping test" as the other spots
do instead of just not running it.
-Peff
next prev parent reply other threads:[~2009-04-03 13:22 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-03 7:03 [PATCH] NO_PERL support Robin H. Johnson
2009-04-03 13:20 ` Jeff King [this message]
2009-04-03 14:51 ` Johannes Schindelin
2009-04-03 14:53 ` Jeff King
2009-04-03 15:02 ` Johannes Schindelin
2009-04-03 15:11 ` Miklos Vajna
2009-04-03 15:16 ` Jeff King
2009-04-03 17:54 ` Johannes Sixt
2009-04-03 18:37 ` Jeff King
2009-04-03 15:46 ` Jeff King
2009-04-03 15:59 ` Robin H. Johnson
2009-04-03 16:18 ` Jeff King
2009-04-03 16:25 ` Junio C Hamano
2009-04-03 17:15 ` Jeff King
2009-04-03 20:20 ` Junio C Hamano
2009-04-03 20:56 ` Jeff King
2009-04-03 19:27 ` [PATCH 0/4] " Jeff King
2009-04-03 19:28 ` [PATCH 1/4] commit: abort commit if interactive add failed Jeff King
2009-04-03 19:31 ` [PATCH 2/4] tests: remove exit after test_done call Jeff King
2009-04-03 19:32 ` [PATCH 3/4] Makefile: allow building without perl Jeff King
2009-04-04 22:47 ` Robin H. Johnson
2009-04-04 23:39 ` Jeff King
2009-04-04 23:51 ` Robin H. Johnson
2009-04-04 23:56 ` Jeff King
2009-04-05 0:06 ` Robin H. Johnson
2009-04-07 7:27 ` Jeff King
2009-04-03 19:33 ` [PATCH 4/4] tests: skip perl tests if NO_PERL is defined Jeff King
2009-04-04 23:30 ` Robin H. Johnson
2009-04-04 23:42 ` Jeff King
2009-04-07 7:31 ` [PATCH 0/4] NO_PERL support Jeff King
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090403132029.GC21153@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=robbat2@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).