diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -722,6 +722,7 @@ shell is the shell to execute tests in. """ + if timeout is None: timeout = defaults['timeout'] if startport is None: @@ -2516,6 +2517,7 @@ def run(self, args, parser=None): """Run the test suite.""" + oldmask = os.umask(0o22) try: parser = parser or getparser() @@ -2542,17 +2544,19 @@ os.umask(oldmask) def _run(self, testdescs): + testdir = getcwdb() self._testdir = osenvironb[b'TESTDIR'] = getcwdb() # assume all tests in same folder for now if testdescs: pathname = os.path.dirname(testdescs[0]['path']) if pathname: - osenvironb[b'TESTDIR'] = os.path.join(osenvironb[b'TESTDIR'], - pathname) + testdir = os.path.join(testdir,pathname) + + self._testdir = osenvironb[b'TESTDIR'] = testdir if self.options.outputdir: self._outputdir = canonpath(_bytespath(self.options.outputdir)) else: - self._outputdir = self._testdir + self._outputdir = getcwdb() if testdescs and pathname: self._outputdir = os.path.join(self._outputdir, pathname) previoustimes = {} @@ -2891,6 +2895,7 @@ Returns a Test instance. The Test may not be runnable if it doesn't map to a known type. """ + path = testdesc['path'] lctest = path.lower() testcls = Test @@ -2900,7 +2905,7 @@ testcls = cls break - refpath = os.path.join(self._testdir, path) + refpath = os.path.join(getcwdb(), path) tmpdir = os.path.join(self._hgtmp, b'child%d' % count) # extra keyword parameters. 'case' is used by .t tests