Closed Bug 744675 Opened 12 years ago Closed 12 years ago

Autodetect a sane -j# for jsreftest runner

Categories

(Core :: JavaScript Engine, defect)

16 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: terrence, Assigned: terrence)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This would be a nice feature to have.
Assignee: terrence → nobody
Blocks: 745230
Component: JavaScript Engine → IPC
Keywords: helpwanted
QA Contact: general → ipc
Whiteboard: [good first bug][easy][mentor=terrence][lang=python]
Assignee: nobody → general
Component: IPC → JavaScript Engine
QA Contact: ipc → general
Terrence, could you drop some links to the relevant source files and comment on a suggested method of autodetection?
(In reply to Josh Matthews [:jdm] from comment #1)
> Terrence, could you drop some links to the relevant source files and comment
> on a suggested method of autodetection?

The jsreftest testsuite code is in js/src/tests/.  The main file that will need modification is jstests.py.

I had couple of specific API's in mind, but it turns out someone has already made a comprehensive list; we should be able to get away with just cribbing from stackoverflow:

http://stackoverflow.com/questions/1006289/how-to-find-out-the-number-of-cpus-in-python
MXR link for where we add the -j arg:
http://mxr.mozilla.org/mozilla-central/source/js/src/tests/jstests.py#68

It would be easiest to set the default= parameter here to the output of the function in the stack-overflow article.
Keywords: helpwanted
Whiteboard: [good first bug][easy][mentor=terrence][lang=python]
Version: Trunk → 16 Branch
Attached patch v0Splinter Review
And updates the core help with output format notes, since I was in the area.
Assignee: general → terrence
Attachment #646767 - Flags: review?(sphink)
Comment on attachment 646767 [details] [diff] [review]
v0

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

I think I'll just take your word for this one. For the default, why go down to 1, though? It seems like if somebody bothers to specify -j, then they'd expect at least 2.
Attachment #646767 - Flags: review?(sphink) → review+
https://hg.mozilla.org/mozilla-central/rev/088951918af8
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: