- We use coveralls.io to report on test coverage and avoid getting below a
certain threshold. The threshold is currently 60%, but we will be increasing
it when it stabilises.
- We use gcc/clang -ftest-coverage and gcov to measure C test coverage.
- We switched to container based Travis build infrastructure, which has the
advantage of faster boot times[1] (1-6s vs. 20-52s). The trusty beta supports
caching, but the longer boot times make it an unattractive target.
- We now need to build more dependencies ourselves and cache the result. We
still fetch what we can (currently opam, libvpx, and check) from apt.
[1] https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments
Reduces the running time from about 8 minutes to about 5, as it uses
packaged libraries instead of building them. This is possible because
of the Ubuntu Trusty becoming available on Travis. The new check that
is in Trusty has different behaviour than the previously user version
of it -- it doesn't output the detailed result of tests. To fix this
we cat a file where this detailed result is stored.
supported options:
--with-dependency-search=DIR will tell configure to look for various
dependencies in DIR/include and DIR/lib
Alternatively you can also specify libsodium header and libs location
with --with-libsodium-headers and --with-libsodium-libs if it is
installed elsewhere.
Ncurses and libconfig are handled via the default pkg-config way, see
./configure --help=short for detailed information.
The tox library is compiled as libtoxcore in shared and static variants,
public headers are installed to ${prefix}/include/tox
A pkg-config libtoxcore.pc configuration file is provided.
Use ./configure --help for a full list of configure options or
./configure --help=short for the options that I added.
To generate the configure script after pulling from git use:
autoreconf -i
To generate a release tarball use:
make dist
Unit tests are handled by the libcheck library integration that is provided
by autotools, use:
make check
to compile and run the tests.
Unit tests are currently optional, i.e. - if the check library is not
found on the system, then tests will be disabled. Same goes for nTox and
DHT bootstrap daemon - they will be enabled or disabled depending on the
availability of ncurses (for nTox) or libconfig (for DHT bootstrap
daemon).
The above can be also tuned by:
--enable-tests / --disable-tests
--enable-ntox / --disable-ntox
--enable-dht-bootstrap-daemon / --disable-dht-bootstrap-daemon
Added crypto to the DHT communications.
This defeats completely the first attack mentioned in
docs/DHT_hardening.
Also updated the build system to build the latest test (it links it with
libsodium)