Bug 822875 - Fix pyflakes warnings in TPS, r=jgriffin
authorVignesh Sarma <vignesh.sarma@gmail.com>
Fri, 11 Jan 2013 13:00:16 -0800
changeset 118532 1e80bc5cbeba5c8dde9c689f654b50260f8d5f50
parent 118531 da63d4717b51ce586b0842e945ca4090737d5793
child 118533 4ffaf917d5c0bdf3890bb60c0a3ca7a50b03c333
push id24168
push usergszorc@mozilla.com
push dateSat, 12 Jan 2013 08:22:00 +0000
treeherdermozilla-central@1761f4a9081c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgriffin
bugs822875
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 822875 - Fix pyflakes warnings in TPS, r=jgriffin
testing/tps/tps/cli.py
testing/tps/tps/firefoxrunner.py
testing/tps/tps/phase.py
testing/tps/tps/testrunner.py
--- a/testing/tps/tps/cli.py
+++ b/testing/tps/tps/cli.py
@@ -1,22 +1,20 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 import json
-import logging
 import optparse
 import os
 import sys
-import time
 
 from threading import RLock
 
-from tps import TPSFirefoxRunner, TPSTestRunner
+from tps import TPSTestRunner
 
 def main():
   parser = optparse.OptionParser()
   parser.add_option("--mobile",
                     action = "store_true", dest = "mobile",
                     default = False,
                     help = "run with mobile settings")
   parser.add_option("--testfile",
--- a/testing/tps/tps/firefoxrunner.py
+++ b/testing/tps/tps/firefoxrunner.py
@@ -1,21 +1,19 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 import copy
 import httplib2
 import os
 import shutil
-import sys
 
 import mozinstall
 
-from mozprocess.pid import get_pids
 from mozprofile import Profile
 from mozrunner import FirefoxRunner
 
 class TPSFirefoxRunner(object):
 
   PROCESS_TIMEOUT = 240
 
   def __init__(self, binary):
--- a/testing/tps/tps/phase.py
+++ b/testing/tps/tps/phase.py
@@ -1,13 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-import os
 import re
 
 class TPSTestPhase(object):
 
   lineRe = re.compile(
       r"^(.*?)test phase (?P<matchphase>\d+): (?P<matchstatus>.*)$")
 
   def __init__(self, phase, profile, testname, testpath, logfile, env,
@@ -40,19 +39,19 @@ class TPSTestPhase(object):
              '-tpsphase', self.phasenum,
              '-tpslogfile', self.logfile ]
 
     if self.ignore_unused_engines:
         args.append('--ignore-unused-engines')
 
     self.log("\nlaunching Firefox for phase %s with args %s\n" %
              (self.phase, str(args)))
-    returncode = self.firefoxRunner.run(env=self.env,
-                                        args=args,
-                                        profile=self.profile)
+    self.firefoxRunner.run(env=self.env,
+                           args=args,
+                           profile=self.profile)
 
     # parse the logfile and look for results from the current test phase
     found_test = False
     f = open(self.logfile, 'r')
     for line in f:
 
       # skip to the part of the log file that deals with the test we're running
       if not found_test:
--- a/testing/tps/tps/testrunner.py
+++ b/testing/tps/tps/testrunner.py
@@ -1,25 +1,20 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-import httplib
 import json
 import os
 import platform
 import random
 import re
-import socket
 import tempfile
 import time
 import traceback
-import urllib
-
-from threading import RLock
 
 from mozprofile import Profile
 
 from tps.firefoxrunner import TPSFirefoxRunner
 from tps.phase import TPSTestPhase
 from tps.mozhttpd import MozHttpd
 
 class TempFile(object):