202
edits
m (Add note regards when not to use developer_config.py) |
Haftandilian (talk | contribs) (Typo) |
||
(12 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
'''NOTE: If running a job does not easily run locally for you; don't hesitate to just stop (no need to try to fix it), [https://wiki.mozilla.org/ReleaseEngineering/How_To/Request_a_slave ask for a loaner so you can make progress] and file a bug in [https://bugzilla.mozilla.org/enter_bug.cgi?product=Release%20Engineering&component=Mozharness here] for us to debug (please attach logs/log_info.log).''' | |||
'''NOTE: You can now use your LDAP credentials to authenticate and download the files that are behind Http authentication (e.g. pvtbuilds).''' | '''NOTE: You can now use your LDAP credentials to authenticate and download the files that are behind Http authentication (e.g. pvtbuilds).''' | ||
Line 10: | Line 12: | ||
= Known issues = | = Known issues = | ||
* | * Android emulator tests download a copy of the Android SDK from tooltool. Only Mozilla employees are authorized to download these files; non-employees will encounter a failure on download, but can easily work around the issue by skipping the download and using a local copy of the Android SDK. | ||
= Run mozharness ... = | = Run mozharness ... = | ||
Line 17: | Line 19: | ||
== ...on a loaner machine == | == ...on a loaner machine == | ||
* Don't use --cfg developer_config.py | * <font color='red'>Don't use --cfg developer_config.py</font> | ||
* Use --no-read-buildbot-config | * Use --no-read-buildbot-config instead | ||
* If the job is... | * If the job is... | ||
** A build job: nothing to append | ** A build job: nothing to append | ||
** A test job: append --installer-url and --test-url | ** A test job: append --installer-url and one of --test-url or --test-packages-url | ||
** A talos job: append --installer-url | ** A talos job: append --installer-url | ||
Line 35: | Line 37: | ||
== Common steps == | == Common steps == | ||
=== Step 1 - | === Step 1 - Check out mozharness === | ||
mozharness is now in the Gecko repository, under the testing/ directory. So if you do not already have a checkout, | |||
* hg clone https://hg.mozilla.org/mozilla-central/ | |||
=== Step 2 - Create a tooltool token (fetches artifacts for you) === | |||
With the new tooltool, you need to create a token to run mozharness on your development machine. Note that this is not necessary for all mozharness scripts -- for example, the hazard builds do not require this as they only download public files via tooltool. | |||
Steps: | |||
* Go [https://api.pub.build.mozilla.org/tokenauth here] | |||
* Issue a new user token with tooltool.download.public and tooltool.download.internal selected | |||
* The token will only be shown once | |||
* Place it in ~/.mozilla/releng/relengapi.tok | |||
=== Step | === Step 3 - Find the command in the log === | ||
In the job in treeherder you can search for '''"Run as scripts/scripts"''' and you should see how exactly the command was run in production and you can add the options mentioned above. | In the job in treeherder you can search for '''"Run as scripts/scripts"''' and you should see how exactly the command was run in production and you can add the options mentioned above. | ||
NOTE: Don't forget to prepend ''python'' before the command. | NOTE: Don't forget to prepend ''python'' before the command. | ||
=== Step | === Step 4 - Append --cfg developer_config.py === | ||
{{warning|If you have a loaned machine from Release Engineering, do not use this config.<br/>This config is meant to be used only when you're running mozharness on your local machine.<br/>(<small>[[How_to_run_tests_as_a_developer#...on_a_loaner_machine|More Information]]</small>)}} | |||
This activates the LDAP authentication for private files. | This activates the LDAP authentication for private files. | ||
Line 55: | Line 66: | ||
If you're trying to reproduce a unit test suite or a talos suite follow this last step. Otherwise, go to the "Build and other jobs" section. | If you're trying to reproduce a unit test suite or a talos suite follow this last step. Otherwise, go to the "Build and other jobs" section. | ||
=== Step | === Step 5 - Append --installer-url and/or one of --test-url and --test-packages-url === | ||
Append ''--installer-url'' and | Append ''--installer-url'' and one of ''--test-url'' or ''--test-packages-url''. You can find the right values on the log: | ||
<pre> | <pre> | ||
08:14:31 INFO - Found installer url http://ftp.mozilla.org/pub/mozilla.org/b2g/tinderbox-builds/mozilla-inbound-linux32_gecko/1400225075/en-US/b2g-32.0a1.en-US.linux-i686.tar.bz2. | 08:14:31 INFO - Found installer url http://ftp.mozilla.org/pub/mozilla.org/b2g/tinderbox-builds/mozilla-inbound-linux32_gecko/1400225075/en-US/b2g-32.0a1.en-US.linux-i686.tar.bz2. | ||
08:14:31 INFO - Found test url http://ftp.mozilla.org/pub/mozilla.org/b2g/tinderbox-builds/mozilla-inbound-linux32_gecko/1400225075/en-US/b2g-32.0a1.en-US.linux-i686.tests.zip. | 08:14:31 INFO - Found test url http://ftp.mozilla.org/pub/mozilla.org/b2g/tinderbox-builds/mozilla-inbound-linux32_gecko/1400225075/en-US/b2g-32.0a1.en-US.linux-i686.tests.zip. | ||
… | |||
17:51:04 INFO - Found a test packages url https://queue.taskcluster.net/v1/task/XHPBpieOSeO2e44zhkw64A/artifacts/public/build/test_packages.json. | |||
</pre> | </pre> | ||
Line 65: | Line 78: | ||
== Build and other jobs == | == Build and other jobs == | ||
You don't have to use --installer-url or --test-url. | You don't have to use --installer-url, --test-url, or --test-packages-url. | ||
Right now I have not been able to run too many of these jobs on my local machine since it requires setting up mock_mozilla and each of these jobs can have their own set of environments. | Right now I have not been able to run too many of these jobs on my local machine since it requires setting up mock_mozilla and each of these jobs can have their own set of environments. | ||
Line 156: | Line 169: | ||
In the previous section we mention to use --installer-url as well as --test-url, this is not necessary if you create a file called buildprops.json since the URLs are already specified inside of it. | In the previous section we mention to use --installer-url as well as --test-url, this is not necessary if you create a file called buildprops.json since the URLs are already specified inside of it. | ||
You can find the information you need by loading a tbpl log and looking for ''"08:14:31 INFO - Using buildbot properties"''. | You can find the information you need by loading a tbpl log and looking for ''"08:14:31 INFO - Using buildbot properties"''. | ||
Don't try to make sense of it. Just copy it without the datestamps (I know, it sucks). | Don't try to make sense of it. Just copy it without the datestamps (I know, it sucks). You will also need to add some dummy properties which you can find at https://searchfox.org/mozilla-central/source/taskcluster/docker/recipes/buildprops.json because the Python code that reads the file looks for these. | ||
== Step 4 - B) --no-read-buildbot-config == | == Step 4 - B) --no-read-buildbot-config == |
edits