[PATCH] run-tests: allow hg executable to be hg.exe

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] run-tests: allow hg executable to be hg.exe

Kostia Balytskyi-2
# HG changeset patch
# User Kostia Balytskyi <[hidden email]>
# Date 1495050700 25200
#      Wed May 17 12:51:40 2017 -0700
# Node ID fc5ad0312330350a1f03ab036530935764592334
# Parent  2d19664e257da7ad5cb97150d81838c25872fac7
run-tests: allow hg executable to be hg.exe

When running tests on Windows (via msys), user sometimes does not want to run
them against source hg, but against compiled hg.exe. For that purpose,
--with-hg option can be used, but currently run-tests.py prints a warning if
the value of this argument is not a file with basename 'hg'. This patch allows
such file to be 'hg.exe'.

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -341,7 +341,7 @@ def parseargs(args, parser):
         if not (os.path.isfile(options.with_hg) and
                 os.access(options.with_hg, os.X_OK)):
             parser.error('--with-hg must specify an executable hg script')
-        if not os.path.basename(options.with_hg) == b'hg':
+        if os.path.basename(options.with_hg) not in [b'hg', b'hg.exe']:
             sys.stderr.write('warning: --with-hg should specify an hg script\n')
     if options.local:
         testdir = os.path.dirname(_bytespath(canonpath(sys.argv[0])))
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] run-tests: allow hg executable to be hg.exe

Sean Farley-3
Kostia Balytskyi <[hidden email]> writes:

> # HG changeset patch
> # User Kostia Balytskyi <[hidden email]>
> # Date 1495050700 25200
> #      Wed May 17 12:51:40 2017 -0700
> # Node ID fc5ad0312330350a1f03ab036530935764592334
> # Parent  2d19664e257da7ad5cb97150d81838c25872fac7
> run-tests: allow hg executable to be hg.exe
>
> When running tests on Windows (via msys), user sometimes does not want to run
> them against source hg, but against compiled hg.exe. For that purpose,
> --with-hg option can be used, but currently run-tests.py prints a warning if
> the value of this argument is not a file with basename 'hg'. This patch allows
> such file to be 'hg.exe'.
A quick "looks good to me" (about to head out and I'd rather not rush
bungling running the tests)

_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

signature.asc (815 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] run-tests: allow hg executable to be hg.exe

Augie Fackler-2
On Wed, May 17, 2017 at 04:07:02PM -0500, Sean Farley wrote:

> Kostia Balytskyi <[hidden email]> writes:
>
> > # HG changeset patch
> > # User Kostia Balytskyi <[hidden email]>
> > # Date 1495050700 25200
> > #      Wed May 17 12:51:40 2017 -0700
> > # Node ID fc5ad0312330350a1f03ab036530935764592334
> > # Parent  2d19664e257da7ad5cb97150d81838c25872fac7
> > run-tests: allow hg executable to be hg.exe
> >
> > When running tests on Windows (via msys), user sometimes does not want to run
> > them against source hg, but against compiled hg.exe. For that purpose,
> > --with-hg option can be used, but currently run-tests.py prints a warning if
> > the value of this argument is not a file with basename 'hg'. This patch allows
> > such file to be 'hg.exe'.
>
> A quick "looks good to me" (about to head out and I'd rather not rush
> bungling running the tests)

also looks fine to me, queued


> _______________________________________________
> Mercurial-devel mailing list
> [hidden email]
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel