[PATCH 5 of 5] py3: quote several instances of $PYTHON for Windows

Yuya Nishihara yuya at tcha.org
Wed Dec 12 06:51:51 EST 2018


On Tue, 11 Dec 2018 23:19:45 -0500, Matt Harbison wrote:
> On Mon, 10 Dec 2018 06:49:11 -0500, Yuya Nishihara <yuya at tcha.org> wrote:
> 
> > On Sun, 09 Dec 2018 22:44:37 -0500, Matt Harbison wrote:
> >> # HG changeset patch
> >> # User Matt Harbison <matt_harbison at yahoo.com>
> >> # Date 1544408614 18000
> >> #      Sun Dec 09 21:23:34 2018 -0500
> >> # Node ID 4b007df3bff23f32439e299d13ce1a808b857c4d
> >> # Parent  e5b7d60068537baa1ffeeca4e1a81f7498d0d48e
> >> py3: quote several instances of $PYTHON for Windows
> >
> > Queued, thanks.
> 
> Any idea how to handle test-hghave.t?  Here are 3 failed attempts:
> 
> $ hg diff
> diff -r 008f3491dc53 tests/test-hghave.t
> --- a/tests/test-hghave.t       Mon Dec 10 20:01:07 2018 +0000
> +++ b/tests/test-hghave.t       Tue Dec 11 23:12:11 2018 -0500
> @@ -20,12 +20,16 @@
>     >   $ echo foo
>     >   foo
>     > EOF
> -  $ ( \
> -  > testrepohgenv; \
> -  > "$PYTHON" $TESTDIR/run-tests.py -j 1 \
> -  >    $HGTEST_RUN_TESTS_PURE test-hghaveaddon.t \
> -  > )

No idea why this doesn't work.

> +  $ cat > addontest.sh <<EOF
> +  > #!/bin/sh
> +  >
> +  > . "$TESTDIR/helpers-testrepo.sh"
> +  > testrepohgenv;
> +  > '"$PYTHON"' "$TESTDIR/run-tests.py" -j 1 \
> +  >    $HGTEST_RUN_TESTS_PURE test-hghaveaddon.t
> +  > EOF

Use <<'EOF' to not expand variables while writing to addontest.sh.


More information about the Mercurial-devel mailing list