Closed Bug 599693 Opened 12 years ago Closed 12 years ago

Allow developers to run mochitest-1 ... mochitest-5 by simply specifying those as a make target


(Firefox Build System :: General, enhancement)

Not set


(Not tracked)



(Reporter: Callek, Assigned: Callek)


(Keywords: dev-doc-complete)


(2 files, 4 obsolete files)

Attached patch v1 (obsolete) — Splinter Review
allow developers to specify:

|make mochitest-1| |make mochitest-2| etc. to mimic the buildbot behavior rather than needing to run the whole suite or dig up the buildbot syntax when they need to reproduce an issue found by try.
Attachment #478613 - Flags: review?(khuey)
Comment on attachment 478613 [details] [diff] [review]

I think we should make the total number of chunks a variable that can be overriden (TOTAL_CHUNKS ?= 5) so that in the future it'll be trivial to move from 5 chunks to 6 on buildbot.
Attachment #478613 - Flags: review?(khuey) → review+
Comment on attachment 478613 [details] [diff] [review]

Actually, r-.  This will break mochitest-chrome, etc.
Attachment #478613 - Flags: review+ → review-
Callek points out on IRC that I'm wrong about that.
Attached patch v2 (obsolete) — Splinter Review
address an IRC nit
Attachment #478613 - Attachment is obsolete: true
Attachment #478615 - Flags: review?(khuey)
Yea, this won't break mochitest-chrome as explicit targets override any wildcard ones. So we are safe there.
Attached patch v2.1 (obsolete) — Splinter Review
and after doing qref on the right patch
Attachment #478615 - Attachment is obsolete: true
Attachment #478617 - Flags: review?(khuey)
Attachment #478615 - Flags: review?(khuey)
Attached patch comm-central patch (obsolete) — Splinter Review
and let comm-central use the magic from root @objdir@
Attachment #478618 - Flags: review?(kairo)
better patch (and it doesn't error out)
Attachment #478618 - Attachment is obsolete: true
Attachment #478619 - Flags: review?(kairo)
Attachment #478618 - Flags: review?(kairo)
Comment on attachment 478619 [details] [diff] [review]
comm-central patch v1.1

I wonder a bit why we can't have those targets in one list, but the main thing is that it works. :)
Attachment #478619 - Flags: review?(kairo) → review+
(In reply to comment #9)
> Comment on attachment 478619 [details] [diff] [review]
> comm-central patch v1.1

I pushed this before the m-c patch, it won't break anything and doing the mochitest-1 .. 5 attempt prior to m-c patch landing will now just error in the m-c makefile rather than the c-c one.

That said, the reason this needs a new target-line is that we can't mix explicit and implicit rules. (using % makes this an implicit rule)
The only downside here is that this will let you run "make mochitest-anything" and it will use that rule. You could write this as a static pattern rule, instead, which would only match explicitly what you tell it to, like:

mochitest-1 mochitest-2 mochitest-3 mochitest-4 mochitest-5: mochitest-%:
	echo "mochitest: $* / 5"
then only mochitest-1 to mochitest-5 would be accepted.
Attached patch v3Splinter Review
Address teds nits.

Since ted wanted me to hard-code the acceptable "this chunk" part, I took out the total-chunks var. (no sense in allowing someone to set 6 chunks, but only go up to 5).

Requesting a formal review. [the concept/patch still has r=khuey]
Attachment #478617 - Attachment is obsolete: true
Attachment #478993 - Flags: review?(ted.mielczarek)
Keywords: dev-doc-needed
Comment on attachment 478993 [details] [diff] [review]

You don't need the echo, that was just me being lazy and not wanting to copy the full command there.
Attachment #478993 - Flags: review?(ted.mielczarek) → review+
(In reply to comment #15)
> Comment on attachment 478993 [details] [diff] [review]
> v3 [per IRC keeping the echo was ok]
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
Severity: normal → enhancement
Flags: in-testsuite-
OS: Windows XP → All
Hardware: x86 → All
Target Milestone: mozilla2.0b8 → mozilla2.0b7
Added a section to the documentation here:

Would appreciate a quick review; it's only a couple of short paragraphs.
I s/Firefox 4/Gecko 2/'d since this is core functionality.
sheppy, unrelated but your template stuff seems to have broke the anchor link...
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.