NSS:TryServer: Difference between revisions

5,486 bytes added ,  19 September 2019
m
clarify NSPR instructions
m (clarify NSPR instructions)
 
(33 intermediate revisions by 5 users not shown)
Line 1: Line 1:
This page describes how to use the NSS try server.
This page describes how to use the NSS try server.
(You probably want to push to nss-try before pushing to the main NSS repository.)


=Pushing to nss-try=
=Pushing to nss-try=
An account level 1 commit access is required. ([https://www.mozilla.org/en-US/about/governance/policies/commit/access-policy/ Get it here.])


Create a new entry in the <code>[paths]</code> section of your $nss-directory/.hg/hgrc file:
Create a new entry in the <code>[paths]</code> section of your <code>$nss-directory/.hg/hgrc</code> file:


<pre>
<pre>
try = ssh://ldap.username@organisation.com@hg.mozilla.org/projects/nss-try
nss-try = ssh://ldap.username@you.com@hg.mozilla.org/projects/nss-try
</pre>
</pre>


Line 13: Line 16:
<pre>
<pre>
$ cd $nss-directory/
$ cd $nss-directory/
$ hg push -f try
$ hg push -r . -f nss-try
</pre>
</pre>
Note: <b>Local changes will not be pushed, all code that you want to test must be commited in some way.</b> For example, you could use the mq extension and commit your change to a local mq patch (hg qnew).


Your try job will show up on the [https://treeherder.mozilla.org/#/jobs?repo=nss-try nss-try dashboard] in a second.
Your try job will show up on the [https://treeherder.mozilla.org/#/jobs?repo=nss-try nss-try dashboard] in a second.
=Using nss-try.sh=
The [https://github.com/mozilla/nss-tools nss-tools] repository on Github has a script [https://github.com/mozilla/nss-tools/blob/master/nss-try.sh nss-try.sh] which simplifies this considerably, even showing help when executed with no arguments.
<pre>
$ ~/git/nss-tools/nss-try.sh
(... detailed instructions ...)
$ ~/git/nss-tools/nss-try.sh -e all -t all -u all
</pre>
=Using try syntax=
This section describes how to use try syntax to push your patch to nss-try and run only a subset of all available Taskcluster tests.
<pre>try: -b do -p all -u all -t all -e all</pre>
This will run all available Taskcluster builds and tests and is equivalent to not specifying any try syntax at all.
==Overview==
Available options are:
<pre>
-b do (debug and opt)
  [default is "do" if omitted]
-p linux,linux64,linux-make,linux64-make,linux-fuzz,linux64-fuzz,linux64-asan,linux64-fips,win64,win64-make,win,win-make,aarch64,mac (or "all" or "none")
  [default is "all" if omitted]
-u bogo,crmf,chains,cipher,db,ec,fips,gtest,interop,lowhash,merge,sdr,smime,ssl,tlsfuzzer,tools (or "all" or "none")
  [default is "none" if omitted]
-t abi,clang-format,coverage,coverity,hacl,saw,scan-build (or "all" or "none")
  [default is "none" if omitted]
-e all (or "none")
  [default is "none" if omitted]
--nspr-patch
</pre>
==Build types (-b / --build)==
There are two available build types: <code>debug</code> and <code>opt</code>. If you want both use <code>-b do</code>, for only debug builds use <code>-b d</code>, and use <code>-b o</code> for only optimized builds.
==Platforms (-p / --platform)==
The currently available platforms are <code>linux</code>, <code>linux64</code>, <code>linux-make</code>, <code>linux64-make</code>, <code>linux-fuzz</code>, <code>linux64-fuzz</code>, <code>linux64-asan</code>, <code>linux64-fips</code>, <code>win64</code>, <code>win64_make</code>, <code>win</code>, <code>win_make</code>, <code>aarch64</code> and <code>mac</code>. Specify any combination of those, like <code>-p linux,win64</code>, to choose the platforms your patch should be tested on. If you want to test all platforms use <code>-p all</code>, if you want no platforms (which is only useful when you want only tools, see below) then use <code>-p none</code>.
==Unit tests (-u / --unittests)==
The currently available test suites are <code>bogo</code>, <code>crmf</code>, <code>chains</code>, <code>cipher</code>, <code>db</code>, <code>ec</code>, <code>fips</code>, <code>gtest</code>, <code>interop</code>, <code>lowhash</code>, <code>merge</code>, <code>sdr</code>, <code>smime</code>, <code>ssl</code>,<code>tlsfuzzer</code> and <code>tools</code>. Specify any combination of those, like <code>-u ec,gtest</code>, to choose the test suites to run with your patch. If you want to run all test suites use <code>-u all</code>, if you want no tests use <code>-u none</code>.
==Tools (-t / --tools)==
The currently available tools are <code>clang-format</code>, <code>scan-build</code>, <code>hacl</code>, <code>saw</code> and <code>coverage</code>. Specify any combination of those, like <code>-t clang-format,scan-build</code>, to choose the tools to run with your patch. If you want to run all tools use <code>-t all</code>, if you want no tools use <code>-t none</code>.
==Extra builds (-e / --extra-builds)==
Specify either <code>all</code> or <code>none</code> to enable or disable extra builds. The number and type of extra builds varies per platform.
==Enable NSPR changes (--nspr-patch)==
Mozilla doesn't maintain separate infrastructure for the NSPR project, but you can test NSPR changes in nss-try. Use a patch file that was created by executing "hg diff" in the top level nspr directory and is named nspr.patch. Copy that patch into the main nss directory (nss/nspr.patch). Include the patch in your submission to nss-try and add parameter --nspr-patch.
=Try syntax implementation=
This section describes how the try syntax is implemented for nss-try.
==Decision task==
After pushing a new changeset to nss-try or the main NSS repository, Taskcluster will spawn a new decision task <code>D</code> that may then extend the task graph, i.e. decide what to build and which tests to run. NSS uses a Node.JS app to do that:
<code>https://hg.mozilla.org/projects/nss/file/default/automation/taskcluster/graph/src/</code>
==Task filter==
The file above will build the complete task graph, for all build types, platforms, test suites, and tools. Before this is sent back to Taskcluster however, we will filter all tasks by the given try syntax, if any. The code for that filter can be found at:
<code>https://hg.mozilla.org/projects/nss/file/default/automation/taskcluster/graph/src/try_syntax.js</code>
==Making changes==
Whenever you're adding or changing some piece of code in the try syntax filter, please push to nss-try before landing to ensure it's all working as expected. All changes to the NSS Taskcluster CI can be tested on nss-try before landing on the main repository.
Confirmed users
563

edits