Patchwork [2,of,2,v2] run-tests: loadtimes+savetimes should be limited to testdir TODO

login
register
mail settings
Submitter timeless@mozdev.org
Date March 22, 2016, 5:05 a.m.
Message ID <2681e13f2b72b391ea05.1458623143@waste.org>
Download mbox | patch
Permalink /patch/14024/
State Not Applicable
Headers show

Comments

timeless@mozdev.org - March 22, 2016, 5:05 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1458599102 0
#      Mon Mar 21 22:25:02 2016 +0000
# Node ID 2681e13f2b72b391ea0516c84b17cec59c436451
# Parent  432352f451d0eb4ece052ffebdf3c18b02cc89ec
run-tests: loadtimes+savetimes should be limited to testdir TODO

This should be fixed by someone...
Yuya Nishihara - March 27, 2016, 4:08 p.m.
On Tue, 22 Mar 2016 00:05:43 -0500, timeless wrote:
> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1458599102 0
> #      Mon Mar 21 22:25:02 2016 +0000
> # Node ID 2681e13f2b72b391ea0516c84b17cec59c436451
> # Parent  432352f451d0eb4ece052ffebdf3c18b02cc89ec
> run-tests: loadtimes+savetimes should be limited to testdir TODO
> 
> This should be fixed by someone...

Looks like an unfinished patch, skipped.

> diff --git a/tests/run-tests.py b/tests/run-tests.py
> --- a/tests/run-tests.py
> +++ b/tests/run-tests.py
> @@ -1657,6 +1657,7 @@
>  # newest.
>  
>  def loadtimes(testdir):
> +    # This should only deal with times for tests in testdir
>      times = []
>      try:
>          with open(os.path.join(testdir, b'.testtimes-')) as fp:
> @@ -1669,6 +1670,7 @@
>      return times
>  
>  def savetimes(testdir, result):
> +    # This should only deal with times for tests in testdir
>      saved = dict(loadtimes(testdir))
>      maxruns = 5
>      skipped = set([str(t[0]) for t in result.skipped])
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/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
@@ -1657,6 +1657,7 @@ 
 # newest.
 
 def loadtimes(testdir):
+    # This should only deal with times for tests in testdir
     times = []
     try:
         with open(os.path.join(testdir, b'.testtimes-')) as fp:
@@ -1669,6 +1670,7 @@ 
     return times
 
 def savetimes(testdir, result):
+    # This should only deal with times for tests in testdir
     saved = dict(loadtimes(testdir))
     maxruns = 5
     skipped = set([str(t[0]) for t in result.skipped])