Patchwork D5535: tests: support passing testcase after .t paths that have path separators

login
register
mail settings
Submitter phabricator
Date Jan. 9, 2019, 6:06 a.m.
Message ID <d9a8ad559e9194c65772f9c590a34bb3@localhost.localdomain>
Download mbox | patch
Permalink /patch/37569/
State Not Applicable
Headers show

Comments

phabricator - Jan. 9, 2019, 6:06 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG8ddc5d8bea25: tests: support passing testcase after .t paths that have path separators (authored by spectral, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5535?vs=13087&id=13088

REVISION DETAIL
  https://phab.mercurial-scm.org/D5535

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS




To: spectral, #hg-reviewers, martinvonz
Cc: martinvonz, 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
@@ -2794,9 +2794,10 @@ 
             if not (os.path.basename(t).startswith(b'test-')
                     and (t.endswith(b'.py') or t.endswith(b'.t'))):
 
-                m = testcasepattern.match(t)
+                m = testcasepattern.match(os.path.basename(t))
                 if m is not None:
-                    t, _, casestr = m.groups()
+                    t_basename, _, casestr = m.groups()
+                    t = os.path.join(os.path.dirname(t), t_basename)
                     if casestr:
                         case = casestr.split(b'#')
                 else: