Patchwork [042,of,179,tests-refactor] run-tests: move logging of test start into Test.run()

login
register
mail settings
Submitter Gregory Szorc
Date May 2, 2014, 6:37 p.m.
Message ID <f3d000a783487cedcb60.1399055879@vm-ubuntu-main.gateway.sonic.net>
Download mbox | patch
Permalink /patch/4537/
State Accepted
Commit 79930515604f380b0dc5a832c3cdcd2f297e2afb
Headers show

Comments

Gregory Szorc - May 2, 2014, 6:37 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1397969423 25200
#      Sat Apr 19 21:50:23 2014 -0700
# Branch stable
# Node ID f3d000a783487cedcb60436074661785c4518ffb
# Parent  52c6ed588aa1279f32fd8653578d3d284ac65392
run-tests: move logging of test start into Test.run()

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -610,16 +610,18 @@  class Test(object):
 
         testtmp = os.path.join(self._threadtmp, os.path.basename(self._path))
         os.mkdir(testtmp)
         replacements, port = self._getreplacements(testtmp)
         env = self._getenv(testtmp, port)
         self._daemonpids.append(env['DAEMON_PIDS'])
         createhgrc(env['HGRCPATH'], options)
 
+        vlog('# Test', self._test)
+
         starttime = time.time()
         try:
             ret, out = self._run(testtmp, replacements, env)
             duration = time.time() - starttime
         except KeyboardInterrupt:
             duration = time.time() - starttime
             log('INTERRUPTED: %s (after %d seconds)' % (self._test, duration))
             raise
@@ -1137,18 +1139,16 @@  def runone(options, test, count):
     for ext, cls, out in testtypes:
         if lctest.endswith(ext):
             runner = cls
             ref = os.path.join(TESTDIR, test + out)
             break
     else:
         return skip("unknown test type")
 
-    vlog("# Test", test)
-
     t = runner(test, testpath, options, count, ref, err)
     result = t.run()
 
     del t # For cleanup side-effects.
 
     return result
 
 _hgpath = None