tests/run-tests.py
changeset 825 908e4fe6c177
parent 824 6d3f8caef3b3
child 826 ac9b63e01e2a
--- a/tests/run-tests.py	Sat Oct 09 11:35:31 2010 +0100
+++ b/tests/run-tests.py	Sat Oct 09 12:26:56 2010 +0100
@@ -362,10 +362,11 @@
         # when they happen.
         nohome = ''
     cmd = ('%s setup.py %s clean --all'
+           ' build --build-base="%s"'
            ' install --force --prefix="%s" --install-lib="%s"'
            ' --install-scripts="%s" %s >%s 2>&1'
-           % (sys.executable, pure, INST, PYTHONDIR, BINDIR, nohome,
-              installerrs))
+           % (sys.executable, pure, os.path.join(HGTMP, "build"),
+              INST, PYTHONDIR, BINDIR, nohome, installerrs))
     vlog("# Running", cmd)
     if os.system(cmd) == 0:
         if not options.verbose:
@@ -486,6 +487,8 @@
             # non-command/result - queue up for merged output
             after.setdefault(pos, []).append(l)
 
+    if script and not script[-1].endswith('\n'):
+        script[-1] = script[-1] + '\n'
     script.append('echo %s %s $?\n' % (salt, n + 1))
 
     fd, name = tempfile.mkstemp(suffix='hg-tst')
@@ -498,6 +501,9 @@
         cmd = '/bin/sh "%s"' % name
         vlog("# Running", cmd)
         exitcode, output = run(cmd, options)
+        # do not merge output if skipped, return hghave message instead
+        if exitcode == SKIPPED_STATUS:
+            return exitcode, output
     finally:
         os.remove(name)