Patchwork [2,of,2] run-test.py: greatly increase the priority of 'check-code' tests

login
register
mail settings
Submitter Pierre-Yves David
Date May 9, 2015, 9:25 p.m.
Message ID <84f5cc3f45ff61976feb.1431206721@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/8999/
State Accepted
Headers show

Comments

Pierre-Yves David - May 9, 2015, 9:25 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1431122407 25200
#      Fri May 08 15:00:07 2015 -0700
# Node ID 84f5cc3f45ff61976febe3f7e655b9c65065e3c8
# Parent  48e50507613c2431153722786b539b5d6e488dad
run-test.py: greatly increase the priority of 'check-code' tests

As check-code is actually quite long to run for its file size, this prevent them
to be scheduled too late during the test run.

This reduces my typical test run from 107 seconds to 90 seconds
Augie Fackler - May 12, 2015, 5:50 p.m.
On Sat, May 09, 2015 at 02:25:21PM -0700, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@fb.com>
> # Date 1431122407 25200
> #      Fri May 08 15:00:07 2015 -0700
> # Node ID 84f5cc3f45ff61976febe3f7e655b9c65065e3c8
> # Parent  48e50507613c2431153722786b539b5d6e488dad
> run-test.py: greatly increase the priority of 'check-code' tests

I've queued these, thanks.

>
> As check-code is actually quite long to run for its file size, this prevent them
> to be scheduled too late during the test run.
>
> This reduces my typical test run from 107 seconds to 90 seconds
>
> diff --git a/tests/run-tests.py b/tests/run-tests.py
> --- a/tests/run-tests.py
> +++ b/tests/run-tests.py
> @@ -1623,11 +1623,11 @@ class TestRunner(object):
>              random.shuffle(tests)
>          else:
>              # keywords for slow tests
>              slow = {'svn': 10,
>                      'gendoc': 10,
> -                    'check-code-hg': 10,
> +                    'check-code-hg': 100,
>                     }
>              def sortkey(f):
>                  # run largest tests first, as they tend to take the longest
>                  try:
>                      val = -os.stat(f).st_size
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1623,11 +1623,11 @@  class TestRunner(object):
             random.shuffle(tests)
         else:
             # keywords for slow tests
             slow = {'svn': 10,
                     'gendoc': 10,
-                    'check-code-hg': 10,
+                    'check-code-hg': 100,
                    }
             def sortkey(f):
                 # run largest tests first, as they tend to take the longest
                 try:
                     val = -os.stat(f).st_size