...
Code Block |
---|
language | bash |
---|
title | Download ONOS code & Build ONOS |
---|
|
git clone https://gerrit.onosproject.org/onos
cd onos
export ONOS_ROOT=$(pwd)
source $ONOS_ROOT/tools/dev/bash_profile
bazel build onos # or use 'op' alias after you 'source $PWD/tools/dev/bash_profile' |
This will compile all source code assemble the installable onos.tar.gz
, which is located in the bazel-bin
directory.
...
Code Block |
---|
language | bash |
---|
title | Execute ONOS unit tests |
---|
|
bazel query '\''tests(//...)'\'' | xargs bazel test # or use 'ot' alialias |
Code Block |
---|
language | bash |
---|
title | Import ONOS into Intellij IDEA |
---|
|
1. File → Setting → Plugin, install the Bazel plugin
2. restart Intellij IDEA
3. File → Import Bazel Project...
4. choose $ONOS_ROOT for Workspace
5. choose "Generate from BUILD file", and $ONOS_ROOT/BUILD
6. check and click Finish |
...