run-tests: move createhgrc() call into Test.run()
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 19 Apr 2014 13:11:49 -0700
changeset 21300 a2774731a51a
parent 21299 7861de61583b
child 21301 a77f4c2e1898
run-tests: move createhgrc() call into Test.run() createhgrc() is an implementation detail of how tests are run. It makes sense to move it into Test.run(). Note that this will cause the test execution time to include the creation of hgrc. The author does not believe this is a significant change worth worrying about.
tests/run-tests.py
--- a/tests/run-tests.py	Sat Apr 19 13:07:05 2014 -0700
+++ b/tests/run-tests.py	Sat Apr 19 13:11:49 2014 -0700
@@ -556,6 +556,8 @@
         os.mkdir(self.testtmp)
 
     def run(self, replacements, env):
+        createhgrc(env['HGRCPATH'], self._options)
+
         return self._run(replacements, env)
 
     def _run(self, replacements, env):
@@ -1020,7 +1022,6 @@
     t = runner(testpath, options, threadtmp)
     replacements, port = t.getreplacements(count)
     env = t.getenv(port)
-    createhgrc(env['HGRCPATH'], options)
 
     starttime = time.time()
     try: