Patchwork run-tests: report paths saved by --keep-tmpdir

login
register
mail settings
Submitter timeless@mozdev.org
Date Sept. 30, 2015, 8:07 p.m.
Message ID <ffb9c92be4f32a2d51ec.1443643626@waste.org>
Download mbox | patch
Permalink /patch/10708/
State Accepted
Commit 41436beaf463e6e04df56b97965b9c9e35f28099
Headers show

Comments

timeless@mozdev.org - Sept. 30, 2015, 8:07 p.m.
# HG changeset patch
# User timeless@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

Patch

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
 ==================