Chengyu Fan | eb0422c | 2015-03-04 16:34:14 -0700 | [diff] [blame] | 1 | Notes for ndn-atmos developers |
| 2 | ============================== |
| 3 | |
| 4 | Requirements |
| 5 | ------------ |
| 6 | |
| 7 | Contributions to ndn-atmos must be licensed under GPL 3.0 or compatible license. If you are |
| 8 | choosing GPL 3.0, please use the following license boilerplate in all `.hpp` and `.cpp` |
| 9 | files: |
| 10 | |
| 11 | Include the following license boilerplate into all `.hpp` and `.cpp` files: |
| 12 | |
| 13 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 14 | /** |
| 15 | * Copyright (c) [Year(s)], [Copyright Holder(s)]. |
| 16 | * |
| 17 | * This file is part of ndn-atmos. |
| 18 | * |
| 19 | * ndn-atmos is free software: you can redistribute it and/or modify it under the terms |
| 20 | * of the GNU General Public License as published by the Free Software Foundation, |
| 21 | * either version 3 of the License, or (at your option) any later version. |
| 22 | * |
| 23 | * ndn-atmos is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
| 24 | * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 25 | * PURPOSE. See the GNU General Public License for more details. |
| 26 | * |
| 27 | * You should have received a copy of the GNU General Public License along with |
| 28 | * ndn-atmos, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
| 29 | * |
| 30 | * See AUTHORS.md for complete list of ndn-atmos authors and contributors. |
| 31 | */ |
| 32 | |
| 33 | |
| 34 | Recommendations |
| 35 | --------------- |
| 36 | |
| 37 | ndn-atmos code is subject to NFD [code style] |
| 38 | (http://redmine.named-data.net/projects/nfd/wiki/CodeStyle). |
| 39 | |
| 40 | |
| 41 | Running unit-tests |
| 42 | ------------------ |
| 43 | |
| 44 | To run unit tests, ndn-atmos needs to be configured and build with unit test support: |
| 45 | |
| 46 | ./waf configure --with-tests |
| 47 | ./waf |
| 48 | |
| 49 | The simplest way to run tests, is just to run the compiled binary without any parameters: |
| 50 | |
| 51 | # Run ndn-atmos catalog unit tests |
| 52 | ./build/catalog/unit-tests |
| 53 | |
| 54 | However, [Boost.Test framework](http://www.boost.org/doc/libs/1_48_0/libs/test/doc/html/) |
| 55 | is very flexible and allows a number of run-time customization of what tests should be run. |
| 56 | For example, it is possible to choose to run only a specific test suite, only a specific |
| 57 | test case within a suite, or specific test cases within specific test suites. |
| 58 | |
| 59 | By default, Boost.Test framework will produce verbose output only when a test case fails. |
| 60 | If it is desired to see verbose output (result of each test assertion), add `-l all` |
| 61 | option to `./build/catalog/unit-tests` command. To see test progress, you can use `-l test_suite` |
| 62 | or `-p` to show progress bar. |
| 63 | |
| 64 | There are many more command line options available, information about |
| 65 | which can be obtained either from the command line using `--help` |
| 66 | switch, or online on [Boost.Test library](http://www.boost.org/doc/libs/1_48_0/libs/test/doc/html/) |
| 67 | website. |