comparison tests/run-tests.py @ 16905:671c73d523cf

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.
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 10 Jun 2012 18:50:42 +0200
parents 2774576dee4d
children 2a95830cff77
comparison
equal deleted inserted replaced
16904:9d0f988364bd 16905:671c73d523cf
657 inpython = False 657 inpython = False
658 after.setdefault(pos, []).append(l) 658 after.setdefault(pos, []).append(l)
659 prepos = pos 659 prepos = pos
660 pos = n 660 pos = n
661 addsalt(n, False) 661 addsalt(n, False)
662 cmd = l[4:].split()
663 if len(cmd) == 2 and cmd[0] == 'cd':
664 l = ' $ cd %s || exit 1\n' % cmd[1]
662 script.append(l[4:]) 665 script.append(l[4:])
663 elif l.startswith(' > '): # continuations 666 elif l.startswith(' > '): # continuations
664 after.setdefault(prepos, []).append(l) 667 after.setdefault(prepos, []).append(l)
665 script.append(l[4:]) 668 script.append(l[4:])
666 elif l.startswith(' '): # results 669 elif l.startswith(' '): # results