From f7eac309e7b2d742cb0cddd739799624b9079ed9 Mon Sep 17 00:00:00 2001 From: Mihnea Dobrescu-Balaur Date: Fri, 14 Sep 2012 16:44:29 -0700 Subject: [PATCH] Bug 791025 - Add flag to re-use xpcshell files on a device from a previous run, r=jgriffin, DONTBUILD because NPOTB --- testing/xpcshell/runtestsb2g.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/testing/xpcshell/runtestsb2g.py b/testing/xpcshell/runtestsb2g.py index 6518bbaa5cc..b8e9176f438 100644 --- a/testing/xpcshell/runtestsb2g.py +++ b/testing/xpcshell/runtestsb2g.py @@ -22,9 +22,10 @@ class B2GXPCShellRemote(XPCShellRemote): # Overridden def setupUtilities(self): - # Ensure a fresh directory structure for our tests - self.clean() - self.device.mkDir(DEVICE_TEST_ROOT) + if self.options.clean: + # Ensure a fresh directory structure for our tests + self.clean() + self.device.mkDir(DEVICE_TEST_ROOT) XPCShellRemote.setupUtilities(self) @@ -70,6 +71,12 @@ class B2GOptions(RemoteXPCShellOptions): type='string', dest='emu_path', help="Path to emulator folder (if different " "from b2gpath") + + self.add_option('--no-clean', action='store_false', + dest='clean', + help="Do not clean TESTROOT. Saves [lots of] time") + defaults['clean'] = True + defaults['emu_path'] = None self.add_option('--emulator', action='store',