mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
tests: make .t tests stop immediately if a cd fails
This prevents tests from escaping from TESTTMP as a consequence of a failing directory creation.
This commit is contained in:
parent
c425afcd4c
commit
cb3472a4d3
@ -659,6 +659,9 @@ def tsttest(test, wd, options, replacements):
|
||||
prepos = pos
|
||||
pos = n
|
||||
addsalt(n, False)
|
||||
cmd = l[4:].split()
|
||||
if len(cmd) == 2 and cmd[0] == 'cd':
|
||||
l = ' $ cd %s || exit 1\n' % cmd[1]
|
||||
script.append(l[4:])
|
||||
elif l.startswith(' > '): # continuations
|
||||
after.setdefault(prepos, []).append(l)
|
||||
|
Loading…
Reference in New Issue
Block a user