# HG changeset patch # User Mads Kiilerich # Date 1339347042 -7200 # Node ID 660262879b489f9f36e6810e1f04dbe7f83b2517 # Parent 15dc93f78ecd6c3f535ada48f4ca0d8f840c4163 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. [ original upstream message ] diff -r 15dc93f78ecd -r 660262879b48 tests/run-tests.py --- a/tests/run-tests.py Fri Jun 08 15:11:05 2012 +0200 +++ b/tests/run-tests.py Sun Jun 10 18:50:42 2012 +0200 @@ -659,6 +659,9 @@ 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)