Closed
Bug 1090784
Opened 11 years ago
Closed 11 years ago
Calendar xpcshell tests fail with ReferenceError: _passedChecks is not defined at .../calendar/test/unit/head_consts.js:217
Categories
(Calendar :: General, defect)
Calendar
General
Tracking
(Not tracked)
RESOLVED
FIXED
3.8
People
(Reporter: ssitter, Assigned: ssitter)
References
Details
(Keywords: intermittent-failure, regression)
Attachments
(1 file)
|
940 bytes,
patch
|
Fallen
:
review+
|
Details | Diff | Splinter Review |
https://tbpl.mozilla.org/php/getParsedLog.php?id=51287303&tree=Thunderbird-Trunk
> TEST-UNEXPECTED-FAIL | /builds/slave/test/build/tests/xpcshell/tests/calendar/test/unit/test_alarm.js | xpcshell return code: 0
> ReferenceError: _passedChecks is not defined at /builds/slave/test/build/tests/xpcshell/tests/calendar/test/unit/head_consts.js:217
When comparing <http://mxr.mozilla.org/comm-central/search?string=_passedChecks> with <http://mxr.mozilla.org/comm-aurora/search?string=_passedChecks> it is visible that _passedChecks was previously defined in mozilla/testing/xpcshell/head.js but is no longer there.
Comment 1•11 years ago
|
||
This is eventually a regression of bug 1033126, which removed _passedChecks from mozilla/testing/xpcshell/head.js
Comment 2•11 years ago
|
||
I am guessing the following diff fixes this issue, but I can't confirm it because now I can't run any xpcshell tests in calendar on my local machine.
diff --git a/calendar/test/unit/head_consts.js b/calendar/test/unit/head_consts.js
--- a/calendar/test/unit/head_consts.js
+++ b/calendar/test/unit/head_consts.js
@@ -209,19 +209,19 @@ function do_check_throws(func, result, s
{
if (!stack)
stack = Components.stack.caller;
try {
func();
} catch (exc) {
if (exc.result == result || exc == result) {
- ++_passedChecks;
- dump("TEST-PASS | " + stack.filename + " | [" + stack.name + " : " +
- stack.lineNumber + "] " + exc.result + " == " + result + "\n");
+ let msg = stack.filename + " | [" + stack.name + " : " +
+ stack.lineNumber + "] " + exc.result + " == " + result + "\n";
+ do_report_result(true, msg, stack);
return;
}
do_throw("expected result " + result + ", caught " + (exc.result || exc), stack);
}
if (result) {
do_throw("expected result " + result + ", none thrown", stack);
}
Comment 3•11 years ago
|
||
Based on the log file and the cc mxr search Stefan referenced, I assume, there's also a fix required for the two occurrences of _passedChecks in the gloda test code. This may fix the timeouts visible in the log. I haven't seen a separate bug for this, so it probably makes sense to include it here?
Comment 4•11 years ago
|
||
I think bug 1091077 will cover the _passedChecks in the gloda.
| Assignee | ||
Updated•11 years ago
|
Keywords: intermittent-failure
Updated•11 years ago
|
Keywords: regression
| Assignee | ||
Comment 5•11 years ago
|
||
Comment 6•11 years ago
|
||
Comment on attachment 8514585 [details] [diff] [review]
regression fix for xpcshell tests
Review of attachment 8514585 [details] [diff] [review]:
-----------------------------------------------------------------
Isn't there an official do_throw helper by now? Anyway r=me since this fixes it.
Attachment #8514585 -
Flags: review?(philipp) → review+
| Assignee | ||
Comment 7•11 years ago
|
||
Maybe you meant Assert.jsm (Bug 1022342)?
Pushed to https://hg.mozilla.org/comm-central/rev/5df0a26967c8
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.8
You need to log in
before you can comment on or make changes to this bug.
Description
•