[PATCH] run-tests.py: force test-import-modules.t to run in the beginning

Martin von Zweigbergk martinvonz at google.com
Fri Mar 27 15:56:00 CDT 2015


On Fri, Mar 27, 2015 at 1:53 PM Siddharth Agarwal <sid0 at fb.com> wrote:

> # HG changeset patch
> # User Siddharth Agarwal <sid0 at fb.com>
> # Date 1427489465 25200
> #      Fri Mar 27 13:51:05 2015 -0700
> # Node ID bc4b5976a2474029a8fe1133b5666e811a1de2ee
> # Parent  d9674bec56ff82499822987f6fa79286b434038e
> run-tests.py: force test-import-modules.t to run in the beginning
>
> This is a short file that takes a very long time to run. The scaling
> factor of
> 10 wasn't enough to make it run towards the beginning, so increase it to
> 100.
>

Why not 1e9?


>
> On a 16-core, 32-thread machine, ./run-tests.py -j32 went down from 2:30 to
> 1:48.
>
> diff --git a/tests/run-tests.py b/tests/run-tests.py
> --- a/tests/run-tests.py
> +++ b/tests/run-tests.py
> @@ -1592,7 +1592,7 @@
>              random.shuffle(tests)
>          else:
>              # keywords for slow tests
> -            slow = 'svn gendoc check-code-hg'.split()
> +            slow = 'svn gendoc check-code-hg test-module-imports'.split()
>              def sortkey(f):
>                  # run largest tests first, as they tend to take the
> longest
>                  try:
> @@ -1603,7 +1603,7 @@
>                      return -1e9 # file does not exist, tell early
>                  for kw in slow:
>                      if kw in f:
> -                        val *= 10
> +                        val *= 100
>                  return val
>              tests.sort(key=sortkey)
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20150327/88b74dbf/attachment.html>


More information about the Mercurial-devel mailing list