[PATCH] test: remove dependency on $PYTHONDIR

timeless timeless at gmail.com
Wed Feb 17 19:24:22 EST 2016


So, I intentionally added PYTHONDIR to try to reduce the number of
globs floating around.

Does this apply to everywhere that you might do this?

I have some plans to try to improve the diff munging, but basically
each time something changes and there's a glob, the user is forced to
deal w/ it.

I'd really rather some other approach than what you're doing here...

Could we introduce a different variable/allow run-tests to know about yours?

On Wed, Feb 17, 2016 at 6:18 PM, Durham Goode <durham at fb.com> wrote:
> # HG changeset patch
> # User Durham Goode <durham at fb.com>
> # Date 1455750820 28800
> #      Wed Feb 17 15:13:40 2016 -0800
> # Node ID 5cef3483a31ecd1f18083fc8da3a7fbcd4a22b5b
> # Parent  4f99a5826e88fa6b4305336556cc939ca2cdaff1
> test: remove dependency on $PYTHONDIR
>
> The PYTHONDIR used in the test may not match the one set in the environment, so
> let's remove this depdency and replace it with a glob.
>
> Our internal test automation caught this, since we muck with the PYTHONPATH to
> allow testing many of our non-installed extensions together.
>
> diff --git a/tests/test-devel-warnings.t b/tests/test-devel-warnings.t
> --- a/tests/test-devel-warnings.t
> +++ b/tests/test-devel-warnings.t
> @@ -83,27 +83,27 @@
>    $ hg buggylocking --traceback
>    devel-warn: transaction with no lock at:
>     */hg:* in * (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in run (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in dispatch (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in _runcatch (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in _dispatch (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in runcommand (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in _runcommand (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in checkargs (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in <lambda> (glob)
> -   $PYTHONDIR/mercurial/util.py:* in check (glob)
> +   */mercurial/dispatch.py:* in run (glob)
> +   */mercurial/dispatch.py:* in dispatch (glob)
> +   */mercurial/dispatch.py:* in _runcatch (glob)
> +   */mercurial/dispatch.py:* in _dispatch (glob)
> +   */mercurial/dispatch.py:* in runcommand (glob)
> +   */mercurial/dispatch.py:* in _runcommand (glob)
> +   */mercurial/dispatch.py:* in checkargs (glob)
> +   */mercurial/dispatch.py:* in <lambda> (glob)
> +   */mercurial/util.py:* in check (glob)
>     $TESTTMP/buggylocking.py:* in buggylocking (glob)
>    devel-warn: "wlock" acquired after "lock" at:
>     */hg:* in * (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in run (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in dispatch (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in _runcatch (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in _dispatch (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in runcommand (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in _runcommand (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in checkargs (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in <lambda> (glob)
> -   $PYTHONDIR/mercurial/util.py:* in check (glob)
> +   */mercurial/dispatch.py:* in run (glob)
> +   */mercurial/dispatch.py:* in dispatch (glob)
> +   */mercurial/dispatch.py:* in _runcatch (glob)
> +   */mercurial/dispatch.py:* in _dispatch (glob)
> +   */mercurial/dispatch.py:* in runcommand (glob)
> +   */mercurial/dispatch.py:* in _runcommand (glob)
> +   */mercurial/dispatch.py:* in checkargs (glob)
> +   */mercurial/dispatch.py:* in <lambda> (glob)
> +   */mercurial/util.py:* in check (glob)
>     $TESTTMP/buggylocking.py:* in buggylocking (glob)
>    $ hg properlocking
>    $ hg nowaitlocking
> @@ -118,7 +118,7 @@
>    [255]
>
>    $ hg log -r "oldstyle()" -T '{rev}\n'
> -  devel-warn: revset "oldstyle" use list instead of smartset, (upgrade your code) at: $PYTHONDIR/mercurial/revset.py:* (mfunc) (glob)
> +  devel-warn: revset "oldstyle" use list instead of smartset, (upgrade your code) at: */mercurial/revset.py:* (mfunc) (glob)
>    0
>    $ hg oldanddeprecated
>    devel-warn: foorbar is deprecated, go shopping
> @@ -128,14 +128,14 @@
>    devel-warn: foorbar is deprecated, go shopping
>    (compatibility will be dropped after Mercurial-42.1337, update your code.) at:
>     */hg:* in <module> (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in run (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in dispatch (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in _runcatch (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in _dispatch (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in runcommand (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in _runcommand (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in checkargs (glob)
> -   $PYTHONDIR/mercurial/dispatch.py:* in <lambda> (glob)
> -   $PYTHONDIR/mercurial/util.py:* in check (glob)
> +   */mercurial/dispatch.py:* in run (glob)
> +   */mercurial/dispatch.py:* in dispatch (glob)
> +   */mercurial/dispatch.py:* in _runcatch (glob)
> +   */mercurial/dispatch.py:* in _dispatch (glob)
> +   */mercurial/dispatch.py:* in runcommand (glob)
> +   */mercurial/dispatch.py:* in _runcommand (glob)
> +   */mercurial/dispatch.py:* in checkargs (glob)
> +   */mercurial/dispatch.py:* in <lambda> (glob)
> +   */mercurial/util.py:* in check (glob)
>     $TESTTMP/buggylocking.py:* in oldanddeprecated (glob)
>    $ cd ..
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list