From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 05/16] test-lib: Infrastructure to test and check for prerequisites
Date: Sat, 21 Mar 2009 16:16:44 -0700 [thread overview]
Message-ID: <7vmybebh5v.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <a7bb394037e1c32d47d0b04da025bdbe2eb78d66.1237667830.git.j6t@kdbg.org> (Johannes Sixt's message of "Sat, 21 Mar 2009 22:26:28 +0100")
Johannes Sixt <j6t@kdbg.org> writes:
> Some tests can be run only if a particular prerequisite is available. For
> example, some tests require that an UTF-8 locale is available. Here we
> introduce functions that are used in this way:
>
> 1. Insert code that checks whether the prerequisite is available. If it is,
> call test_set_prereq with an arbitrary tag name that subsequently can be
> used to check for the prerequisite:
>
> case $LANG in
> *.utf-8)
> test_set_prereq UTF8
> ;;
> esac
>
> 2. In the calls to test_expect_success pass the tag name:
>
> test_expect_success UTF8 '...description...' '...tests...'
>
> 3. There is an auxiliary predicate that can be used anywhere to test for
> a prerequisite explicitly:
>
> if test_have_prereq UTF8
> then
> ...code to be skipped if prerequisite is not available...
> fi
>
> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Very nicely done. Thanks.
next prev parent reply other threads:[~2009-03-21 23:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-21 21:26 [PATCH 00/16] Tests on Windows - main part Johannes Sixt
2009-03-21 21:26 ` [PATCH 01/16] test-lib: Work around incompatible sort and find on Windows Johannes Sixt
2009-03-21 21:26 ` [PATCH 02/16] test-lib: Work around missing sum " Johannes Sixt
2009-03-21 21:26 ` [PATCH 03/16] Tests on Windows: $(pwd) must return Windows-style paths Johannes Sixt
2009-03-21 21:26 ` [PATCH 04/16] t0050: Check whether git init detected symbolic link support correctly Johannes Sixt
2009-03-21 21:26 ` [PATCH 05/16] test-lib: Infrastructure to test and check for prerequisites Johannes Sixt
2009-03-21 23:16 ` Junio C Hamano [this message]
2009-03-21 21:26 ` [PATCH 06/16] t3600: Use test prerequisite tags Johannes Sixt
2009-03-21 23:15 ` Junio C Hamano
2009-03-21 21:26 ` [PATCH 07/16] Skip tests that fail if the executable bit is not handled by the filesystem Johannes Sixt
2009-03-21 21:26 ` [PATCH 08/16] t5302: Use prerequisite tags to skip 64-bit offset tests Johannes Sixt
2009-03-21 21:26 ` [PATCH 09/16] t9100, t9129: Use prerequisite tags for UTF-8 tests Johannes Sixt
2009-03-21 21:26 ` [PATCH 10/16] Use prerequisite tags to skip tests that depend on symbolic links Johannes Sixt
2009-03-21 21:26 ` [PATCH 11/16] t0060: Fix tests on Windows Johannes Sixt
2009-03-21 21:26 ` [PATCH 12/16] Skip tests that require a filesystem that obeys POSIX permissions Johannes Sixt
2009-03-21 21:26 ` [PATCH 13/16] t3700: Skip a test with backslashes in pathspec Johannes Sixt
2009-03-21 23:14 ` Junio C Hamano
2009-03-22 16:55 ` Johannes Sixt
2009-03-22 21:59 ` Junio C Hamano
2009-03-21 21:26 ` [PATCH 14/16] Use prerequisites to skip tests that need unzip Johannes Sixt
2009-03-21 21:26 ` [PATCH 15/16] t7004: Use prerequisite tags to skip tests that need gpg Johannes Sixt
2009-03-21 21:26 ` [PATCH 16/16] t5503: GIT_DEBUG_SEND_PACK is not supported on MinGW Johannes Sixt
2009-03-21 21:41 ` [PATCH 00/16] Tests on Windows - main part Johannes Sixt
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=7vmybebh5v.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.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.
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 NNTP newsgroup(s).