Project

General

Profile

Contributing Code » History » Version 3

Davide Pesavento, 03/03/2017 05:46 PM
Mention unit-tests-tools

1 1 Alex Afanasyev
Contributing Code
2
=================
3
4
NDN codebase is open-source and we welcome and encourage contributions from everybody.
5
In order to ensure design and code quality, we have established a process that includes code review and continuous integration checks on a number of supported platforms.
6
The following summarizes the process how to contribute to NDN projects (NFD, ndn-cxx, ndn-tools, NFD-android, NLSR, ndnSIM, ChronoSync, ChronoChat, ndn-group-encrypt):
7
8
- To inform NDN team about problems or to suggest new features, create issue in the corresponding project on [NDN redmine](http://redmine.named-data.net)
9
10
- All code submissions should go to [our code review system](http://gerrit.named-data.net)
11
12
### Code Review
13
14
The patches submitted for the code review are automatically checked for:
15
16
- successful compilation
17
- successful run of unit tests
18
- no errors produced while creating API (doxygen) documentation
19
20
  We will also accept issues and pull requests on GitHub.
21
  However, this may incur additional delay in merging the submitted code, as one of NDN developers will need to submit code to code review process on your behalf.
22
23
### Recommended Checks Before Patch Submission
24
25
In order to facilitate code review process, please perform the following tests before submitting patches for code review:
26
27
#### Check that code and all unit tests compile.  For most of our project, the following is the recommended way to configure and build project
28
29
    ./waf configure --debug --with-tests
30
    ./waf
31
32
#### Check that unit tests do not fail.  Refer to project's documentation on how to run unit tests.
33
34 3 Davide Pesavento
NFD has 4 test suites:
35 1 Alex Afanasyev
36
     ./build/unit-tests-core
37
     ./build/unit-tests-daemon
38
     ./build/unit-tests-rib
39 3 Davide Pesavento
     ./build/unit-tests-tools
40 1 Alex Afanasyev
41 3 Davide Pesavento
ndn-cxx and most other projects have one test suite:
42 1 Alex Afanasyev
43
     ./build/unit-tests
44
45
#### Check that there are no errors in API (doxygen) documentation
46
47
To check for API documentation, doxygen needs to be installed.  To build documentation, run
48
49
    ./waf doxygen
50
51
All warnings produced by this command must be fixed in order for the automatic continuous integration checks to succeed.
52 2 Alex Afanasyev
53
**Note** that `./waf doxygen` will not rebuild documentation if there were no changes in source files.  To rebuild documentation without changing source files, run `./waf clean` before running `./waf doxygen`