Allow for the registration of cleanup functions that run when the harness is done

RESOLVED FIXED in mozilla1.9.2a1

Status

Testing
XPCShell Harness
--
enhancement
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: sdwilsh, Assigned: sdwilsh)

Tracking

({fixed1.9.1})

Trunk
mozilla1.9.2a1
fixed1.9.1
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed1.9.1.6])

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
Allow for the registration of cleanup functions that run when the harness is done so we can clean up at a sane time.
(Assignee)

Comment 1

8 years ago
Created attachment 387255 [details] [diff] [review]
v1.0
Attachment #387255 - Flags: review?(ted.mielczarek)
(Assignee)

Updated

8 years ago
Whiteboard: [needs review ted]
(Assignee)

Updated

8 years ago
Blocks: 502909
Comment on attachment 387255 [details] [diff] [review]
v1.0

I know I told you I wanted this patch, but at the same time, looking at the code, it appears that the harness doesn't load the tail files until after all the tests are finished. (Note that your code is added right below that _load_files call!)

I think the tail files should work for what you need, instead.

(Otherwise, technically, the patch looks fine.)
Attachment #387255 - Flags: review?(ted.mielczarek) → review-
Tail files used to be immediately loaded as if at the end of the command line, that changed recently.  That said, I think I prefer this explicit finalization registration API to tail_*.js, and I probably would be in favor of removing the latter completely.  We could share the functions in head_*.js, which feels sufficient to me.
Comment on attachment 387255 [details] [diff] [review]
v1.0

No wonder I was confused. I must not have actually looked at Serge's patch there. After thinking about it, I agree with Jeff. Shawn: can you file a followup on migrating existing tail_*.js users to this API?
Attachment #387255 - Flags: review- → review+
(Assignee)

Updated

8 years ago
Whiteboard: [needs review ted]
(Assignee)

Updated

8 years ago
Blocks: 503613
(Assignee)

Comment 5

8 years ago
http://hg.mozilla.org/mozilla-central/rev/c7a952a3bb78

Filed bug 503613 for removing tail_ file usage.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
(Assignee)

Updated

8 years ago
Target Milestone: --- → mozilla1.9.2a1
Severity: normal → enhancement
Flags: in-testsuite?
Whiteboard: [needs 1.9.1.x landing]
Blocks: 503662
since i was in need of this
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/90f2a65e77ef
Keywords: fixed1.9.1
Whiteboard: [needs 1.9.1.x landing]
Whiteboard: [fixed1.9.1.6]
Blocks: 527444
You need to log in before you can comment on or make changes to this bug.