Page tree

Have questions? Stuck? Please check our FAQ for some common questions and answers.

This wiki documents the current development version of ONOS (master). Refer to the Wiki Archives for documentation for all previous versions of ONOS.

Skip to end of metadata
Go to start of metadata

ONOS is built with Buck, an open-source build tool created by Facebook and inspired by Google. It is also in use by number of well-known projects, including all Facebook’s mobile apps, Gerrit, etc. By relying on explicit dependencies between targets and SHA hashes of files (rather than on timestamps), BUCK avoids unnecessary work by recognizing whether or not a target artifact requires a rebuild. This also helps to increase reproducibility of builds.

ONOS currently uses a modified version of Buck, which has been packaged with ONOS. Please use this version until our changes have been upstreamed and released as part of an official Buck release.

Building ONOS

To get the source code and build ONOS, all you need to do it run the following commands from Unix-like terminal (e.g. Linux, MacOS):

Release 1.14 Owl (Bazel build)

$bazel build onos

for more details please see the presentation (

Pre 1.14 command

$ONOS_ROOT/tools/build/onos-buck build onos --show-output

This will compile all source code assemble the installable onos.tar.gz, which is located in the buck-out directory. Note the --show-output option, which can be omitted, will display the path to this file.

Executing unit tests

To execute ONOS unit tests, including code Checkstyle validation, run the following command:

Release 1.14 Owl (Bazel build)

$bazel query 'tests(//...)' | xargs bazel test

Pre 1.14 command

$ONOS_ROOT/tools/build/onos-buck test
  • No labels