Support --setenv command line argument in browsertime
Categories
(Testing :: Raptor, task, P3)
Tracking
(firefox84 fixed)
| Tracking | Status | |
|---|---|---|
| firefox84 | --- | fixed |
People
(Reporter: sparky, Assigned: kanishk509, Mentored)
References
Details
(Keywords: good-first-bug, Whiteboard: [lang=py])
User Story
See here for information on how to contribute: https://wiki.mozilla.org/TestEngineering/Performance/NewContributors
Attachments
(1 external file)
+++ This bug was initially created as a clone of Bug #1494669 +++
We need to add the ability to use --setenv to raptor-browsertime. We already have the cli arguments we just need to hook it up. This will involve modifying browsertime as well since it doesn't accept settings for the environment.
I would like to work on this. Can you share some details?
| Reporter | ||
Comment 2•6 years ago
|
||
Awesome! :)
So you'll have to start by hacking in browsertime. This will involve adding a new command line option to it: https://github.com/sitespeedio/browsertime/blob/main/lib/support/cli.js
Next, you'll need to take those values and set them for the process env in the following file (in a similar way to this code): https://github.com/sitespeedio/browsertime/blob/51e30a4d768fe94d78bbffe691a59d17b2358588/lib/firefox/webdriver/builder.js#L54-L57
To test this out locally. You can run ./mach browsertime --update-upstream-url https://github.com/sitespeedio/browsertime/tarball/51e30a4d768fe94d78bbffe691a59d17b2358588
Then, ./mach browsertime --setup --clobber
After that, you'll be able to use it in Raptor-Browsertime to test it out: https://searchfox.org/mozilla-central/source/testing/raptor/raptor/browsertime/base.py#172
You could use the same command as in the previous bug to test this out, but be sure to add the option: --browsertime
Let me know if you have any questions or hit any issues here! For the browsertime patch, you can flag myself and soulgalore to review the patch.
:sparky, there seems to be an option to set firefox env variables in browsertime already.
See https://github.com/sitespeedio/browsertime/pull/1110/commits/42cc5d55702c5406abd0f9ab24e4b17dd7dfaa21 and https://bugzilla.mozilla.org/show_bug.cgi?id=1607960.
Stuff like --firefox.env='MOZ_LOG=nsHttp:5' seems to be working.
Can we use this option directly from raptor-browsertime?
| Reporter | ||
Comment 4•6 years ago
|
||
Oh that's excellent! I missed that it was already there, thanks for checking.
Yup, we can use that option directly in raptor-browsertime.
Updated•6 years ago
|
Submitted an initial patch.
I'm setting up browsertime to test it locally, will update after I test it with ./mach raptor --browsertime -t raptor-tp6-amazon-firefox --setenv MOZ_LOG=timestamp,all --verbose.
Tested locally with ./mach raptor --browsertime -t raptor-tp6-amazon-firefox --setenv MOZ_LOG=timestamp,nsHttp:5,cache2:5,nsSocketTransport:5,nsHostResolver:5 --verbose.
Env variables are being passed properly. I can see in the console:
[browsertime] Running with options: {
...
15:05:16 INFO - raptor-browsertime Info: "firefox": {
...
15:05:16 INFO - raptor-browsertime Info: "env": "MOZ_LOG=timestamp,nsHttp:5,cache2:5,nsSocketTransport:5,nsHostResolver:5"
Lots of logs also being printed.
| Reporter | ||
Comment 9•6 years ago
|
||
Nice work getting --setenv working across Raptor Kanishk!
Would you like another bug to hack on?
Comment 10•6 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 11•6 years ago
|
||
(In reply to Greg Mierzwinski [:sparky] from comment #9)
Nice work getting --setenv working across Raptor Kanishk!
Thanks for the help! This was fun.
Would you like another bug to hack on?
Yeah, would love to pick up something new.
| Reporter | ||
Comment 12•6 years ago
|
||
Great! :)
We recently opened this one if you're interested? https://bugzilla.mozilla.org/show_bug.cgi?id=1674442
There would be a follow-up on that one to (which could be done at the same time) where we will need to pull in the tags from the browsertime test tasks into the vismet tasks (like what we do for the extraOptions).
| Assignee | ||
Comment 13•6 years ago
|
||
(In reply to Greg Mierzwinski [:sparky] from comment #12)
Great! :)
We recently opened this one if you're interested? https://bugzilla.mozilla.org/show_bug.cgi?id=1674442
There would be a follow-up on that one to (which could be done at the same time) where we will need to pull in the tags from the browsertime test tasks into the vismet tasks (like what we do for the extraOptions).
I'll definitely try to give it a go as soon as I'm able to, if it hasn't been picked up by then.
Description
•