From ef5d1fc6235220e221b630479a7de8bcf8adc491 Mon Sep 17 00:00:00 2001 From: Jonathan Griffin Date: Fri, 9 Sep 2011 10:50:40 -0700 Subject: [PATCH] Bug 685934 - prevent unnecessary redownloading of build between tests, a=testonly, DONTBUILD --HG-- extra : rebase_source : ad2bfa2701246fb769e238e6a60e4eb3a636fde0 --- testing/tps/tps/thread.py | 44 +++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/testing/tps/tps/thread.py b/testing/tps/tps/thread.py index 6a51ec98200..14d2f3b5816 100644 --- a/testing/tps/tps/thread.py +++ b/testing/tps/tps/thread.py @@ -69,17 +69,21 @@ class TPSTestThread(Thread): autolog=self.autolog) TPS.run_tests() + # Get the binary used by this TPS instance, and use it in subsequent + # ones, so it doesn't have to be re-downloaded each time. + binary = TPS.firefoxRunner.binary + # ... and then again in mobile mode - TPS = TPSTestRunner(self.extensionDir, - emailresults=self.emailresults, - testfile=self.testfile, - logfile=self.logfile, - binary=self.builddata['buildurl'], - config=self.config, - rlock=self.rlock, - mobile=True, - autolog=self.autolog) - TPS.run_tests() + TPS_mobile = TPSTestRunner(self.extensionDir, + emailresults=self.emailresults, + testfile=self.testfile, + logfile=self.logfile, + binary=binary, + config=self.config, + rlock=self.rlock, + mobile=True, + autolog=self.autolog) + TPS_mobile.run_tests() # ... and again via the staging server, if credentials are present stageaccount = self.config.get('stageaccount') @@ -90,13 +94,13 @@ class TPSTestThread(Thread): if username and password and passphrase: stageconfig = self.config.copy() stageconfig['account'] = stageaccount.copy() - TPS = TPSTestRunner(self.extensionDir, - emailresults=self.emailresults, - testfile=self.testfile, - logfile=self.logfile, - binary=self.builddata['buildurl'], - config=stageconfig, - rlock=self.rlock, - mobile=False, - autolog=self.autolog) - TPS.run_tests() + TPS_stage = TPSTestRunner(self.extensionDir, + emailresults=self.emailresults, + testfile=self.testfile, + logfile=self.logfile, + binary=binary, + config=stageconfig, + rlock=self.rlock, + mobile=False, + autolog=self.autolog) + TPS_stage.run_tests()