mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-15 11:13:29 +00:00
Bug 885365 - Print testroot in mochitest/reftest for fennec;r=jmaher
This commit is contained in:
parent
5ae7b08b00
commit
625e0ac037
@ -387,6 +387,16 @@ user_pref("capability.principal.codebase.p2.id", "http://%s:%s");
|
||||
def getManifestPath(self, path):
|
||||
return path
|
||||
|
||||
def printDeviceInfo(self, printLogcat=False):
|
||||
try:
|
||||
if printLogcat:
|
||||
logcat = self._devicemanager.getLogcat(filterOutRegexps=fennecLogcatFilters)
|
||||
print ''.join(logcat)
|
||||
print "Device info: %s" % self._devicemanager.getInfo()
|
||||
print "Test root: %s" % self._devicemanager.getDeviceRoot()
|
||||
except devicemanager.DMError:
|
||||
print "WARNING: Error getting device information"
|
||||
|
||||
def cleanup(self, profileDir):
|
||||
# Pull results back from device
|
||||
if self.remoteLogFile and \
|
||||
@ -474,7 +484,7 @@ def main(args):
|
||||
if (dm.processExist(procName)):
|
||||
dm.killProcess(procName)
|
||||
|
||||
print dm.getInfo()
|
||||
reftest.printDeviceInfo()
|
||||
|
||||
#an example manifest name to use on the cli
|
||||
# manifest = "http://" + options.remoteWebServer + "/reftests/layout/reftests/reftest-sanity/reftest.list"
|
||||
@ -491,12 +501,8 @@ def main(args):
|
||||
retVal = 1
|
||||
|
||||
reftest.stopWebServer(options)
|
||||
try:
|
||||
logcat = dm.getLogcat(filterOutRegexps=fennecLogcatFilters)
|
||||
print ''.join(logcat)
|
||||
print dm.getInfo()
|
||||
except devicemanager.DMError:
|
||||
print "WARNING: Error getting device information at end of test"
|
||||
|
||||
reftest.printDeviceInfo(printLogcat=True)
|
||||
|
||||
return retVal
|
||||
|
||||
|
@ -468,11 +468,13 @@ class MochiRemote(Mochitest):
|
||||
# pullFile will fail -- continue silently.
|
||||
pass
|
||||
|
||||
def printDeviceInfo(self):
|
||||
def printDeviceInfo(self, printLogcat=False):
|
||||
try:
|
||||
if printLogcat:
|
||||
logcat = self._dm.getLogcat(filterOutRegexps=fennecLogcatFilters)
|
||||
print ''.join(logcat)
|
||||
print self._dm.getInfo()
|
||||
print "Device info: %s" % self._dm.getInfo()
|
||||
print "Test root: %s" % self._dm.getDeviceRoot()
|
||||
except devicemanager.DMError:
|
||||
print "WARNING: Error getting device information"
|
||||
|
||||
@ -547,7 +549,7 @@ def main():
|
||||
auto.setRemoteLog(options.remoteLogFile)
|
||||
auto.setServerInfo(options.webServer, options.httpPort, options.sslPort)
|
||||
|
||||
print dm.getInfo()
|
||||
mochitest.printDeviceInfo()
|
||||
|
||||
procName = options.app.split('/')[-1]
|
||||
if (dm.processExist(procName)):
|
||||
@ -633,7 +635,7 @@ def main():
|
||||
print "ERROR: runTests() exited with code %s" % result
|
||||
log_result = mochitest.addLogData()
|
||||
if result != 0 or log_result != 0:
|
||||
mochitest.printDeviceInfo()
|
||||
mochitest.printDeviceInfo(printLogcat=True)
|
||||
mochitest.printScreenshot()
|
||||
# Ensure earlier failures aren't overwritten by success on this run
|
||||
if retVal is None or retVal == 0:
|
||||
@ -686,7 +688,7 @@ def main():
|
||||
pass
|
||||
retVal = 1
|
||||
|
||||
mochitest.printDeviceInfo()
|
||||
mochitest.printDeviceInfo(printLogcat=True)
|
||||
|
||||
sys.exit(retVal)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user