mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1247054 - Fix |mach reftest| on Android, r=gbrown
There is an ImportError on Android, as well as a log related regression from the structured log patch once that is fixed. MozReview-Commit-ID: KxSEotr38qO --HG-- extra : rebase_source : 15d8421aab813d9e0dbf6d00611f921aaa779a49
This commit is contained in:
parent
593e9d2dc5
commit
97c3a77bc1
@ -13,7 +13,7 @@ import subprocess
|
||||
import sys
|
||||
|
||||
from automation import Automation
|
||||
from devicemanager import DMError, DeviceManager
|
||||
from mozdevice import DMError, DeviceManager
|
||||
from mozlog import get_default_logger
|
||||
import mozcrash
|
||||
|
||||
|
@ -14,13 +14,6 @@ _HARNESS_FILES = \
|
||||
$(srcdir)/gaia_lock_screen.js \
|
||||
$(srcdir)/output.py \
|
||||
automation.py \
|
||||
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/devicemanager.py \
|
||||
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py \
|
||||
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/devicemanagerSUT.py \
|
||||
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/droid.py \
|
||||
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/version_codes.py \
|
||||
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/Zeroconf.py \
|
||||
$(topsrcdir)/testing/mozbase/moznetwork/moznetwork/moznetwork.py \
|
||||
$(topsrcdir)/build/mobile/b2gautomation.py \
|
||||
$(topsrcdir)/build/mobile/remoteautomation.py \
|
||||
$(topsrcdir)/testing/mochitest/server.js \
|
||||
|
@ -281,8 +281,6 @@ class ReftestRunner(MozbuildObject):
|
||||
imp.load_module('reftest', fh, path, ('.py', 'r', imp.PY_SOURCE))
|
||||
import reftest
|
||||
|
||||
# Remove the stdout handler from the internal logger and let mach deal with it
|
||||
runreftest.log.removeHandler(runreftest.log.handlers[0])
|
||||
self.log_manager.enable_unstructured()
|
||||
try:
|
||||
rv = reftest.run(**kwargs)
|
||||
|
@ -7,11 +7,10 @@ import os
|
||||
import time
|
||||
import tempfile
|
||||
import traceback
|
||||
import urllib2
|
||||
|
||||
import devicemanager
|
||||
import droid
|
||||
import mozdevice
|
||||
import mozinfo
|
||||
import moznetwork
|
||||
from automation import Automation
|
||||
from remoteautomation import RemoteAutomation, fennecLogcatFilters
|
||||
|
||||
@ -282,7 +281,7 @@ class RemoteReftest(RefTest):
|
||||
try:
|
||||
self._devicemanager.pushDir(profileDir, options.remoteProfile)
|
||||
self._devicemanager.chmodDir(options.remoteProfile)
|
||||
except devicemanager.DMError:
|
||||
except mozdevice.DMError:
|
||||
print "Automation Error: Failed to copy profiledir to device"
|
||||
raise
|
||||
|
||||
@ -294,7 +293,7 @@ class RemoteReftest(RefTest):
|
||||
try:
|
||||
self._devicemanager.pushDir(profileDir, options.remoteProfile)
|
||||
self._devicemanager.chmodDir(options.remoteProfile)
|
||||
except devicemanager.DMError:
|
||||
except mozdevice.DMError:
|
||||
print "Automation Error: Failed to copy extra files to device"
|
||||
raise
|
||||
|
||||
@ -313,7 +312,7 @@ class RemoteReftest(RefTest):
|
||||
else:
|
||||
print " %s: %s" % (category, devinfo[category])
|
||||
print "Test root: %s" % self._devicemanager.deviceRoot
|
||||
except devicemanager.DMError:
|
||||
except mozdevice.DMError:
|
||||
print "WARNING: Error getting device information"
|
||||
|
||||
def environment(self, **kwargs):
|
||||
@ -367,14 +366,14 @@ def runTests(options, parser):
|
||||
try:
|
||||
if (options.dm_trans == "adb"):
|
||||
if (options.deviceIP):
|
||||
dm = droid.DroidADB(options.deviceIP, options.devicePort, deviceRoot=options.remoteTestRoot)
|
||||
dm = mozdevice.DroidADB(options.deviceIP, options.devicePort, deviceRoot=options.remoteTestRoot)
|
||||
elif (options.deviceSerial):
|
||||
dm = droid.DroidADB(None, None, deviceSerial=options.deviceSerial, deviceRoot=options.remoteTestRoot)
|
||||
dm = mozdevice.DroidADB(None, None, deviceSerial=options.deviceSerial, deviceRoot=options.remoteTestRoot)
|
||||
else:
|
||||
dm = droid.DroidADB(None, None, deviceRoot=options.remoteTestRoot)
|
||||
dm = mozdevice.DroidADB(None, None, deviceRoot=options.remoteTestRoot)
|
||||
else:
|
||||
dm = droid.DroidSUT(options.deviceIP, options.devicePort, deviceRoot=options.remoteTestRoot)
|
||||
except devicemanager.DMError:
|
||||
dm = mozdevice.DroidSUT(options.deviceIP, options.devicePort, deviceRoot=options.remoteTestRoot)
|
||||
except mozdevice.DMError:
|
||||
print "Automation Error: exception while initializing devicemanager. Most likely the device is not in a testable state."
|
||||
return 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user