Last Comment Bug 599693 - Allow developers to run mochitest-1 ... mochitest-5 by simply specifying those as a make target
: Allow developers to run mochitest-1 ... mochitest-5 by simply specifying thos...
: dev-doc-complete
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: All All
: -- enhancement (vote)
: mozilla2.0b7
Assigned To: Justin Wood (:Callek)
Depends on:
  Show dependency treegraph
Reported: 2010-09-25 21:23 PDT by Justin Wood (:Callek)
Modified: 2011-01-12 11:15 PST (History)
4 users (show)
bugzillamozillaorg_serge_20140323: in‑testsuite-
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

v1 (592 bytes, patch)
2010-09-25 21:23 PDT, Justin Wood (:Callek)
khuey: review-
Details | Diff | Review
v2 (668 bytes, patch)
2010-09-25 21:39 PDT, Justin Wood (:Callek)
no flags Details | Diff | Review
v2.1 (754 bytes, patch)
2010-09-25 21:42 PDT, Justin Wood (:Callek)
khuey: review+
Details | Diff | Review
comm-central patch (548 bytes, patch)
2010-09-25 21:54 PDT, Justin Wood (:Callek)
no flags Details | Diff | Review
comm-central patch v1.1 (610 bytes, patch)
2010-09-25 21:57 PDT, Justin Wood (:Callek)
kairo: review+
Details | Diff | Review
v3 (783 bytes, patch)
2010-09-28 00:28 PDT, Justin Wood (:Callek)
ted: review+
Details | Diff | Review

Description Justin Wood (:Callek) 2010-09-25 21:23:09 PDT
Created attachment 478613 [details] [diff] [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.
Comment 1 Kyle Huey [:khuey] ( 2010-09-25 21:30:14 PDT
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.
Comment 2 Kyle Huey [:khuey] ( 2010-09-25 21:33:47 PDT
Comment on attachment 478613 [details] [diff] [review]

Actually, r-.  This will break mochitest-chrome, etc.
Comment 3 Kyle Huey [:khuey] ( 2010-09-25 21:36:08 PDT
Callek points out on IRC that I'm wrong about that.
Comment 4 Justin Wood (:Callek) 2010-09-25 21:39:18 PDT
Created attachment 478615 [details] [diff] [review]

address an IRC nit
Comment 5 Justin Wood (:Callek) 2010-09-25 21:39:45 PDT
Yea, this won't break mochitest-chrome as explicit targets override any wildcard ones. So we are safe there.
Comment 6 Justin Wood (:Callek) 2010-09-25 21:42:30 PDT
Created attachment 478617 [details] [diff] [review]

and after doing qref on the right patch
Comment 7 Justin Wood (:Callek) 2010-09-25 21:54:57 PDT
Created attachment 478618 [details] [diff] [review]
comm-central patch

and let comm-central use the magic from root @objdir@
Comment 8 Justin Wood (:Callek) 2010-09-25 21:57:34 PDT
Created attachment 478619 [details] [diff] [review]
comm-central patch v1.1

better patch (and it doesn't error out)
Comment 9 Robert Kaiser (not working on stability any more) 2010-09-26 03:31:15 PDT
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. :)
Comment 10 Justin Wood (:Callek) 2010-09-26 22:15:19 PDT
(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)
Comment 11 Ted Mielczarek [:ted.mielczarek] 2010-09-27 06:30:32 PDT
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.
Comment 12 Serge Gautherie (:sgautherie) 2010-09-27 12:38:43 PDT
(In reply to comment #10)

Backed out in
Comment 13 Justin Wood (:Callek) 2010-09-28 00:28:02 PDT
Created attachment 478993 [details] [diff] [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]
Comment 14 Justin Wood (:Callek) 2010-09-28 21:40:25 PDT
Comment on attachment 478619 [details] [diff] [review]
comm-central patch v1.1

re-landed as:
Comment 15 Ted Mielczarek [:ted.mielczarek] 2010-10-07 12:31:09 PDT
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.
Comment 16 Justin Wood (:Callek) 2010-10-07 19:51:11 PDT
(In reply to comment #15)
> Comment on attachment 478993 [details] [diff] [review]
> v3 [per IRC keeping the echo was ok]
Comment 17 Eric Shepherd [:sheppy] 2011-01-11 13:52:40 PST
Added a section to the documentation here:

Would appreciate a quick review; it's only a couple of short paragraphs.
Comment 18 Kyle Huey [:khuey] ( 2011-01-11 13:56:57 PST
LGTM.  Thanks Sheppy!
Comment 19 Kyle Huey [:khuey] ( 2011-01-11 13:58:37 PST
I s/Firefox 4/Gecko 2/'d since this is core functionality.
Comment 20 Justin Wood (:Callek) 2011-01-11 19:18:28 PST
sheppy, unrelated but your template stuff seems to have broke the anchor link...
Comment 21 Eric Shepherd [:sheppy] 2011-01-12 11:15:54 PST
That's only because the name changed; the link is now:

Note You need to log in before you can comment on or make changes to this bug.