Commit Graph

385 Commits

Author SHA1 Message Date
iphydf
ae6250c7af
Sort monolith.h according to ls(1): uppercase first. 2018-01-16 09:50:01 +00:00
Smoked Cheese
402664f58d
update rpm spec and use variables in cmake instead of hardcoded paths (#624) 2018-01-15 14:23:33 +03:00
iphydf
1eea3f0ab6
Fix some memory or file descriptor leaks in test code.
Also some missing return value checks for `fopen`.
2018-01-14 19:15:28 +00:00
Yuri
1e1efec34a
pkg-config .pc files: added .private versions of Libs and Required
To prevent top-level linking of all libraries.

Problem: ```pkg-config --libs toxcore``` returns all libraries that are
required by all libtox*.so libraries. This is wrong because for a
dynamically linked executable only top-level libraries need to be
supplied. ```pkg-config --libs --static toxcore``` should return all
libraries for the statically linked executable.

For example, the ToxBot https://github.com/JFreegman/ToxBot executable
uses pkg-config and is linked with the opus library, which is wrong.

Based on #533.
2018-01-13 23:04:23 +00:00
iphydf
2fbed5b4c5
Move Networking_Core struct into the .c file.
To make it an abstract type everywhere except in network.c.
2018-01-11 11:59:14 +00:00
iphydf
c84daff541
Increase test retries to 10 (basically infinite).
This basically means: try until you run out of time (50 minutes on
Travis). On Linux, we really want the tests to pass, so there is no point
in limiting the number of retries. On windows, we don't retry, on FreeBSD
it's limited to 1.
2018-01-10 18:57:42 +00:00
iphydf
54ec162558
Fix formatting in some C files.
Also replace &(x) with &x for consistency.
2018-01-10 18:57:37 +00:00
iphydf
6c523f9f48
Disable asan, since it seems to break on travis.
But enable it on circle ci, so at least we have one asan build.
2018-01-10 18:39:09 +00:00
iphydf
d6047692a5
Bump toxcore version to 0.2.0.
We're not releasing yet, but projects preparing for the release will want
to build against this version in master.
2018-01-08 19:36:00 +00:00
iphydf
2c8fb05f6e Remove deprecated ToxDNS
Based on #331.

Fixes #42.
2017-12-29 00:32:18 +00:00
iphydf
f2b6090eca Generate only one large library "libtoxcore".
This library contains all the code for the old libtoxcore, libtoxav,
libtoxdns, and libtoxencryptsave. The build for toxav is still optional,
and disabling it causes libtoxcore to simply not contain those symbols
and the pkg-config file to not include opus and vpx as dependencies.
2017-12-28 23:01:41 +00:00
Maxim Biro
57115f0e75 Test tox-bootstrapd Docker container on Travis 2017-12-16 14:41:01 -05:00
Maxim Biro
418a304c0e Update tox-bootstrapd Dockerfile 2017-12-16 03:14:23 -05:00
Maxim Biro
92c4108dba Separate FreeBSD Travis build in 2 stages 2017-12-12 20:20:52 -05:00
Robin Lindén
de276762a9
Lift libconfig to v1.7.1 2017-12-12 22:15:56 +01:00
Diadlo
b39cc55d37
Add support of IPv6 disabling 2017-11-15 15:22:19 +03:00
Robin Lindén
c49a6e7f5b
Fix OS X Travis. 2017-10-25 23:05:02 +02:00
Maxim Biro
8f19c926c0 Run tests only once on FreeBSD due to Travis timeout 2017-08-22 04:10:45 -04:00
Maxim Biro
346d80207f Fix FreeBSD failing on Travis after update 2017-08-22 04:10:45 -04:00
Maxim Biro
7837659eda Update FreeBSD version on Travis to 11.1 2017-08-22 04:10:45 -04:00
Maxim Biro
1aa75e1705 Update FreeBSD image on new tag
Instead of updating it in every Travis build.
2017-08-22 04:10:45 -04:00
Maxim Biro
e4b74b0f3e Allow FreeBSD tests to fail 2017-08-22 04:08:22 -04:00
Maxim Biro
f495cf1a8d Test toxcore on FreeBSD on Travis 2017-08-22 04:08:22 -04:00
iphydf
8479b82431
Fold hstox tests into the general linux test.
We can run the spectest from within cmake, so we should exercise that.
2017-06-05 19:55:32 +00:00
Maxim Biro
b0aec02225 Split daemon's logging backends in separate modules 2017-06-04 16:07:03 -04:00
iphydf
1e8fa85aad
Add a monolith_test that includes all toxcore sources.
This requires that every symbol, even if static (file-scope), is unique.
The idea is that we can easily run "whole" program static analysis on
programs that include monolith.h ("whole" is in quotes, as we don't
include dependencies like libsodium in this static analysis).
2017-06-04 17:48:23 +00:00
iphydf
b782ef5d8e
Fix formatting and spelling in version-sync script.
Also some minor reformatting and fixes to the hstox sut driver.
2017-06-04 12:07:43 +00:00
iphydf
d4be41a3ad
Use new encoding of Maybe in msgpack results.
The new encoding is `0` for `Nothing` and `[1, x]` for `Just x`.
2017-06-03 23:32:46 +00:00
Maxim Biro
f6285d7a60 Fix markdown formatting 2017-04-19 20:22:28 -04:00
iphydf
c780d25e3e
Retry autotools tests the same way as cmake tests. 2017-03-26 19:03:43 +00:00
iphydf
9ff60ceb31
Reduce ctest timeout to 2 minutes from 5 minutes.
Fixes #411.
2017-03-26 19:03:25 +00:00
Diadlo
50c526e1a5
Move c_sleep to helpers.h and misc_tools.h
Also fix a mistake with forgotten braces around parameter
2017-03-25 20:40:34 +03:00
Maxim Biro
10deb2ab5f Fix Travis always succeeding despite tests failing 2017-03-12 08:34:53 -04:00
Maxim Biro
aaca8251c8 Remove dependency on strings.h 2017-03-01 20:43:30 -05:00
Diadlo
b19a9e5464
Add part of platform-independent network API implementation
socket      -> net_socket
htons       -> net_htons
htonl       -> net_htonl
connect     -> net_connect
sendto      -> net_sendto_ip4
getaddrinfo -> net_getipport
sa_family_t -> Family
2017-02-26 23:16:16 +03:00
iphydf
6ae33c16cf
Add VLA compatibility macro for C89-ish compilers. 2017-01-28 20:49:12 +00:00
iphydf
f58dbe2503
Limit number of retries to 3. 2017-01-19 15:58:03 +00:00
iphydf
a74ab7cd1a
Make Travis tests slightly more robust by re-running them. 2017-01-19 12:35:22 +00:00
iphydf
8f96ca6d86
Update license headers and remove redundant file name comment.
"All rights reserved" was incorrect. The project was licensed under GPL3,
which means a lot of rights are licensed to everybody in the world, i.e.
not reserved to the "Tox Project".
2017-01-19 00:01:44 +00:00
iphydf
6d6a4e1e3a
Add tutorial and "danger: experimental" banner to README. 2017-01-18 18:13:31 +00:00
iphydf
a22f5e7c6f
Clarify how the autotools build is done on Travis. 2017-01-18 10:56:16 +00:00
Carsten Brandt
86e67f805a decouple version-sync script from cmake 2017-01-18 11:20:07 +01:00
Carsten Brandt
3520eee05d SO versions for cmake and libtool
this updates the version-sync script to generate proper SO versions
which will be used by cmake and libtool to create version symlinks
on the system when a library is installed as well as setting the SO
version in the binary.

To see what this does, you have to configure tox with a prefix:

    ./configure --prefix=/tmp/tox-with-libtool
    mkdir cbuild && cd cbuild && cmake -DCMAKE_INSTALL_PREFIX=/tmp/tox-with-cmake ..

Then run `make && make install`.

in both instances you should see the following installed in `lib/`:

    libtoxcore.so -> libtoxcore.so.1.4.0
    libtoxcore.so.1 -> libtoxcore.so.1.4.0
    libtoxcore.so.1.4.0

inside the binary the soname should be the one with .1 and it should not
contain the full version:

    $ objdump -p libtoxcore.so.1.4.0 | grep SONAME
      SONAME               libtoxcore.so.1
2017-01-18 11:20:07 +01:00
iphydf
20be9a8c5b
Fix NaCl build: tar was called incorrectly.
tar -jxf expects a file.
2017-01-08 16:37:56 +00:00
iphydf
8f1dbaa2c5
Set up autotools build to build against vanilla NaCl.
Fixes #363.
2017-01-08 15:27:26 +00:00
iphydf
bec03de2ba
Run windows tests but ignore their failures.
This way we can at least see what fails in which way.
2017-01-07 22:59:25 +00:00
David Zero
8ef1f35ca7 Revert "Revert "Portability fixes""
This reverts commit 59e2a844f0, and
defines _DARWIN_C_SOURCE in toxcore/network.c
2017-01-06 04:20:00 -08:00
iphydf
08cd61387e
Add an OSX build that doesn't run tests.
This one is not allowed to fail and ensures that toxcore can at least be
built for OSX.
2017-01-06 00:40:29 +00:00
endoffile78
59e2a844f0 Revert "Portability fixes"
This reverts commit f3469070fe.
2017-01-05 15:16:56 -06:00
iphydf
0a61d11085
Test a few cmake option combinations before the build.
This takes a few seconds but allows us to cover cases that aren't checked
often.
2017-01-05 12:34:52 +00:00