Closed
Bug 945095
Opened 11 years ago
Closed 10 years ago
Use same format to set reporter between test-agent & test-integration
Categories
(Testing Graveyard :: JSMarionette, defect)
Tracking
(b2g-v1.3 affected, b2g-v1.4 fixed)
RESOLVED
FIXED
People
(Reporter: yurenju, Assigned: asuth)
References
Details
Attachments
(2 files, 2 obsolete files)
Currently we use two different strings to set reporter between test-agent and gaia-marionette, e.g., "Spec" and "spec" mocha |require| all reporter with capitalization module names, so we should make gaia-marionette support capitalization reporter name such as "Spec" and "Dot".
Reporter | ||
Comment 1•11 years ago
|
||
this is the pull request for marionette-js-runner, we need another PR for gaia.
Assignee: nobody → yurenju.mozilla
Status: NEW → ASSIGNED
Attachment #8340907 -
Flags: review?(evanxd)
Comment 2•11 years ago
|
||
Hi Yuren, Please make sure the Travis is good before we start to review the patch. Thanks. :)
Reporter | ||
Updated•11 years ago
|
Attachment #8340907 -
Flags: review?(evanxd)
Comment 4•11 years ago
|
||
Adding James to the cc list. He own marionette-js-runner.
Comment 6•11 years ago
|
||
Hi Julien, I don't why it is not green now. https://travis-ci.org/mozilla-b2g/marionette-js-runner/builds/14842407 But let us run again for the patch.
Flags: needinfo?(evanxd)
Comment 7•11 years ago
|
||
Right, I don't know which build I was looking at...
Comment 8•11 years ago
|
||
This break tests (see dupe bug 947474). Breaking tests should be blocking everything else.
blocking-b2g: --- → 1.4?
Comment 9•11 years ago
|
||
Use REPORTER=spec when launching the tests and you're good for now.
Comment 10•10 years ago
|
||
Can we update the README with this workaround until this bug is fixed? Would remove a barrier of entry for newcomers.
Comment 11•10 years ago
|
||
I'd rather fix this for good... Yuren, are you blocked by something? Or is it only that you lack time?
Reporter | ||
Comment 12•10 years ago
|
||
Julien, I'm fighting for refactoring & planning build system, it would be great if anyone can steal this issue :-)
Comment 13•10 years ago
|
||
ok thanks :) I'll reset the assignee for now, so that someone that is hurt enough can take it from your patch ;)
Assignee: yurenju.mozilla → nobody
Updated•10 years ago
|
Assignee: nobody → dale
Comment 14•10 years ago
|
||
This isnt a fix for using the same reported / underlying filesystem issues so can file as a seperate bug or reopen / reuse the duped one, but just a quick fix so |make test-integration| to work for everyone that keeps trying to use it
Attachment #8360098 -
Flags: review?(felash)
Comment 15•10 years ago
|
||
Comment on attachment 8360098 [details] [review] https://github.com/mozilla-b2g/gaia/pull/15328 Cancelling review, breaks local unit tests which are somehow different from travis unit tests
Attachment #8360098 -
Flags: review?(felash)
Comment 16•10 years ago
|
||
Wondering why we can't move forward the initial patch from Yuren?
Assignee | ||
Comment 18•10 years ago
|
||
(In reply to Yuren Ju [:yurenju][:小朱] from comment #0) > Currently we use two different strings to set reporter between test-agent > and gaia-marionette, e.g., "Spec" and "spec" > > mocha |require| all reporter with capitalization module names, so we should > make gaia-marionette support capitalization reporter name such as "Spec" and > "Dot". I'm looking into this now because this is indeed frustrating. I think this is backwards and we should fix js-test-agent to use lower-case reporter names. My rationale is that this is consistent with the code in mocha itself which I include here: === Mocha.prototype.reporter = function(reporter){ if ('function' == typeof reporter) { this._reporter = reporter; } else { reporter = reporter || 'dot'; try { this._reporter = require('./reporters/' + reporter); } catch (err) { this._reporter = require(reporter); } if (!this._reporter) throw new Error('invalid reporter "' + reporter + '"'); } return this; }; === Also, we have a TBPL reporter https://github.com/mozilla-b2g/mocha-tbpl-reporter that advises using "--reporter mocha-tbpl-reporter" to enable it. A capitalization mapping would be awkward weird for this. The actual capitalization used inside the module is irrelevant since the code inside mocha/reports/dot.js for example is "exports = module.exports = Dot;" My proposed solution is thus to: - Modify js-test-agent/lib/node/bin/test.js (and anything like it) to continue to use the existing CamelCase option as a first priority, then fail-over to the mocha canonical lowercase lookup mapping. js-test-agent currently appears to not support mocha-tbpl-reporter, which this solution should address. - Change our Makefile to REPORTER=spec, the choice of a new generation. I am stealing the bug.
Assignee: dale → bugmail
Assignee | ||
Comment 19•10 years ago
|
||
Attachment #8340907 -
Attachment is obsolete: true
Attachment #8360098 -
Attachment is obsolete: true
Attachment #8363535 -
Flags: review?(felash)
Assignee | ||
Comment 20•10 years ago
|
||
Obviously, the actual commit would have an NPM version number instead of a git hash. Asking Julien for review since this is basically just a js-test-agent thing.
Attachment #8363537 -
Flags: review?(felash)
Comment 21•10 years ago
|
||
Comment on attachment 8363535 [details] [review] Support lowercase names in js-test-agent r=me The rationale is sane, let's do this! Thanks a lot Andrew!
Attachment #8363535 -
Flags: review?(felash) → review+
Comment 22•10 years ago
|
||
Comment on attachment 8363537 [details] [review] Use lower-case REPORTER for both integration and js-test agent I don't know how to publish to the npm registry yet but just bump the version to 0.15.0 and let's wait for a green travis. Ping me when ready :)
Attachment #8363537 -
Flags: review?(felash)
Comment 23•10 years ago
|
||
You need to have the proper rights on the module. Then it is just a matter of "npm publish". You can find the list of maintainers there: https://npmjs.org/package/test-agent Kevin or Mike should be able to help. BTW the r+ patch does bump to 0.14.1. Make sure to change that before merging.
Comment 24•10 years ago
|
||
(In reply to Hubert Figuiere [:hub] from comment #23) > BTW the r+ patch does bump to 0.14.1. Make sure to change that before > merging. Yep, I said it in a comment on github.
Comment 25•10 years ago
|
||
(In reply to Hubert Figuiere [:hub] from comment #23) > You need to have the proper rights on the module. Then it is just a matter > of "npm publish". > > You can find the list of maintainers there: > > https://npmjs.org/package/test-agent > > Kevin or Mike should be able to help. > James just added me too, so it'll be fine :)
Assignee | ||
Comment 26•10 years ago
|
||
Okay, I landed the js-test-agent fix after confirming that gaia was fine with those changes via a github git URL in npm. (The python tests had an error, and there were some failures in the b2g version of the unit tests, but nothing related to the reporter.) That travis run is here: https://travis-ci.org/mozilla-b2g/gaia/builds/17463781 I have updated the https://github.com/mozilla-b2g/gaia/pull/15590 to just use version 0.15.0. Julien or someone else needs to upload the 0.15.0 release first, of course. needinfo-ing Julien to this end.
Flags: needinfo?(felash)
Assignee | ||
Comment 28•10 years ago
|
||
thanks! landed on gaia/master: https://github.com/mozilla-b2g/gaia/pull/15590 https://github.com/mozilla-b2g/gaia/commit/30895f12aa3037e26ef77cb492b4373be66149c0
Status: ASSIGNED → RESOLVED
blocking-b2g: 1.4? → ---
Closed: 10 years ago
status-b2g-v1.3:
--- → affected
status-b2g-v1.4:
--- → fixed
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•