Ensure the prerequisite tools are installed first
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):
Code Block |
---|
language | bash |
---|
title | Build ONOS 1.14 or newer |
---|
|
$cd$ cd $ONOS_ROOT
$ bazel build onos
|
...
Code Block |
---|
language | bash |
---|
title | Build ONOS 1.13 or older |
---|
|
$ $ONOS_ROOT/tools/build/onos-buck build onos --show-output |
...
Code Block |
---|
language | bash |
---|
title | Run unit tests for ONOS 1.14 or newer |
---|
|
$cd$ cd $ONOS_ROOT
$ bazel query 'tests(//...)' | xargs bazel test |
...
Code Block |
---|
language | bash |
---|
title | Run unit test for ONOS 1.13 or older |
---|
|
$ $ONOS_ROOT/tools/build/onos-buck test |