git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: git@vger.kernel.org,
	"brian m. carlson" <sandals@crustytoothpaste.net>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] t5310-pack-bitmaps: skip JGit tests with SHA256
Date: Sun, 15 Nov 2020 23:08:40 +0100 (CET)
Message-ID: <nycvar.QRO.7.76.6.2011152252520.18437@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <20201113215307.20855-1-szeder.dev@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1840 bytes --]

Hi Gábor,

On Fri, 13 Nov 2020, SZEDER Gábor wrote:

> In 't5310-pack-bitmaps.sh' two tests make sure that our pack bitmaps
> are compatible with JGit's bitmaps.  Alas, not even the most recent
> JGit version (5.9.0.202009080501-r) supports SHA256 yet, so when this
> test script is run with GIT_TEST_DEFAULT_HASH=sha256 on a setup with
> JGit installed in PATH, then these two tests fail.

I wonder whether there is a way to change the `JGIT` prereq in a way
that automagically will recognize a (future) SHA256-enabled JGit?
Something like

test_lazy_prereq JGIT '
	jgit --version &&
        test_have_prereq !SHA1 ||
	test "$(git rev-list -n 1 HEAD)" = "$(jgit rev-list -n 1 HEAD)"
'

What do you think?

Ciao,
Dscho

>
> Protect these two tests with the SHA1 prereq in order to skip them
> when testing with SHA256.
>
> Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
> ---
>  t/t5310-pack-bitmaps.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/t/t5310-pack-bitmaps.sh b/t/t5310-pack-bitmaps.sh
> index 8318781d2b..1d40fcad39 100755
> --- a/t/t5310-pack-bitmaps.sh
> +++ b/t/t5310-pack-bitmaps.sh
> @@ -277,7 +277,7 @@ test_expect_success 'pack with missing parent' '
>  	git pack-objects --stdout --revs <revs >/dev/null
>  '
>
> -test_expect_success JGIT 'we can read jgit bitmaps' '
> +test_expect_success JGIT,SHA1 'we can read jgit bitmaps' '
>  	git clone --bare . compat-jgit.git &&
>  	(
>  		cd compat-jgit.git &&
> @@ -287,7 +287,7 @@ test_expect_success JGIT 'we can read jgit bitmaps' '
>  	)
>  '
>
> -test_expect_success JGIT 'jgit can read our bitmaps' '
> +test_expect_success JGIT,SHA1 'jgit can read our bitmaps' '
>  	git clone --bare . compat-us.git &&
>  	(
>  		cd compat-us.git &&
> --
> 2.29.2.612.g41c40d3f73
>
>

  parent reply	other threads:[~2020-11-16 10:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13 21:53 SZEDER Gábor
2020-11-13 21:56 ` Taylor Blau
2020-11-13 23:43 ` brian m. carlson
2020-11-15 21:13 ` SZEDER Gábor
2020-11-15 22:08 ` Johannes Schindelin [this message]
2020-11-18 18:30   ` SZEDER Gábor
2020-11-18 18:45     ` Jeff King
2020-11-19 11:19       ` Johannes Schindelin
2020-11-19 15:44         ` 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=nycvar.QRO.7.76.6.2011152252520.18437@tvgsbejvaqbjf.bet \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sandals@crustytoothpaste.net \
    --cc=szeder.dev@gmail.com \
    /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

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for the project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git