git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: git@vger.kernel.org, tboegi@web.de
Subject: Re: [PATCH 0/5] test-lib: filesystem prerequisites
Date: Thu, 26 Jul 2012 11:16:45 -0700	[thread overview]
Message-ID: <7vtxwu75gy.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <cover.1343309173.git.git@drmicha.warpmail.net> (Michael J. Gruber's message of "Thu, 26 Jul 2012 15:39:52 +0200")

Michael J Gruber <git@drmicha.warpmail.net> writes:

> This mini series provides and makes use of test prerequisites for
> case insensitivity, symlinks and unicode conversion.
>
> SYMLINKS existed before but was not used in t0050.
> CASE_INSENSITIVE_FS was defined in t0003 rather than test-lib (and redone in
> t0050).
> UTF8_NFD_TO_NFC did not exist but was redone in two ways in two tests.
>
> After this series, all 3 are defined in test-lib and used in the various tests.

Consolidating the logic to set necessary prerequisites used in
various scripts is very good, but I am not sure adding them to
test-lib and run them unconditionally is a good idea.  SYMLINKS is
used by 47 among 595 tests, which is common enough, but the new ones
are not common enough.  I do not think we want to create a temporary
"junk" dir, two temporary "camelcase" files, read and compare them,
when nobody in the script cares.

We do not have to split them into separate include files, though, in
order to avoid such waste.  Instead, you can make the logic to set
prerequisite conditional inside test-lib.sh and update the users.

Something like:

	(in t/test-lib.sh)
	case ",$TEST_WANT_PREREQ," in
	*,CASE_INSENSITIVE_FS,*)
		mkdir junk &&
                echo good >junk/CamelCase &&
                echo bad >junk/camelcase &&
                test "$(cat junk/CamelCase)" == good ||
                test_set_prereq CASE_INSENSITIVE_FS
		rm -fr junk
	esac

	(at the beginning of t/t0003-attributes.sh)
	#!/bin/sh
        test_description=gitattributes
        TEST_WANT_PREREQ=CASE_INSENSITIVE_FS,SYMLINKS
	. ./test-lib.sh

Thanks.

  parent reply	other threads:[~2012-07-26 18:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-14 17:52 [PATCH] t3910: give reason for skipping the test Michael J Gruber
2012-07-14 18:19 ` Torsten Bögershausen
2012-07-26 13:39   ` [PATCH 0/5] test-lib: filesystem prerequisites Michael J Gruber
2012-07-26 13:39     ` [PATCH 1/5] test-lib: provide case insensitivity as a prerequisite Michael J Gruber
2012-07-26 13:39     ` [PATCH 2/5] t0050: use the CASE_INSENSITIVE_FS test prereq Michael J Gruber
2012-07-26 13:39     ` [PATCH 3/5] t0050: use the SYMLINKS " Michael J Gruber
2012-07-26 13:39     ` [PATCH 4/5] test-lib: provide UTF8 behaviour as a prerequisite Michael J Gruber
2012-07-26 13:39     ` [PATCH 5/5] t3910: use the SYMLINKS test prereq Michael J Gruber
2012-07-26 18:16     ` Junio C Hamano [this message]
2012-07-26 18:43       ` [PATCH 0/5] test-lib: filesystem prerequisites Jeff King
2012-07-26 20:10         ` Junio C Hamano
2012-07-27  9:31           ` Michael J Gruber
2012-07-27 17:29             ` Junio C Hamano
2012-07-30  9:56               ` Michael J Gruber
2012-07-30  9:57               ` [PATCHv2 5/5] t3910: use the UTF8_NFD_TO_NFC test prereq Michael J Gruber
2012-07-30 15:29                 ` Junio C Hamano
2012-08-04  5:37                 ` Torsten Bögershausen
2012-08-04 22:04                   ` Junio C Hamano
2012-08-06 12:44                     ` Michael J Gruber

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=7vtxwu75gy.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=tboegi@web.de \
    /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).