Closed Bug 1192533 Opened 9 years ago Closed 8 years ago

Allow running only one test via add_task.only() or skipping via add_task.skip()

Categories

(Testing :: XPCShell Harness, enhancement)

enhancement
Not set
normal

Tracking

(firefox46 fixed)

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: Fallen, Assigned: Fallen)

Details

(Keywords: dev-doc-needed)

Attachments

(1 file)

When debugging a test that has a lot of tasks added via add_task/add_test, I'd like to be able to run only one task. I would like to propose implementing add_task.only() and add_task.skip().
Attached patch Fix - v1 β€” β€” Splinter Review
Attachment #8645363 - Flags: review?(ted)
Comment on attachment 8645363 [details] [diff] [review]
Fix - v1

Review of attachment 8645363 [details] [diff] [review]:
-----------------------------------------------------------------

This seems fine, this could use documentation somewhere. I guess ideally you'd be able to do this from the mach invocation without having to edit the test, but I don't think we have task names or anything that we could use to filter out at that level, do we?

Sorry for the long review delay. :-(
Attachment #8645363 - Flags: review?(ted) → review+
Sorry for taking so long to push this, I wanted to at least look into how it could be done via mach. I'm going to go ahead with this patch (as soon as trees open) for now since in most cases when using only/skip you'll actually be working on a test and are modifying it anyway.

The task/test names are not available in python, but they are in head.js, so if the skip/only names are passed to xpcshell they could be filtered out at runtime. If this is done with mach, how would you want the invocation to look?


mach xpcshell-test mytest.js --task task1_in_file,task2_in_file --skip task1_in_file,task2_in_file
Keywords: dev-doc-needed
https://hg.mozilla.org/mozilla-central/rev/5481fa5ce424
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: