run-tests: ensure the script exits when it fails to change directories
authorMatt Harbison <matt_harbison@yahoo.com>
Fri, 27 Dec 2019 16:57:28 -0500
changeset 43982 bd3fa45c0662
parent 43981 414cb20e241e
child 43983 236cec445be2
run-tests: ensure the script exits when it fails to change directories Caught by PyCharm as an unused variable assignment. This regressed in c496e8c14b9e. Differential Revision: https://phab.mercurial-scm.org/D7750
tests/run-tests.py
--- a/tests/run-tests.py	Fri Dec 27 16:30:14 2019 -0500
+++ b/tests/run-tests.py	Fri Dec 27 16:57:28 2019 -0500
@@ -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)