The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in mozilla2.0b7

Status

()

Core
Build Config
--
enhancement
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: Callek, Assigned: Callek)

Tracking

({dev-doc-complete})

Trunk
mozilla2.0b7
dev-doc-complete
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 4 obsolete attachments)

(Assignee)

Description

7 years ago
Created attachment 478613 [details] [diff] [review]
v1

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 runtests.py syntax when they need to reproduce an issue found by try.
Attachment #478613 - Flags: review?(khuey)
Comment on attachment 478613 [details] [diff] [review]
v1

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]
v1

Actually, r-.  This will break mochitest-chrome, etc.
Attachment #478613 - Flags: review+ → review-
Callek points out on IRC that I'm wrong about that.
(Assignee)

Comment 4

7 years ago
Created attachment 478615 [details] [diff] [review]
v2

address an IRC nit
Attachment #478613 - Attachment is obsolete: true
Attachment #478615 - Flags: review?(khuey)
(Assignee)

Comment 5

7 years ago
Yea, this won't break mochitest-chrome as explicit targets override any wildcard ones. So we are safe there.
(Assignee)

Comment 6

7 years ago
Created attachment 478617 [details] [diff] [review]
v2.1

and after doing qref on the right patch
Attachment #478615 - Attachment is obsolete: true
Attachment #478617 - Flags: review?(khuey)
Attachment #478615 - Flags: review?(khuey)
Attachment #478617 - Flags: review?(khuey) → review+
(Assignee)

Comment 7

7 years ago
Created attachment 478618 [details] [diff] [review]
comm-central patch

and let comm-central use the magic from root @objdir@
Attachment #478618 - Flags: review?(kairo)
(Assignee)

Comment 8

7 years ago
Created attachment 478619 [details] [diff] [review]
comm-central patch v1.1

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 9

7 years ago
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+
(Assignee)

Comment 10

7 years ago
(In reply to comment #9)
> Comment on attachment 478619 [details] [diff] [review]
> comm-central patch v1.1
> 

http://hg.mozilla.org/comm-central/rev/e68e000957ed

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.
(In reply to comment #10)
> http://hg.mozilla.org/comm-central/rev/e68e000957ed

Backed out in http://hg.mozilla.org/comm-central/rev/25d8cbc32bcd
(Assignee)

Comment 13

7 years ago
Created attachment 478993 [details] [diff] [review]
v3

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)
(Assignee)

Comment 14

7 years ago
Comment on attachment 478619 [details] [diff] [review]
comm-central patch v1.1

re-landed as: http://hg.mozilla.org/comm-central/rev/74ab84b7da92
(Assignee)

Updated

7 years ago
Keywords: dev-doc-needed
Comment on attachment 478993 [details] [diff] [review]
v3

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+
(Assignee)

Comment 16

7 years ago
(In reply to comment #15)
> Comment on attachment 478993 [details] [diff] [review]
> v3

http://hg.mozilla.org/mozilla-central/rev/decd6313265b [per IRC keeping the echo was ok]
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
(Assignee)

Updated

7 years ago
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:

https://developer.mozilla.org/en/Mochitest#Running_specific_tests_in_Firefox_4_or_later

Would appreciate a quick review; it's only a couple of short paragraphs.
LGTM.  Thanks Sheppy!
Keywords: dev-doc-needed → dev-doc-complete
I s/Firefox 4/Gecko 2/'d since this is core functionality.
(Assignee)

Comment 20

6 years ago
sheppy, unrelated but your template stuff seems to have broke the anchor link...
That's only because the name changed; the link is now:

https://developer.mozilla.org/en/Mochitest#Running_specific_tests_in_Gecko_2.0_or_later
You need to log in before you can comment on or make changes to this bug.