From: "Jakub Narębski" <jnareb@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>, git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] gitweb tests: Skip tests when we don't have Time::HiRes
Date: Mon, 27 Feb 2017 18:48:21 +0100 [thread overview]
Message-ID: <4b34e3a0-3da7-d821-2a7f-9a420ac1d3f6@gmail.com> (raw)
In-Reply-To: <20170227123720.8493-1-avarab@gmail.com>
W dniu 27.02.2017 o 13:37, Ævar Arnfjörð Bjarmason pisze:
> Change the gitweb tests to skip when we can't load the Time::HiRes
> module.
Could you tell us in the commit message why this module is needed?
Is it because gitweb loads it unconditionally, or does that at least
in the default configuration, or is it used in tests, or...?
[I see it is somewhat addressed below]
>
> This module has bee in perl core since v5.8, which is the oldest
s/bee/been/
> version we support, however CentOS (and perhaps some other
> distributions) carve it into its own non-core-perl package that's not
> installed along with /usr/bin/perl by default. Without this we'll hard
> fail the gitweb tests when trying to load the module.
I see that it because gitweb.perl as the following at line 20:
use Time::HiRes qw(gettimeofday tv_interval);
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Good catch (if a strange one...).
> ---
> t/gitweb-lib.sh | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh
> index d5dab5a94f..116c3890e6 100644
> --- a/t/gitweb-lib.sh
> +++ b/t/gitweb-lib.sh
> @@ -114,4 +114,9 @@ perl -MCGI -MCGI::Util -MCGI::Carp -e 0 >/dev/null 2>&1 || {
> test_done
> }
>
> +perl -mTime::HiRes -e 0 >/dev/null 2>&1 || {
> + skip_all='skipping gitweb tests, Time::HiRes module unusable'
Is "unusable" a good description, instead of "not found"?
> + test_done
> +}
> +
> gitweb_init
>
next prev parent reply other threads:[~2017-02-27 17:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-27 12:37 [PATCH] gitweb tests: Skip tests when we don't have Time::HiRes Ævar Arnfjörð Bjarmason
2017-02-27 17:48 ` Jakub Narębski [this message]
2017-02-27 18:25 ` Ævar Arnfjörð Bjarmason
2017-03-01 21:15 ` [PATCH v2 0/2] Minor changes to skip gitweb tests without Time::HiRes Ævar Arnfjörð Bjarmason
2017-03-01 22:42 ` Junio C Hamano
2017-03-01 21:15 ` [PATCH v2 1/2] gitweb tests: Change confusing "skip_all" phrasing Ævar Arnfjörð Bjarmason
2017-03-01 21:15 ` [PATCH v2 2/2] gitweb tests: Skip tests when we don't have Time::HiRes Ævar Arnfjörð Bjarmason
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=4b34e3a0-3da7-d821-2a7f-9a420ac1d3f6@gmail.com \
--to=jnareb@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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
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).