##// END OF EJS Templates
run-tests: allow to specify executable of any name by --with-hg...
Yuya Nishihara -
r28099:a5f0c0aa default
parent child Browse files
Show More
@@ -444,7 +444,7 b' class Test(unittest.TestCase):'
444 debug=False,
444 debug=False,
445 timeout=defaults['timeout'],
445 timeout=defaults['timeout'],
446 startport=defaults['port'], extraconfigopts=None,
446 startport=defaults['port'], extraconfigopts=None,
447 py3kwarnings=False, shell=None,
447 py3kwarnings=False, shell=None, hgcommand=None,
448 slowtimeout=defaults['slowtimeout']):
448 slowtimeout=defaults['slowtimeout']):
449 """Create a test from parameters.
449 """Create a test from parameters.
450
450
@@ -491,6 +491,7 b' class Test(unittest.TestCase):'
491 self._extraconfigopts = extraconfigopts or []
491 self._extraconfigopts = extraconfigopts or []
492 self._py3kwarnings = py3kwarnings
492 self._py3kwarnings = py3kwarnings
493 self._shell = _bytespath(shell)
493 self._shell = _bytespath(shell)
494 self._hgcommand = hgcommand or b'hg'
494
495
495 self._aborted = False
496 self._aborted = False
496 self._daemonpids = []
497 self._daemonpids = []
@@ -989,6 +990,8 b' class TTest(Test):'
989
990
990 if self._debug:
991 if self._debug:
991 script.append(b'set -x\n')
992 script.append(b'set -x\n')
993 if self._hgcommand != b'hg':
994 script.append(b'alias hg="%s"\n' % self._hgcommand)
992 if os.getenv('MSYSTEM'):
995 if os.getenv('MSYSTEM'):
993 script.append(b'alias pwd="pwd -W"\n')
996 script.append(b'alias pwd="pwd -W"\n')
994
997
@@ -1817,6 +1820,7 b' class TestRunner(object):'
1817 self._pythondir = None
1820 self._pythondir = None
1818 self._coveragefile = None
1821 self._coveragefile = None
1819 self._createdfiles = []
1822 self._createdfiles = []
1823 self._hgcommand = None
1820 self._hgpath = None
1824 self._hgpath = None
1821 self._portoffset = 0
1825 self._portoffset = 0
1822 self._ports = {}
1826 self._ports = {}
@@ -1925,6 +1929,7 b' class TestRunner(object):'
1925 whg = self.options.with_hg
1929 whg = self.options.with_hg
1926 self._bindir = os.path.dirname(os.path.realpath(whg))
1930 self._bindir = os.path.dirname(os.path.realpath(whg))
1927 assert isinstance(self._bindir, bytes)
1931 assert isinstance(self._bindir, bytes)
1932 self._hgcommand = os.path.basename(whg)
1928 self._tmpbindir = os.path.join(self._hgtmp, b'install', b'bin')
1933 self._tmpbindir = os.path.join(self._hgtmp, b'install', b'bin')
1929 os.makedirs(self._tmpbindir)
1934 os.makedirs(self._tmpbindir)
1930
1935
@@ -1937,6 +1942,7 b' class TestRunner(object):'
1937 else:
1942 else:
1938 self._installdir = os.path.join(self._hgtmp, b"install")
1943 self._installdir = os.path.join(self._hgtmp, b"install")
1939 self._bindir = os.path.join(self._installdir, b"bin")
1944 self._bindir = os.path.join(self._installdir, b"bin")
1945 self._hgcommand = b'hg'
1940 self._tmpbindir = self._bindir
1946 self._tmpbindir = self._bindir
1941 self._pythondir = os.path.join(self._installdir, b"lib", b"python")
1947 self._pythondir = os.path.join(self._installdir, b"lib", b"python")
1942
1948
@@ -2117,7 +2123,8 b' class TestRunner(object):'
2117 startport=self._getport(count),
2123 startport=self._getport(count),
2118 extraconfigopts=self.options.extra_config_opt,
2124 extraconfigopts=self.options.extra_config_opt,
2119 py3kwarnings=self.options.py3k_warnings,
2125 py3kwarnings=self.options.py3k_warnings,
2120 shell=self.options.shell)
2126 shell=self.options.shell,
2127 hgcommand=self._hgcommand)
2121 t.should_reload = True
2128 t.should_reload = True
2122 return t
2129 return t
2123
2130
General Comments 0
You need to be logged in to leave comments. Login now