Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

merged from default

changeset:   3080:84873bf419a0
parent:      3078:fdd63e8b0aa1
user:        Chris Cooper <ccooper@deadsquid.com>
date:        Thu Mar 28 12:30:27 2013 -0400
summary:     Bug 810736 - set HG_BUNDLE in ENV - r=armenzg

changeset:   3081:31ad2fea8289
user:        Armen Zambrano Gasparnian <armenzg@mozilla.com>
date:        Thu Mar 28 13:22:53 2013 -0400
summary:     Bug 854064: Jetpack jobs on the Jetpack tree need to reboot. r=coop

changeset:   3083:ecaf3e7fd7ae
parent:      3081:31ad2fea8289
user:        Ed Morley <emorley@mozilla.com>
date:        Thu Mar 28 18:04:00 2013 +0000
summary:     Bug 855697 - Correct log parsing regex for crashes; r=aki

changeset:   3084:9edbe1e77f80
tag:         tip
user:        Justin Wood <Callek@gmail.com>
date:        Thu Mar 28 17:01:59 2013 -0400
summary:     Bug 828069 - Turn on xpcshell tests for Android 2.2. r=aki

--HG--
branch : production-0.8
  • Loading branch information...
commit dc0bd10ef451607885b00117b95f418b6086aaad 2 parents c2bc573 + e763fb1
Hal Wine hwine authored
Showing with 99 additions and 33 deletions.
  1. +6 −0 misc.py
  2. +24 −0 process/factory.py
  3. +2 −2 steps/mobile.py
  4. +67 −31 steps/unittest.py
6 misc.py
View
@@ -2362,6 +2362,7 @@ def generateFuzzingObjects(config, SLAVES):
)
for platform in config['platforms']:
env = MozillaEnvironments.get("%s-unittest" % platform, {}).copy()
+ env['HG_BUNDLE'] = config['fuzzing_bundle']
env['HG_REPO'] = config['fuzzing_repo']
env['FUZZ_REMOTE_HOST'] = config['fuzzing_remote_host']
env['FUZZ_BASE_DIR'] = config['fuzzing_base_dir']
@@ -2590,6 +2591,11 @@ def generateJetpackObjects(config, SLAVES):
interpreter='python',
log_eval_func=rc_eval_func({1: WARNINGS, 2: FAILURE,
4: EXCEPTION, 5: RETRY}),
+ reboot_command=['python',
+ 'scripts/buildfarm/maintenance/count_and_reboot.py',
+ '-f', './reboot_count.txt',
+ '-n', '0',
+ '-z'],
)
builder = {'name': 'jetpack-%s-%s-%s' % (branch, platform, type),
24 process/factory.py
View
@@ -5428,6 +5428,30 @@ def addRunTestSteps(self):
log_eval_func=lambda c, s: regex_log_evaluator(c, s,
global_errors + tegra_errors),
))
+ elif name.startswith('xpcshell'):
+ totalChunks = suite.get('totalChunks', None)
+ thisChunk = suite.get('thisChunk', None)
+ extra_args = suite.get('extra_args', None)
+ # Unpack the tests
+ self.addStep(UnpackTest(
+ filename=WithProperties('../%(tests_filename)s'),
+ testtype='xpcshell',
+ workdir='build/tests',
+ haltOnFailure=True,
+ ))
+ self.addStep(unittest_steps.RemoteXPCShellStep(
+ suite=name,
+ symbols_path=symbols_path,
+ totalChunks=totalChunks,
+ thisChunk=thisChunk,
+ extra_args=extra_args,
+ workdir='build/tests',
+ timeout=2400,
+ env=self.env,
+ log_eval_func=lambda c, s: regex_log_evaluator(
+ c, s,
+ global_errors + tegra_errors),
+ ))
elif name.startswith('reftest') or name == 'crashtest':
totalChunks = suite.get('totalChunks', None)
thisChunk = suite.get('thisChunk', None)
4 steps/mobile.py
View
@@ -42,13 +42,13 @@ def createSummary(self, log):
failIdent = "TEST-UNEXPECTED-"
knownIdent = "TEST-KNOWN-FAIL"
- harnessErrorsRe = re.compile(r"TEST-UNEXPECTED-FAIL \| .* \| (Browser crashed \(minidump found\)|missing output line for total leaks!|negative leaks caught!|\d+ bytes leaked)")
+ harnessErrorsRe = re.compile(r"(TEST-UNEXPECTED-FAIL|PROCESS-CRASH) \| .* \| (application crashed|missing output line for total leaks!|negative leaks caught!|\d+ bytes leaked)")
for line in log.readlines():
m = harnessErrorsRe.match(line)
if m:
r = m.group(1)
- if r == "Browser crashed (minidump found)":
+ if r == "application crashed":
crashed = True
elif r == "missing output line for total leaks!":
leaked = None
98 steps/unittest.py
View
@@ -89,7 +89,7 @@ def summarizeLog(name, log, successIdent, failureIdent, otherIdent, infoRe):
# Reuse 'infoRe'.
infoRe = re.compile(infoRe)
# Regular expression for crash and leak detections.
- harnessErrorsRe = re.compile(r"TEST-UNEXPECTED-FAIL \| .* \| (Browser crashed \(minidump found\)|missing output line for total leaks!|negative leaks caught!|\d+ bytes leaked)")
+ harnessErrorsRe = re.compile(r"(TEST-UNEXPECTED-FAIL|PROCESS-CRASH) \| .* \| (application crashed|missing output line for total leaks!|negative leaks caught!|\d+ bytes leaked)")
# Process the log.
for line in log.readlines():
# Set the counts.
@@ -109,7 +109,7 @@ def summarizeLog(name, log, successIdent, failureIdent, otherIdent, infoRe):
m = harnessErrorsRe.match(line)
if m:
r = m.group(1)
- if r == "Browser crashed (minidump found)":
+ if r == "application crashed":
crashed = True
elif r == "missing output line for total leaks!":
leaked = None
@@ -202,7 +202,7 @@ def summarizeTUnit(name, log):
leaked = False
# Regular expression for crash and leak detections.
- harnessErrorsRe = re.compile(r"TEST-UNEXPECTED-FAIL \| .* \| (missing output line for total leaks!|negative leaks caught!|\d+ bytes leaked)")
+ harnessErrorsRe = re.compile(r"(TEST-UNEXPECTED-FAIL|PROCESS-CRASH) \| .* \| (application crashed|missing output line for total leaks!|negative leaks caught!|\d+ bytes leaked)")
# Process the log.
for line in log.readlines():
if "TEST-PASS" in line:
@@ -325,6 +325,36 @@ def evaluateCommand(self, cmd):
superResult)
+class XPCShellMixin(object):
+ warnOnFailure = True
+ warnOnWarnings = True
+
+ def createSummary(self, log):
+ self.addCompleteLog(
+ 'summary', summarizeLogXpcshelltests(self.name, log))
+
+ def evaluateCommand(self, cmd):
+ superResult = self.super_class.evaluateCommand(self, cmd)
+ # When a unittest fails we mark it orange, indicating with the
+ # WARNINGS status. Therefore, FAILURE needs to become WARNINGS
+ # However, we don't want to override EXCEPTION or RETRY, so we still
+ # need to use worst_status in further status decisions.
+ if superResult == FAILURE:
+ superResult = WARNINGS
+
+ if superResult != SUCCESS:
+ return superResult
+
+ # Assume that having the "Failed: 0" line
+ # means the tests run completed (successfully).
+ # Also check for "^TEST-UNEXPECTED-" for harness errors.
+ if not re.search(r"^INFO \| Failed: 0", cmd.logs["stdio"].getText(), re.MULTILINE) or \
+ re.search("^TEST-UNEXPECTED-", cmd.logs["stdio"].getText(), re.MULTILINE):
+ return worst_status(superResult, WARNINGS)
+
+ return worst_status(superResult, SUCCESS)
+
+
class ReftestMixin(object):
warnOnFailure = True
warnOnWarnings = True
@@ -454,9 +484,7 @@ def evaluateCommand(self, cmd):
return worst_status(superResult, SUCCESS)
-class MozillaPackagedXPCShellTests(ShellCommandReportTimeout):
- warnOnFailure = True
- warnOnWarnings = True
+class MozillaPackagedXPCShellTests(XPCShellMixin, ShellCommandReportTimeout):
name = "xpcshell"
def __init__(self, platform, symbols_path=None, **kwargs):
@@ -484,31 +512,6 @@ def __init__(self, platform, symbols_path=None, **kwargs):
self.command = ['bash', '-c', WithProperties(script)]
- def createSummary(self, log):
- self.addCompleteLog(
- 'summary', summarizeLogXpcshelltests(self.name, log))
-
- def evaluateCommand(self, cmd):
- superResult = self.super_class.evaluateCommand(self, cmd)
- # When a unittest fails we mark it orange, indicating with the
- # WARNINGS status. Therefore, FAILURE needs to become WARNINGS
- # However, we don't want to override EXCEPTION or RETRY, so we still
- # need to use worst_status in further status decisions.
- if superResult == FAILURE:
- superResult = WARNINGS
-
- if superResult != SUCCESS:
- return superResult
-
- # Assume that having the "Failed: 0" line
- # means the tests run completed (successfully).
- # Also check for "^TEST-UNEXPECTED-" for harness errors.
- if not re.search(r"^INFO \| Failed: 0", cmd.logs["stdio"].getText(), re.MULTILINE) or \
- re.search("^TEST-UNEXPECTED-", cmd.logs["stdio"].getText(), re.MULTILINE):
- return worst_status(superResult, WARNINGS)
-
- return worst_status(superResult, SUCCESS)
-
# MochitestMixin overrides some methods that BuildStep calls
# In order to make sure its are called, instead of ShellCommandReportTimeout's,
@@ -715,3 +718,36 @@ def __init__(self, suite, symbols_path=None, xrePath='../hostutils/xre',
if symbols_path:
self.command.append(
WithProperties("--symbols-path=%s" % symbols_path))
+
+
+class RemoteXPCShellStep(XPCShellMixin, ChunkingMixin, ShellCommandReportTimeout):
+ def __init__(self, suite, symbols_path=None, xrePath='../hostutils/xre',
+ totalChunks=None, thisChunk=None, cmdOptions=None, extra_args=None, **kwargs):
+ self.super_class = ShellCommandReportTimeout
+ ShellCommandReportTimeout.__init__(self, **kwargs)
+ self.addFactoryArguments(suite=suite, xrePath=xrePath,
+ symbols_path=symbols_path,
+ totalChunks=totalChunks, thisChunk=thisChunk,
+ cmdOptions=cmdOptions, extra_args=extra_args)
+
+ self.name = suite
+ if totalChunks:
+ self.name += '-%i' % thisChunk
+
+ self.command = ['python2.7', 'xpcshell/remotexpcshelltests.py',
+ '--deviceIP', WithProperties('%(sut_ip)s'),
+ '--xre-path', xrePath,
+ '--manifest', 'xpcshell/tests/xpcshell_android.ini',
+ '--build-info-json', 'xpcshell/mozinfo.json',
+ '--testing-modules-dir', 'xpcshell/tests/modules',
+ '--local-lib-dir', WithProperties('../%(exedir)s'),
+ '--apk', WithProperties('../%(build_filename)s'),
+ '--no-logfiles']
+ if extra_args:
+ self.command.append(extra_args)
+
+ self.command.extend(self.getChunkOptions(totalChunks, thisChunk))
+
+ if symbols_path:
+ self.command.append(
+ WithProperties("--symbols-path=%s" % symbols_path))
Please sign in to comment.
Something went wrong with that request. Please try again.