From: Eric Wong <e@80x24.org>
To: Kyle Meyer <kyle@kyleam.com>
Cc: meta@public-inbox.org,
Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Subject: Re: [PATCH 3/3] t/www_listing: require grok-pull version 2 or later
Date: Sun, 21 Feb 2021 22:20:13 +0000 [thread overview]
Message-ID: <20210221222013.GA31960@dcvr> (raw)
In-Reply-To: <20210221214612.15071-4-kyle@kyleam.com>
Kyle Meyer <kyle@kyleam.com> wrote:
> The grok-pull-based tests in www_listing are incompatible with
> Grokmirror v2 in two ways: the generated configuration format and the
> expected exit codes. Update the tests to work with v2, and skip them
> for earlier versions.
>
> This was tested with the latest release of Grokmirror, v2.0.7. Note
> that the "pull" and "fsck" sections are required even though they're
> empty.
> ---
>
> Another option would be to generate an appropriate v1 or v2
> configuration based on which Grokmirror version is detected. I'm
> not sure that's worth the trouble though.
Ugh, some of these incompatible changes to grokmirror are really
annoying and will break existing scripts when I upgrade.
(and I suspect this affects other people, too).
+Cc Konstantin
In any case, I suppose the damage is done and losing some
coverage for now on my Debian stable systems is fine...
> t/www_listing.t | 34 ++++++++++++++++++++--------------
> 1 file changed, 20 insertions(+), 14 deletions(-)
>
> diff --git a/t/www_listing.t b/t/www_listing.t
> index bf35530f3494c016..6a2892de9b827fe6 100644
> --- a/t/www_listing.t
> +++ b/t/www_listing.t
> @@ -122,22 +122,27 @@ SKIP: {
>
> my $grok_pull = which('grok-pull') or
> skip('grok-pull not available', 12);
> + my ($grok_version) = (xqx([$grok_pull, "--version"])
> + =~ /(\d+)\.(?:\d+)(?:\.(\d+))?/);
> + $grok_version >= 2 or
> + skip('grok-pull v2 or later not available', 12);
>
> ok(mkdir("$tmpdir/mirror"), 'prepare grok mirror dest');
> open $fh, '>', "$tmpdir/repos.conf" or die;
> print $fh <<"" or die;
> -# You can pull from multiple grok mirrors, just create
> -# a separate section for each mirror. The name can be anything.
> -[test]
> -site = http://$host:$port
> -manifest = http://$host:$port/manifest.js.gz
> +[core]
> toplevel = $tmpdir/mirror
> -mymanifest = $tmpdir/local-manifest.js.gz
> +manifest = $tmpdir/local-manifest.js.gz
> +[remote]
> +site = http://$host:$port
> +manifest = \${site}/manifest.js.gz
> +[pull]
> +[fsck]
>
> close $fh or die;
>
> xsys($grok_pull, '-c', "$tmpdir/repos.conf");
> - is($? >> 8, 127, 'grok-pull exit code as expected');
> + is($? >> 8, 0, 'grok-pull exit code as expected');
In particular, I'm relying on this exit code in at least one of
my scripts. Now I'll have to RTFM to figure out if I should be
testing any other exit codes or something else...
Anyways, applied and pushed as
44138460e53f90426476fa0c323fc15ef17568df for now;
but not happy this was needed.
Thanks.
next prev parent reply other threads:[~2021-02-21 22:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-21 21:46 [PATCH 0/3] t/www_listing: update for Grokmirror v2 Kyle Meyer
2021-02-21 21:46 ` [PATCH 1/3] t/www_listing: correct the number of tests for grok-pull skip Kyle Meyer
2021-02-21 22:02 ` Eric Wong
2021-02-21 21:46 ` [PATCH 2/3] t/www_listing: reword grok-pull skip message Kyle Meyer
2021-02-21 21:46 ` [PATCH 3/3] t/www_listing: require grok-pull version 2 or later Kyle Meyer
2021-02-21 22:20 ` Eric Wong [this message]
2021-02-22 14:05 ` Konstantin Ryabitsev
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: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210221222013.GA31960@dcvr \
--to=e@80x24.org \
--cc=konstantin@linuxfoundation.org \
--cc=kyle@kyleam.com \
--cc=meta@public-inbox.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 read-only IMAP folder(s) and NNTP newsgroup(s).