Closed
Bug 1149363
Opened 10 years ago
Closed 10 years ago
For xpcshell tests instead of throwing fail the test so it is easily understood what is going on
Categories
(Toolkit :: Application Update, defect)
Tracking
()
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: robert.strong.bugs, Assigned: robert.strong.bugs)
References
Details
Attachments
(1 file, 1 obsolete file)
19.09 KB,
patch
|
robert.strong.bugs
:
review+
|
Details | Diff | Splinter Review |
It would be better to fail the test instead of calling do_throw to differentiate what is failing per bug 1148775.
![]() |
Assignee | |
Comment 1•10 years ago
|
||
I will change the rest of the do_check_* calls to Assert.* calls in bug 1149276. They provide much better info in the logs so there is less ambiguity when determining failures on treeherder.
Assignee: nobody → robert.strong.bugs
Status: NEW → ASSIGNED
Attachment #8585890 -
Flags: review?(spohl.mozilla.bugs)
![]() |
Assignee | |
Comment 2•10 years ago
|
||
Comment 3•10 years ago
|
||
Comment on attachment 8585890 [details] [diff] [review]
patch rev1
B2G seems to run into failures. Clearing r? request for now.
Attachment #8585890 -
Flags: review?(spohl.mozilla.bugs)
![]() |
Assignee | |
Comment 4•10 years ago
|
||
![]() |
Assignee | |
Comment 5•10 years ago
|
||
Comment on attachment 8585890 [details] [diff] [review]
patch rev1
Fairly certain this try run with just this patch will be fine
Attachment #8585890 -
Flags: review?(spohl.mozilla.bugs)
![]() |
Assignee | |
Comment 6•10 years ago
|
||
Try is looking good
![]() |
Assignee | |
Comment 7•10 years ago
|
||
Try passed 100%
Comment 8•10 years ago
|
||
Comment on attachment 8585890 [details] [diff] [review]
patch rev1
Review of attachment 8585890 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good! r+ with questions answered/comments addressed.
::: toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
@@ +1595,4 @@
> if (IS_AUTHENTICODE_CHECK_ENABLED && isBinarySigned(updaterBinPath)) {
> + logTestInfo("the " + updaterBinPath + " file is signed but the test " +
> + "registry key does not exist - failing the test since this " +
> + "is likely a build system without the test registry key");
Does the logTestInfo here add much value (because it's printed in a location that's more accessible maybe)? If not, could we remove the |&& isBinarySigned(updaterBinPath)| from the if condition and instead just do the |isBinarySigned(updaterBinPath)| check as part of the |Assert.ok|?
@@ +1628,5 @@
>
> if (IS_AUTHENTICODE_CHECK_ENABLED && !isBinarySigned(updaterBinPath)) {
> logTestInfo("test registry key exists but this test can only run on " +
> "builds with signed binaries when " +
> "DISABLE_UPDATER_AUTHENTICODE_CHECK is not defined");
same question here as above
@@ +1960,2 @@
> if (aFailTest) {
> + Assert.ok(false, "maintenance service should stop! Process " +
Assert.ok(!aFailTest, ...
@@ +3474,5 @@
> if (gProcess.isRunning) {
> logTestInfo("attempt to kill process");
> gProcess.kill();
> }
> + do_throw("Launch application timer expired!");
|Assert.ok(false, "Launch application timer shouldn't expire")| ?
Attachment #8585890 -
Flags: review?(spohl.mozilla.bugs) → review+
![]() |
Assignee | |
Comment 9•10 years ago
|
||
(In reply to Stephen Pohl [:spohl] from comment #8)
> Comment on attachment 8585890 [details] [diff] [review]
> patch rev1
>
> Review of attachment 8585890 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Looks good! r+ with questions answered/comments addressed.
>
> ::: toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
> @@ +1595,4 @@
> > if (IS_AUTHENTICODE_CHECK_ENABLED && isBinarySigned(updaterBinPath)) {
> > + logTestInfo("the " + updaterBinPath + " file is signed but the test " +
> > + "registry key does not exist - failing the test since this " +
> > + "is likely a build system without the test registry key");
>
> Does the logTestInfo here add much value (because it's printed in a location
> that's more accessible maybe)? If not, could we remove the |&&
> isBinarySigned(updaterBinPath)| from the if condition and instead just do
> the |isBinarySigned(updaterBinPath)| check as part of the |Assert.ok|?
Likely not and changed.
> @@ +1628,5 @@
> >
> > if (IS_AUTHENTICODE_CHECK_ENABLED && !isBinarySigned(updaterBinPath)) {
> > logTestInfo("test registry key exists but this test can only run on " +
> > "builds with signed binaries when " +
> > "DISABLE_UPDATER_AUTHENTICODE_CHECK is not defined");
>
> same question here as above
ditto
> @@ +1960,2 @@
> > if (aFailTest) {
> > + Assert.ok(false, "maintenance service should stop! Process " +
>
> Assert.ok(!aFailTest, ...
Since this ends up in the log I'd prefer only doing this when it has failed since the logs are confusing enough.
> @@ +3474,5 @@
> > if (gProcess.isRunning) {
> > logTestInfo("attempt to kill process");
> > gProcess.kill();
> > }
> > + do_throw("Launch application timer expired!");
>
> |Assert.ok(false, "Launch application timer shouldn't expire")| ?
changed
![]() |
Assignee | |
Comment 10•10 years ago
|
||
Attachment #8585890 -
Attachment is obsolete: true
Attachment #8587173 -
Flags: review+
![]() |
Assignee | |
Comment 11•10 years ago
|
||
Pushed updated patch to try
https://treeherder.mozilla.org/#/jobs?repo=try&revision=bd19c6fd20f7
![]() |
Assignee | |
Comment 12•10 years ago
|
||
Pushed to fx-team
https://hg.mozilla.org/integration/fx-team/rev/d3e90d7c8a6d
Flags: in-testsuite+
Target Milestone: --- → mozilla40
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•