tests/run-tests.py
changeset 1097 7f458d071b49
parent 1094 467eb2068e4a
child 1126 dbcb11553a3b
--- a/tests/run-tests.py	Sun Jun 10 16:32:22 2012 +0100
+++ b/tests/run-tests.py	Mon Jun 11 13:56:02 2012 +0100
@@ -601,7 +601,7 @@
         # TODO: do something smarter when all other uses of hghave is gone
         tdir = TESTDIR.replace('\\', '/')
         proc = Popen4('%s -c "%s/hghave %s"' %
-                      (options.shell, tdir, ' '.join(reqs)), TESTDIR, 0)
+                      (options.shell, tdir, ' '.join(reqs)), wd, 0)
         proc.communicate()
         ret = proc.wait()
         if wifexited(ret):
@@ -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)