[PATCH] run-tests: set the thread name to the test name for info on error

Augie Fackler raf at durin42.com
Thu Jan 16 08:35:09 CST 2014


On Thu, Jan 16, 2014 at 11:30:19AM +0100, Simon Heimberg wrote:
> # HG changeset patch
> # User Simon Heimberg <simohe at besonet.ch>
> # Date 1389868014 -3600
> # Node ID 34a816e97e692cc547dde29fa4d95dcd7e918b3d
> # Parent  151865db7b7b9597509b2631f604f08d9a137b32
> run-tests: set the thread name to the test name for info on error

Sounds reasonable, queued.

>
> This does not happen when running normal. But when fiddling around with
> the test infrastructure, this helps a lot.
>
>   Old traceback messge
> Exception in thread Thread-7:
> Traceback (most recent call last):
> ...
>
>   new traceback message
> Exception in thread test-something.t:
> Traceback (most recent call last):
> ...
>
> diff -r 151865db7b7b -r 34a816e97e69 tests/run-tests.py
> --- a/tests/run-tests.py	Son Nov 17 15:57:52 2013 +0100
> +++ b/tests/run-tests.py	Don Jan 16 11:26:54 2014 +0100
> @@ -1108,7 +1108,7 @@
>                  test = tests.pop(0)
>                  if options.loop:
>                      tests.append(test)
> -                t = threading.Thread(target=job, args=(test, count))
> +                t = threading.Thread(target=job, name=test, args=(test, count))
>                  t.start()
>                  running += 1
>                  count += 1
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list