Backed out changeset ec61b7a902c2 (bug 1397855) for XPCshell bustage, at least on Android. r=backout on a CLOSED TREE
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 12 Sep 2017 21:42:12 +0200
changeset 429920 6cffef0e5ab98481df8e43647c4dd4b1372c17bd
parent 429919 5951cc2057a14fb414194127feeb3d82afda9205
child 429921 04720d1e6c022478a58750fed54e6188bda6a0da
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1397855
milestone57.0a1
backs outec61b7a902c2b09a1e7cf6ef9c7eeb46f658368c
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
Backed out changeset ec61b7a902c2 (bug 1397855) for XPCshell bustage, at least on Android. r=backout on a CLOSED TREE
testing/xpcshell/mach_test_package_commands.py
testing/xpcshell/remotexpcshelltests.py
testing/xpcshell/runxpcshelltests.py
testing/xpcshell/selftest.py
testing/xpcshell/xpcshellcommandline.py
tools/lint/py2.yml
--- a/testing/xpcshell/mach_test_package_commands.py
+++ b/testing/xpcshell/mach_test_package_commands.py
@@ -1,13 +1,13 @@
 # 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/.
 
-from __future__ import absolute_import, unicode_literals
+from __future__ import unicode_literals
 
 import os
 import sys
 from argparse import Namespace
 from functools import partial
 
 
 import mozlog
--- a/testing/xpcshell/remotexpcshelltests.py
+++ b/testing/xpcshell/remotexpcshelltests.py
@@ -1,16 +1,14 @@
 #!/usr/bin/env python
 #
 # 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/.
 
-from __future__ import absolute_import, print_function
-
 import logging
 import posixpath
 import sys, os
 import subprocess
 import runxpcshelltests as xpcshell
 import tempfile
 import time
 from argparse import Namespace
@@ -165,17 +163,17 @@ class RemoteXPCShellTestThread(xpcshell.
     def checkForCrashes(self,
                         dump_directory,
                         symbols_path,
                         test_name=None):
         if not self.device.dirExists(self.remoteMinidumpDir):
             # The minidumps directory is automatically created when Fennec
             # (first) starts, so its lack of presence is a hint that
             # something went wrong.
-            print("Automation Error: No crash directory (%s) found on remote device" % self.remoteMinidumpDir)
+            print "Automation Error: No crash directory (%s) found on remote device" % self.remoteMinidumpDir
             # Whilst no crash was found, the run should still display as a failure
             return True
         with mozfile.TemporaryDirectory() as dumpDir:
             self.device.getDirectory(self.remoteMinidumpDir, dumpDir)
             crashed = xpcshell.XPCShellTestThread.checkForCrashes(self, dumpDir, symbols_path, test_name)
             self.clearRemoteDir(self.remoteMinidumpDir)
         return crashed
 
@@ -372,17 +370,17 @@ class XPCShellRemote(xpcshell.XPCShellTe
         self.appRoot = None
         packageName = None
         if self.options['localAPK']:
             try:
                 packageName = self.localAPKContents.read("package-name.txt")
                 if packageName:
                     self.appRoot = self.device.getAppRoot(packageName.strip())
             except Exception as detail:
-                print("unable to determine app root: " + str(detail))
+                print "unable to determine app root: " + str(detail)
                 pass
         return None
 
     def setupUtilities(self):
         if (not self.device.dirExists(self.remoteBinDir)):
             # device.mkDir may fail here where shellCheckOutput may succeed -- see bug 817235
             try:
                 self.device.shellCheckOutput(["mkdir", self.remoteBinDir]);
@@ -491,17 +489,17 @@ class XPCShellRemote(xpcshell.XPCShellTe
 
         return pushed_libs_count
 
     def setupModules(self):
         if self.testingModulesDir:
             self.device.pushDir(self.testingModulesDir, self.remoteModulesDir)
 
     def setupTestDir(self):
-        print('pushing %s' % self.xpcDir)
+        print 'pushing %s' % self.xpcDir
         try:
             # The tests directory can be quite large: 5000 files and growing!
             # Sometimes - like on a low-end aws instance running an emulator - the push
             # may exceed the default 5 minute timeout, so we increase it here to 10 minutes.
             self.device.pushDir(self.xpcDir, self.remoteScriptsDir, timeout=600, retryLimit=10)
         except TypeError:
             # Foopies have an older mozdevice ver without retryLimit
             self.device.pushDir(self.xpcDir, self.remoteScriptsDir)
--- a/testing/xpcshell/runxpcshelltests.py
+++ b/testing/xpcshell/runxpcshelltests.py
@@ -1,16 +1,14 @@
 #!/usr/bin/env python
 #
 # 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/.
 
-from __future__ import absolute_import, print_function
-
 import copy
 import importlib
 import json
 import math
 import mozdebug
 import mozinfo
 import os
 import random
@@ -1065,17 +1063,17 @@ class XPCShellTests(object):
 
                 # Check to make sure the server starts properly by waiting for it to
                 # tell us it's started
                 msg = process.stdout.readline()
                 if 'server listening' in msg:
                     searchObj = re.search( r'HTTP2 server listening on port (.*)', msg, 0)
                     if searchObj:
                       self.env["MOZHTTP2_PORT"] = searchObj.group(1)
-            except OSError as e:
+            except OSError, e:
                 # This occurs if the subprocess couldn't be started
                 self.log.error('Could not run %s server: %s' % (name, str(e)))
                 raise
 
         myDir = os.path.split(os.path.abspath(__file__))[0]
         startServer('moz-http2', os.path.join(myDir, 'moz-http2', 'moz-http2.js'))
 
     def shutdownNode(self):
--- a/testing/xpcshell/selftest.py
+++ b/testing/xpcshell/selftest.py
@@ -1,16 +1,14 @@
 #!/usr/bin/env python
 #
 # Any copyright is dedicated to the Public Domain.
 # http://creativecommons.org/publicdomain/zero/1.0/
 #
 
-from __future__ import absolute_import
-
 import mozinfo
 import mozunit
 import os
 import pprint
 import re
 import shutil
 import sys
 import tempfile
@@ -1081,17 +1079,17 @@ add_test({
         self.writeFile("test_basic.js", SIMPLE_PASSING_TEST)
         self.writeManifest([("test_basic.js", "head = missing.js")])
 
         raised = False
 
         try:
             # The actual return value is never checked because we raise.
             self.assertTestResult(True)
-        except Exception as ex:
+        except Exception, ex:
             raised = True
             self.assertEquals(ex.message[0:9], "head file")
 
         self.assertTrue(raised)
 
     def testRandomExecution(self):
         """
         Check that random execution doesn't break.
--- a/testing/xpcshell/xpcshellcommandline.py
+++ b/testing/xpcshell/xpcshellcommandline.py
@@ -1,10 +1,8 @@
-from __future__ import absolute_import
-
 import argparse
 
 from mozlog import commandline
 
 
 def add_common_arguments(parser):
     parser.add_argument("--app-path",
                         type=unicode, dest="appPath", default=None,
--- a/tools/lint/py2.yml
+++ b/tools/lint/py2.yml
@@ -46,16 +46,17 @@ py2:
         - testing/mozbase
         - testing/mozharness
         - testing/remotecppunittests.py
         - testing/runcppunittests.py
         - testing/runtimes
         - testing/tools
         - testing/tps
         - testing/web-platform
+        - testing/xpcshell
         - third_party
         - toolkit
         - tools/docs
         - tools/git/eslintvalidate.py
         - tools/jprof/split-profile.py
         - tools/lint
         - tools/mach_commands.py
         - tools/mercurial/eslintvalidate.py