NSS:TryServer: Difference between revisions
(Note the nss-try.sh script) |
(→Using try syntax: sync descriptions) |
||
Line 50: | Line 50: | ||
[default is "do" if omitted] | [default is "do" if omitted] | ||
-p linux,linux64, | -p linux,linux64,linux-make,linux64-make,linux-fuzz,linux64-fuzz,linux64-asan,linux64-fips,win64,win64-make,win,win-make,aarch64 (or "all" or "none") | ||
[default is "all" if omitted] | [default is "all" if omitted] | ||
Line 69: | Line 69: | ||
==Platforms (-p / --platform)== | ==Platforms (-p / --platform)== | ||
The currently available platforms are <code>linux</code>, <code>linux64</code>, <code>linux64-make</code>, <code>linux-fuzz</code>, <code>linux64-fuzz</code>, <code>linux64-asan</code>, <code>linux64-fips</code>, <code>win64</code>, and <code>aarch64</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>. | 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> and <code>aarch64</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)== | ==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>lowhash</code>, <code>merge</code>, <code>sdr</code>, <code>smime</code>, <code>tools</code> | 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>tools</code> and <code>ssl</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)== | ==Tools (-t / --tools)== | ||
The currently available tools are <code>clang-format</code>, <code>scan-build</code>, <code>hacl</code>, <code>saw</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>. | 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)== | ==Extra builds (-e / --extra-builds)== |
Revision as of 12:22, 9 August 2019
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
An account level 1 commit access is required. (Get it here.)
Create a new entry in the [paths]
section of your $nss-directory/.hg/hgrc
file:
nss-try = ssh://ldap.username@you.com@hg.mozilla.org/projects/nss-try
Now every time you want to push a patch to nss-try you can simply do:
$ cd $nss-directory/ $ hg push -r . -f nss-try
Note: Local changes will not be pushed, all code that you want to test must be commited in some way. 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 nss-try dashboard in a second.
Using nss-try.sh
The nss-tools repository on Github has a script nss-try.sh which simplifies this considerably, even showing help when executed with no arguments.
$ ~/git/nss-tools/nss-try.sh (... detailed instructions ...) $ ~/git/nss-tools/nss-try.sh -e all -t all -u all
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.
try: -b do -p all -u all -t all -e all
This will run all available Taskcluster builds and tests and is equivalent to not specifying any try syntax at all.
Overview
Available options are:
-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 (or "all" or "none") [default is "all" if omitted] -u bogo,crmf,chains,cipher,db,ec,fips,gtest,interop,lowhash,merge,sdr,smime,tools,ssl (or "all" or "none") [default is "none" if omitted] -t clang-format,scan-build,hacl,saw,coverage (or "all" or "none") [default is "none" if omitted] -e all (or "none") [default is "none" if omitted]
Build types (-b / --build)
There are two available build types: debug
and opt
. If you want both use -b do
, for only debug builds use -b d
, and use -b o
for only optimized builds.
Platforms (-p / --platform)
The currently available platforms are linux
, linux64
, linux-make
, linux64-make
, linux-fuzz
, linux64-fuzz
, linux64-asan
, linux64-fips
, win64
, win64_make
, win
, win_make
and aarch64
. Specify any combination of those, like -p linux,win64
, to choose the platforms your patch should be tested on. If you want to test all platforms use -p all
, if you want no platforms (which is only useful when you want only tools, see below) then use -p none
.
Unit tests (-u / --unittests)
The currently available test suites are bogo
, crmf
, chains
, cipher
, db
, ec
, fips
, gtest
, interop
, lowhash
, merge
, sdr
, smime
, tools
and ssl
. Specify any combination of those, like -u ec,gtest
, to choose the test suites to run with your patch. If you want to run all test suites use -u all
, if you want no tests use -u none
.
Tools (-t / --tools)
The currently available tools are clang-format
, scan-build
, hacl
, saw
and coverage
. Specify any combination of those, like -t clang-format,scan-build
, to choose the tools to run with your patch. If you want to run all tools use -t all
, if you want no tools use -t none
.
Extra builds (-e / --extra-builds)
Specify either all
or none
to enable or disable extra builds. The number and type of extra builds varies per platform.
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 D
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:
https://hg.mozilla.org/projects/nss/file/default/automation/taskcluster/graph/src/
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:
https://hg.mozilla.org/projects/nss/file/default/automation/taskcluster/graph/src/try_syntax.js
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.