Patchwork D7750: run-tests: ensure the script exits when it fails to change directories

login
register
mail settings
Submitter phabricator
Date Dec. 30, 2019, 1:32 p.m.
Message ID <70fb0a2ccefd68e0e1bb05cb07685be5@localhost.localdomain>
Download mbox | patch
Permalink /patch/44125/
State Not Applicable
Headers show

Comments

phabricator - Dec. 30, 2019, 1:32 p.m.
Closed by commit rHGbd3fa45c0662: run-tests: ensure the script exits when it fails to change directories (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7750?vs=18981&id=19010

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7750/new/

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

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers, pulkit
Cc: 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
@@ -1839,7 +1839,7 @@ 
                 cmd = rawcmd.split()
                 toggletrace(rawcmd)
                 if len(cmd) == 2 and cmd[0] == b'cd':
-                    l = b'  $ cd %s || exit 1\n' % cmd[1]
+                    rawcmd = b'cd %s || exit 1\n' % cmd[1]
                 script.append(rawcmd)
             elif l.startswith(b'  > '):  # continuations
                 after.setdefault(prepos, []).append(l)