Closed Bug 502907 Opened 14 years ago Closed 14 years ago

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

Categories

(Testing :: XPCShell Harness, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: sdwilsh, Assigned: sdwilsh)

References

Details

(Keywords: fixed1.9.1, Whiteboard: [fixed1.9.1.6])

Attachments

(1 file)

Allow for the registration of cleanup functions that run when the harness is done so we can clean up at a sane time.
Attached patch v1.0Splinter Review
Attachment #387255 - Flags: review?(ted.mielczarek)
Whiteboard: [needs review ted]
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+
Whiteboard: [needs review ted]
Blocks: 503613
http://hg.mozilla.org/mozilla-central/rev/c7a952a3bb78

Filed bug 503613 for removing tail_ file usage.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Severity: normal → enhancement
Flags: in-testsuite?
Whiteboard: [needs 1.9.1.x landing]
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]
You need to log in before you can comment on or make changes to this bug.