[PATCH] run-tests: report paths saved by --keep-tmpdir

timeless at mozdev.org timeless at mozdev.org
Wed Sep 30 20:07:06 UTC 2015


# HG changeset patch
# User timeless at mozdev.org
# Date 1443643279 14400
#      Wed Sep 30 16:01:19 2015 -0400
# Node ID ffb9c92be4f32a2d51ec767853dc7c7653bd4d0e
# Parent  46af0adb5c375cc51ce0d29cbdcd8ba843a33425
run-tests: report paths saved by --keep-tmpdir

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -665,7 +665,10 @@
             killdaemons(entry)
         self._daemonpids = []
 
-        if not self._keeptmpdir:
+        if self._keeptmpdir:
+            log('\nKeeping testtmp dir: %s\nKeeping threadtmp dir: %s' %
+                (self._testtmp, self._threadtmp))
+        else:
             shutil.rmtree(self._testtmp, True)
             shutil.rmtree(self._threadtmp, True)
 
diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t
--- a/tests/test-run-tests.t
+++ b/tests/test-run-tests.t
@@ -393,6 +393,14 @@
   python hash seed: * (glob)
   [1]
 
+test --tmpdir support
+  $ run-tests.py --with-hg=`which hg` --tmpdir=$TESTTMP/keep test-success.t
+  
+  Keeping testtmp dir: $TESTTMP/keep/child1/test-success.t
+  Keeping threadtmp dir: $TESTTMP/keep/child1 
+  .
+  # Ran 1 tests, 0 skipped, 0 warned, 0 failed.
+
 test for --time
 ==================
 


More information about the Mercurial-devel mailing list