git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Git Mailing List <git@vger.kernel.org>
Subject: Bug in test-lib.sh: test_create_repo() / RFC
Date: Mon, 20 Apr 2009 16:51:18 +0200	[thread overview]
Message-ID: <49EC8BE6.2030709@drmicha.warpmail.net> (raw)

Hi there,

running the test suite with -v for the upcoming release exposed a
certain problem with test_create_repo() whose consequences I can't quite
fathom at the moment. That means: I don't know whether it's maint
material or forbidden fruits during rc-cycle...

Problem:
Since a6d63b7 (test-lib: avoid assuming that templates/ are in the
GIT_EXEC_PATH, 2009-02-04), test_create_repo() assumes to be called from
a directory such that `pwd`/../templates/blt/ contains templates for
git-init.

Several tests (see below) call test_create_repo() from a different
directory, which means the repo is created without any of the default
files (and that a mv .git/hooks .git/hooks-disabled later in the
function errors out). Now, for most tests this probably doesn't matter
at all but it's not nice.

RFC:
I see several possible solutions:

- Make sure all tests use test_create_repo() from t/. Cumbersome and
fragile.

- Simply use $(TEST_DIRECTORY)/../templates/blt/. Nice and easy. But
uses the templates from the git repo containing t/ even when testing
against and installed git (just like now, for most of the tests).

- Teach git a "--templates-dir" option similar to "--html-path" and use
that (from the git actually being tested). Means we use the templates
belonging to the tested git; but also means we can test only git
versions containing that new option.

What do you think?

Michael

Affected tests:
t0050-filesystem.sh
t1007-hash-object.sh
t1302-repo-version.sh
t2103-update-index-ignore-missing.sh
t4027-diff-submodule.sh
t5300-pack-object.sh
t5513-fetch-track.sh
t5600-clone-fail-cleanup.sh
t5601-clone.sh
t5700-clone-reference.sh
t5710-info-alternate.sh
t6026-merge-attr.sh
t7001-mv.sh
t7010-setup.sh
t7401-submodule-summary.sh
t7506-status-submodule.sh
t7508-status.sh

             reply	other threads:[~2009-04-20 14:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-20 14:51 Michael J Gruber [this message]
2009-04-21  3:06 ` Bug in test-lib.sh: test_create_repo() / RFC Jeff King
2009-04-21  5:32   ` Junio C Hamano
2009-04-21  9:19     ` [PATCH-maint] test-lib.sh: Help test_create_repo() find the templates dir Michael J Gruber
2009-04-21  9:21       ` [PATCH-master] " Michael J Gruber
2009-04-21  9:26       ` [PATCH-maint] " Johannes Schindelin
2009-04-21  9:29         ` 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=49EC8BE6.2030709@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.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).