Debian Codegraph @

docs/developers.md

raw
1 Qpid Proton Developer Information
2 =================================
3
4 Development Environment
5 -----------------------
6
7 First you will need to set up your basic build environment with CMake and all
8 prerequisites (see the instructions in INSTALL) so that you can build the full
9 code base.
10
11 To setup shell variables for your development environment, you must source
12 the file config.sh from the CMake build directory.
13
14 $ cd build
15 $ source config.sh
16
17 This file sets the necessary environment variables for all supported
18 dynamic languages (Python and Ruby) and for running the tests.
19
20 Testing
21 -------
22
23 As a developer on Proton, it is a good idea to build and test with the
24 appropriate dependencies and settings in place so that the complete set of
25 language bindings and implementations are present.
26
27 ### Running tests
28
29 To test Proton you should use the CMake build.
30
31 By default the unit tests are run using the system's default Python
32 interpreter. However, Proton's Python language bindings support both
33 versions of the python language (Python 2.x and Python 3.x). These
34 bindings should be tested using both versions of the Python
35 interpreter. CMake makes this possible by automatically running the
36 Python unit tests under all versions of Python installed on the
37 system.
38
39 Developers can ensure that Proton remains compatible with both
40 versions of Python by installing the following prerequisites:
41
42 _Note: currently CMake only supports multi-Python testing in **Linux**
43 based environments. Non-Linux developers may skip the following two
44 steps._
45
46 1. Installing both Python2.x and Python3.x and their associated
47 development environments on your system. Most modern Linux
48 distributions support installing Python 2.x and Python 3.x in
49 parallel.
50
51 2. Install the **tox** Python testing tool, e.g. for older Fedora:
52
53 $ yum install python-tox
54
55 For newer Fedora:
56
57 $ dnf install python3-tox redhat-rpm-config
58
59 To run the tests, cd into your build directory and use the following commands:
60
61 # to run all the tests, summary mode
62 $ ctest
63
64 # to list the available testsuites
65 $ ctest -N
66
67 # to run a single testsuite, verbose output
68 $ ctest -V -R c-engine-tests
69
70 Additional packages required for testing the language bindings:
71
72 # ruby dependencies
73 $ yum install rubygem-minitest
74
75 # alternatively ruby depedencies on non-RPM based systems
76 $ gem install minitest
77
78 To run coverage reporting:
79
80 # install coverage tools
81 $ dnf install lcov
82 $ pip install coverage
83 $ gem install simplecov
84
85 $ cmake -DCMAKE_BUILD_TYPE=Coverage && make && ctest && make coverage
86 # Then browse to {CMAKE_BUILD_DIR}/coverage_results/html/index.html to see C/C++ coverage
87 # and to {CMAKE_BUILD_DIR}/ruby/coverage/index.html for Ruby coverage
88
89 Mailing list
90 ------------
91
92 Subscribe to the Qpid mailing lists using details at:
93
94 https://qpid.apache.org/discussion.html
95
96
97 Patches
98 -------
99
100 The best way to submit patches is to create a bug report or feature request
101 on the project's JIRA instance:
102
103 http://issues.apache.org/jira/browse/PROTON
104
105 You can attach any patch(es) to the report/request there, or create a Pull Request
106 on the project's GitHub mirror:
107
108 https://github.com/apache/qpid-proton
109
110 When creating a Pull Request, reference the associated JIRA by number
111 at the beginning of the commit message.