diff options
27 files changed, 255 insertions, 301 deletions
diff --git a/.travis.yml b/.travis.yml index 1b1a1606..1123915a 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -17,7 +17,6 @@ matrix: | |||
17 | - avsm | 17 | - avsm |
18 | packages: | 18 | packages: |
19 | - aspcud # For Opam | 19 | - aspcud # For Opam |
20 | - check # For tests. | ||
21 | - libconfig-dev # For tox-bootstrapd. | 20 | - libconfig-dev # For tox-bootstrapd. |
22 | - libcv-dev # For av_test. | 21 | - libcv-dev # For av_test. |
23 | - libhighgui-dev # For av_test. | 22 | - libhighgui-dev # For av_test. |
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0dc1931b..9450ab74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -223,6 +223,7 @@ add_submodule(toxcore toxnetwork | |||
223 | toxcore/util.h) | 223 | toxcore/util.h) |
224 | target_link_modules(toxnetwork toxcrypto) | 224 | target_link_modules(toxnetwork toxcrypto) |
225 | 225 | ||
226 | message("CMAKE_THREAD_LIBS_INIT: ${CMAKE_THREAD_LIBS_INIT}") | ||
226 | if(CMAKE_THREAD_LIBS_INIT) | 227 | if(CMAKE_THREAD_LIBS_INIT) |
227 | target_link_modules(toxnetwork ${CMAKE_THREAD_LIBS_INIT}) | 228 | target_link_modules(toxnetwork ${CMAKE_THREAD_LIBS_INIT}) |
228 | set(toxnetwork_PKGCONFIG_LIBS ${toxnetwork_PKGCONFIG_LIBS} ${CMAKE_THREAD_LIBS_INIT}) | 229 | set(toxnetwork_PKGCONFIG_LIBS ${toxnetwork_PKGCONFIG_LIBS} ${CMAKE_THREAD_LIBS_INIT}) |
@@ -497,14 +498,13 @@ elseif(FORMAT_TEST) | |||
497 | endif() | 498 | endif() |
498 | 499 | ||
499 | function(auto_test target) | 500 | function(auto_test target) |
500 | if(CHECK_FOUND AND NOT (MSVC AND ARGV1 STREQUAL "MSVC_DONT_BUILD")) | 501 | if(NOT (MSVC AND ARGV1 STREQUAL "MSVC_DONT_BUILD")) |
501 | add_executable(auto_${target}_test auto_tests/${target}_test.c) | 502 | add_executable(auto_${target}_test auto_tests/${target}_test.c) |
502 | target_link_modules(auto_${target}_test | 503 | target_link_modules(auto_${target}_test |
503 | toxcore | 504 | toxcore |
504 | toxcrypto | 505 | toxcrypto |
505 | toxmessenger | 506 | toxmessenger |
506 | toxnetcrypto | 507 | toxnetcrypto) |
507 | ${CHECK_LIBRARIES}) | ||
508 | if(NOT ARGV1 STREQUAL "DONT_RUN") | 508 | if(NOT ARGV1 STREQUAL "DONT_RUN") |
509 | add_test(NAME ${target} COMMAND ${CROSSCOMPILING_EMULATOR} auto_${target}_test) | 509 | add_test(NAME ${target} COMMAND ${CROSSCOMPILING_EMULATOR} auto_${target}_test) |
510 | set_tests_properties(${target} PROPERTIES TIMEOUT "${TEST_TIMEOUT_SECONDS}") | 510 | set_tests_properties(${target} PROPERTIES TIMEOUT "${TEST_TIMEOUT_SECONDS}") |
@@ -512,17 +512,16 @@ function(auto_test target) | |||
512 | endif() | 512 | endif() |
513 | endfunction() | 513 | endfunction() |
514 | 514 | ||
515 | if(BUILD_TOXAV AND CHECK_FOUND) | 515 | if(BUILD_TOXAV) |
516 | add_definitions(-D__STDC_LIMIT_MACROS=1) | 516 | add_definitions(-D__STDC_LIMIT_MACROS=1) |
517 | add_executable(auto_monolith_test | 517 | add_executable(auto_monolith_test |
518 | auto_tests/monolith_test.cpp | 518 | auto_tests/monolith_test.cpp |
519 | ${ANDROID_CPU_FEATURES}) | 519 | ${ANDROID_CPU_FEATURES}) |
520 | target_link_modules(auto_monolith_test | 520 | target_link_modules(auto_monolith_test |
521 | ${CHECK_LIBRARIES} | 521 | ${toxcore_PKGCONFIG_LIBS} |
522 | ${LIBSODIUM_LIBRARIES} | 522 | ${LIBSODIUM_LIBRARIES} |
523 | ${OPUS_LIBRARIES} | 523 | ${OPUS_LIBRARIES} |
524 | ${VPX_LIBRARIES} | 524 | ${VPX_LIBRARIES}) |
525 | ${toxcore_PKGCONFIG_LIBS}) | ||
526 | add_test(NAME monolith COMMAND ${CROSSCOMPILING_EMULATOR} auto_monolith_test) | 525 | add_test(NAME monolith COMMAND ${CROSSCOMPILING_EMULATOR} auto_monolith_test) |
527 | 526 | ||
528 | if(ANDROID_CPU_FEATURES) | 527 | if(ANDROID_CPU_FEATURES) |
@@ -181,7 +181,6 @@ Build the container image based on the Dockerfile. The following options are ava | |||
181 | | SUPPORT_ARCH_i686 | Support building 32-bit toxcore. | "true" or "false" (case sensitive). | true | | 181 | | SUPPORT_ARCH_i686 | Support building 32-bit toxcore. | "true" or "false" (case sensitive). | true | |
182 | | SUPPORT_ARCH_x86_64 | Support building 64-bit toxcore. | "true" or "false" (case sensitive). | true | | 182 | | SUPPORT_ARCH_x86_64 | Support building 64-bit toxcore. | "true" or "false" (case sensitive). | true | |
183 | | SUPPORT_TEST | Support running toxcore automated tests. | "true" or "false" (case sensitive). | false | | 183 | | SUPPORT_TEST | Support running toxcore automated tests. | "true" or "false" (case sensitive). | false | |
184 | | VERSION_CHECK | Version of libcheck. Needed only when SUPPORT_TEST is enabled. | Git branch name. | 0.12.0 | | ||
185 | | VERSION_OPUS | Version of libopus to build toxcore with. | Git branch name. | v1.2.1 | | 184 | | VERSION_OPUS | Version of libopus to build toxcore with. | Git branch name. | v1.2.1 | |
186 | | VERSION_SODIUM | Version of libsodium to build toxcore with. | Git branch name. | 1.0.16 | | 185 | | VERSION_SODIUM | Version of libsodium to build toxcore with. | Git branch name. | 1.0.16 | |
187 | | VERSION_VPX | Version of libvpx to build toxcore with. | Git branch name. | v1.6.1 | | 186 | | VERSION_VPX | Version of libvpx to build toxcore with. | Git branch name. | v1.6.1 | |
@@ -192,7 +191,6 @@ Example of building a container image with options | |||
192 | cd other/docker/windows | 191 | cd other/docker/windows |
193 | docker build \ | 192 | docker build \ |
194 | --build-arg SUPPORT_TEST=true \ | 193 | --build-arg SUPPORT_TEST=true \ |
195 | --build-arg VERSION_CHECK=0.11.0 \ | ||
196 | -t toxcore \ | 194 | -t toxcore \ |
197 | . | 195 | . |
198 | ``` | 196 | ``` |
diff --git a/appveyor.yml b/appveyor.yml index 66453ccf..925122fe 100644 --- a/appveyor.yml +++ b/appveyor.yml | |||
@@ -7,11 +7,6 @@ install: | |||
7 | - choco install curl | 7 | - choco install curl |
8 | - refreshenv | 8 | - refreshenv |
9 | - if not exist %APPDATA%\downloads mkdir %APPDATA%\downloads | 9 | - if not exist %APPDATA%\downloads mkdir %APPDATA%\downloads |
10 | # libcheck | ||
11 | - if not exist %APPDATA%\downloads\check.zip curl -L https://github.com/libcheck/check/archive/0.11.0.zip -o %APPDATA%\downloads\check.zip | ||
12 | - unzip %APPDATA%\downloads\check.zip && cd check-0.11.0 | ||
13 | - if not exist "%PROGRAMFILES%\check\include\check.h" cmake . && msbuild INSTALL.vcxproj | ||
14 | - cd .. | ||
15 | # libsodium | 10 | # libsodium |
16 | - mkdir libsodium && cd libsodium | 11 | - mkdir libsodium && cd libsodium |
17 | - if not exist %APPDATA%\downloads\libsodium.zip curl -L https://download.libsodium.org/libsodium/releases/libsodium-1.0.12-msvc.zip -o %APPDATA%\downloads\libsodium.zip | 12 | - if not exist %APPDATA%\downloads\libsodium.zip curl -L https://download.libsodium.org/libsodium/releases/libsodium-1.0.12-msvc.zip -o %APPDATA%\downloads\libsodium.zip |
diff --git a/auto_tests/BUILD.bazel b/auto_tests/BUILD.bazel index ea3682b8..88951f97 100644 --- a/auto_tests/BUILD.bazel +++ b/auto_tests/BUILD.bazel | |||
@@ -22,7 +22,6 @@ cc_library( | |||
22 | "//c-toxcore/toxav", | 22 | "//c-toxcore/toxav", |
23 | "//c-toxcore/toxcore", | 23 | "//c-toxcore/toxcore", |
24 | "//c-toxcore/toxencryptsave", | 24 | "//c-toxcore/toxencryptsave", |
25 | "@check", | ||
26 | ], | 25 | ], |
27 | ) for src in glob(["*_test.c"])] | 26 | ) for src in glob(["*_test.c"])] |
28 | 27 | ||
@@ -47,6 +46,5 @@ cc_test( | |||
47 | ":monolith", | 46 | ":monolith", |
48 | "//c-toxcore/other:monolith", | 47 | "//c-toxcore/other:monolith", |
49 | "//c-toxcore/testing:misc_tools", | 48 | "//c-toxcore/testing:misc_tools", |
50 | "@check", | ||
51 | ], | 49 | ], |
52 | ) | 50 | ) |
diff --git a/auto_tests/Makefile.inc b/auto_tests/Makefile.inc index 536b08c5..6957262a 100644 --- a/auto_tests/Makefile.inc +++ b/auto_tests/Makefile.inc | |||
@@ -5,8 +5,7 @@ check_PROGRAMS = encryptsave_test messenger_autotest crypto_test network_test on | |||
5 | 5 | ||
6 | AUTOTEST_CFLAGS = \ | 6 | AUTOTEST_CFLAGS = \ |
7 | $(LIBSODIUM_CFLAGS) \ | 7 | $(LIBSODIUM_CFLAGS) \ |
8 | $(NACL_CFLAGS) \ | 8 | $(NACL_CFLAGS) |
9 | $(CHECK_CFLAGS) | ||
10 | 9 | ||
11 | AUTOTEST_LDADD = \ | 10 | AUTOTEST_LDADD = \ |
12 | $(LIBSODIUM_LDFLAGS) \ | 11 | $(LIBSODIUM_LDFLAGS) \ |
@@ -15,8 +14,7 @@ AUTOTEST_LDADD = \ | |||
15 | libtoxencryptsave.la \ | 14 | libtoxencryptsave.la \ |
16 | $(LIBSODIUM_LIBS) \ | 15 | $(LIBSODIUM_LIBS) \ |
17 | $(NACL_OBJECTS) \ | 16 | $(NACL_OBJECTS) \ |
18 | $(NACL_LIBS) \ | 17 | $(NACL_LIBS) |
19 | $(CHECK_LIBS) | ||
20 | 18 | ||
21 | 19 | ||
22 | 20 | ||
diff --git a/auto_tests/check_compat.h b/auto_tests/check_compat.h index e4fde89f..755dea81 100644 --- a/auto_tests/check_compat.h +++ b/auto_tests/check_compat.h | |||
@@ -1,8 +1,66 @@ | |||
1 | #ifdef _MSC_VER | 1 | #ifndef CHECK_COMPAT_H |
2 | #define pid_t int | 2 | #define CHECK_COMPAT_H |
3 | // #include <libcompat.h> | 3 | |
4 | #endif | 4 | #include "../toxcore/ccompat.h" |
5 | #include <check.h> | 5 | |
6 | #ifdef _MSC_VER | 6 | #include <stdbool.h> |
7 | #undef pid_t | 7 | #include <stdio.h> |
8 | #endif | 8 | |
9 | #define START_TEST(name) static void name(void) | ||
10 | #define END_TEST | ||
11 | |||
12 | #define DEFTESTCASE(NAME) test_##NAME() | ||
13 | #define DEFTESTCASE_SLOW(NAME, TIMEOUT) test_##NAME() | ||
14 | |||
15 | typedef struct Suite Suite; | ||
16 | typedef struct SRunner SRunner; | ||
17 | enum SRunMode { CK_NORMAL }; | ||
18 | |||
19 | Suite *suite_create(const char *title) | ||
20 | { | ||
21 | printf("Running test suite: %s\n", title); | ||
22 | return nullptr; | ||
23 | } | ||
24 | |||
25 | SRunner *srunner_create(Suite *s) | ||
26 | { | ||
27 | return nullptr; | ||
28 | } | ||
29 | |||
30 | void srunner_free(SRunner *s) | ||
31 | { | ||
32 | } | ||
33 | |||
34 | void srunner_run_all(SRunner *r, int mode) | ||
35 | { | ||
36 | } | ||
37 | |||
38 | int srunner_ntests_failed(SRunner *r) | ||
39 | { | ||
40 | return 0; | ||
41 | } | ||
42 | |||
43 | #define ck_assert(ok) do { \ | ||
44 | if (!(ok)) { \ | ||
45 | fprintf(stderr, "%s:%d: failed `%s'\n", __FILE__, __LINE__, #ok); \ | ||
46 | exit(EXIT_FAILURE); \ | ||
47 | } \ | ||
48 | } while (0) | ||
49 | |||
50 | #define ck_assert_msg(ok, ...) do { \ | ||
51 | if (!(ok)) { \ | ||
52 | fprintf(stderr, "%s:%d: failed `%s': ", __FILE__, __LINE__, #ok); \ | ||
53 | fprintf(stderr, __VA_ARGS__); \ | ||
54 | fprintf(stderr, "\n"); \ | ||
55 | exit(EXIT_FAILURE); \ | ||
56 | } \ | ||
57 | } while (0) | ||
58 | |||
59 | #define ck_abort_msg(...) do { \ | ||
60 | fprintf(stderr, "%s:%d: ", __FILE__, __LINE__); \ | ||
61 | fprintf(stderr, __VA_ARGS__); \ | ||
62 | fprintf(stderr, "\n"); \ | ||
63 | exit(EXIT_FAILURE); \ | ||
64 | } while (0) | ||
65 | |||
66 | #endif // CHECK_COMPAT_H | ||
diff --git a/auto_tests/dht_test.c b/auto_tests/dht_test.c index 227b43f7..8e735dbd 100644 --- a/auto_tests/dht_test.c +++ b/auto_tests/dht_test.c | |||
@@ -684,7 +684,7 @@ START_TEST(test_dht_create_packet) | |||
684 | ck_assert_msg(pkt[0] == NET_PACKET_GET_NODES, "Malformed packet."); | 684 | ck_assert_msg(pkt[0] == NET_PACKET_GET_NODES, "Malformed packet."); |
685 | ck_assert_msg(memcmp(pkt + 1, key, CRYPTO_SYMMETRIC_KEY_SIZE) == 0, "Malformed packet."); | 685 | ck_assert_msg(memcmp(pkt + 1, key, CRYPTO_SYMMETRIC_KEY_SIZE) == 0, "Malformed packet."); |
686 | ck_assert_msg(length == 1 + CRYPTO_PUBLIC_KEY_SIZE + CRYPTO_NONCE_SIZE + sizeof(plain) + CRYPTO_MAC_SIZE, | 686 | ck_assert_msg(length == 1 + CRYPTO_PUBLIC_KEY_SIZE + CRYPTO_NONCE_SIZE + sizeof(plain) + CRYPTO_MAC_SIZE, |
687 | "Invalid size. Should be %d got %d", sizeof(pkt), length); | 687 | "Invalid size. Should be %u got %d", (unsigned)sizeof(pkt), length); |
688 | 688 | ||
689 | printf("Create Packet Successful!\n"); | 689 | printf("Create Packet Successful!\n"); |
690 | } | 690 | } |
diff --git a/auto_tests/helpers.h b/auto_tests/helpers.h index 7b6146a4..ac58684d 100644 --- a/auto_tests/helpers.h +++ b/auto_tests/helpers.h | |||
@@ -17,15 +17,6 @@ | |||
17 | #define c_sleep(x) usleep(1000 * (x)) | 17 | #define c_sleep(x) usleep(1000 * (x)) |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | #define DEFTESTCASE(NAME) \ | ||
21 | TCase *tc_##NAME = tcase_create(#NAME); \ | ||
22 | tcase_add_test(tc_##NAME, test_##NAME); \ | ||
23 | suite_add_tcase(s, tc_##NAME) | ||
24 | |||
25 | #define DEFTESTCASE_SLOW(NAME, TIMEOUT) \ | ||
26 | DEFTESTCASE(NAME); \ | ||
27 | tcase_set_timeout(tc_##NAME, TIMEOUT) | ||
28 | |||
29 | static const char *tox_log_level_name(TOX_LOG_LEVEL level) | 20 | static const char *tox_log_level_name(TOX_LOG_LEVEL level) |
30 | { | 21 | { |
31 | switch (level) { | 22 | switch (level) { |
diff --git a/auto_tests/messenger_test.c b/auto_tests/messenger_test.c index 34de6543..de5aa7dd 100644 --- a/auto_tests/messenger_test.c +++ b/auto_tests/messenger_test.c | |||
@@ -249,8 +249,8 @@ START_TEST(test_dht_state_saveloadsave) | |||
249 | DHT_save(m->dht, buffer + extra); | 249 | DHT_save(m->dht, buffer + extra); |
250 | 250 | ||
251 | for (i = 0; i < extra; i++) { | 251 | for (i = 0; i < extra; i++) { |
252 | ck_assert_msg(buffer[i] == 0xCD, "Buffer underwritten from DHT_save() @%u", i); | 252 | ck_assert_msg(buffer[i] == 0xCD, "Buffer underwritten from DHT_save() @%u", (unsigned)i); |
253 | ck_assert_msg(buffer[extra + size + i] == 0xCD, "Buffer overwritten from DHT_save() @%u", i); | 253 | ck_assert_msg(buffer[extra + size + i] == 0xCD, "Buffer overwritten from DHT_save() @%u", (unsigned)i); |
254 | } | 254 | } |
255 | 255 | ||
256 | int res = DHT_load(m->dht, buffer + extra, size); | 256 | int res = DHT_load(m->dht, buffer + extra, size); |
@@ -263,11 +263,12 @@ START_TEST(test_dht_state_saveloadsave) | |||
263 | uint8_t *ptr = buffer + extra + offset; | 263 | uint8_t *ptr = buffer + extra + offset; |
264 | sprintf(msg, "Failed to load back stored buffer: 0x%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx @%zu/%zu, code %d", | 264 | sprintf(msg, "Failed to load back stored buffer: 0x%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx @%zu/%zu, code %d", |
265 | ptr[-2], ptr[-1], ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], offset, size, res & 0x0F); | 265 | ptr[-2], ptr[-1], ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], offset, size, res & 0x0F); |
266 | ck_assert_msg(res == 0, msg); | 266 | ck_assert_msg(res == 0, "%s", msg); |
267 | } | 267 | } |
268 | 268 | ||
269 | size_t size2 = DHT_size(m->dht); | 269 | size_t size2 = DHT_size(m->dht); |
270 | ck_assert_msg(size == size2, "Messenger \"grew\" in size from a store/load cycle: %u -> %u", size, size2); | 270 | ck_assert_msg(size == size2, "Messenger \"grew\" in size from a store/load cycle: %u -> %u", (unsigned)size, |
271 | (unsigned)size2); | ||
271 | 272 | ||
272 | VLA(uint8_t, buffer2, size2); | 273 | VLA(uint8_t, buffer2, size2); |
273 | DHT_save(m->dht, buffer2); | 274 | DHT_save(m->dht, buffer2); |
@@ -291,8 +292,8 @@ START_TEST(test_messenger_state_saveloadsave) | |||
291 | messenger_save(m, buffer + extra); | 292 | messenger_save(m, buffer + extra); |
292 | 293 | ||
293 | for (i = 0; i < extra; i++) { | 294 | for (i = 0; i < extra; i++) { |
294 | ck_assert_msg(buffer[i] == 0xCD, "Buffer underwritten from messenger_save() @%u", i); | 295 | ck_assert_msg(buffer[i] == 0xCD, "Buffer underwritten from messenger_save() @%u", (unsigned)i); |
295 | ck_assert_msg(buffer[extra + size + i] == 0xCD, "Buffer overwritten from messenger_save() @%u", i); | 296 | ck_assert_msg(buffer[extra + size + i] == 0xCD, "Buffer overwritten from messenger_save() @%u", (unsigned)i); |
296 | } | 297 | } |
297 | 298 | ||
298 | int res = messenger_load(m, buffer + extra, size); | 299 | int res = messenger_load(m, buffer + extra, size); |
@@ -305,11 +306,12 @@ START_TEST(test_messenger_state_saveloadsave) | |||
305 | uint8_t *ptr = buffer + extra + offset; | 306 | uint8_t *ptr = buffer + extra + offset; |
306 | sprintf(msg, "Failed to load back stored buffer: 0x%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx @%zu/%zu, code %d", | 307 | sprintf(msg, "Failed to load back stored buffer: 0x%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx @%zu/%zu, code %d", |
307 | ptr[-2], ptr[-1], ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], offset, size, res & 0x0F); | 308 | ptr[-2], ptr[-1], ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], offset, size, res & 0x0F); |
308 | ck_assert_msg(res == 0, msg); | 309 | ck_assert_msg(res == 0, "%s", msg); |
309 | } | 310 | } |
310 | 311 | ||
311 | size_t size2 = messenger_size(m); | 312 | size_t size2 = messenger_size(m); |
312 | ck_assert_msg(size == size2, "Messenger \"grew\" in size from a store/load cycle: %u -> %u", size, size2); | 313 | ck_assert_msg(size == size2, "Messenger \"grew\" in size from a store/load cycle: %u -> %u", |
314 | (unsigned)size, (unsigned)size2); | ||
313 | 315 | ||
314 | VLA(uint8_t, buffer2, size2); | 316 | VLA(uint8_t, buffer2, size2); |
315 | messenger_save(m, buffer2); | 317 | messenger_save(m, buffer2); |
@@ -346,10 +348,6 @@ static Suite *messenger_suite(void) | |||
346 | 348 | ||
347 | int main(int argc, char *argv[]) | 349 | int main(int argc, char *argv[]) |
348 | { | 350 | { |
349 | Suite *messenger = messenger_suite(); | ||
350 | SRunner *test_runner = srunner_create(messenger); | ||
351 | int number_failed = 0; | ||
352 | |||
353 | friend_id = hex_string_to_bin(friend_id_str); | 351 | friend_id = hex_string_to_bin(friend_id_str); |
354 | good_id_a = hex_string_to_bin(good_id_a_str); | 352 | good_id_a = hex_string_to_bin(good_id_a_str); |
355 | good_id_b = hex_string_to_bin(good_id_b_str); | 353 | good_id_b = hex_string_to_bin(good_id_b_str); |
@@ -374,6 +372,10 @@ int main(int argc, char *argv[]) | |||
374 | "the tests will continue now...\n\n", stderr); | 372 | "the tests will continue now...\n\n", stderr); |
375 | } | 373 | } |
376 | 374 | ||
375 | Suite *messenger = messenger_suite(); | ||
376 | SRunner *test_runner = srunner_create(messenger); | ||
377 | int number_failed = 0; | ||
378 | |||
377 | srunner_run_all(test_runner, CK_NORMAL); | 379 | srunner_run_all(test_runner, CK_NORMAL); |
378 | number_failed = srunner_ntests_failed(test_runner); | 380 | number_failed = srunner_ntests_failed(test_runner); |
379 | 381 | ||
diff --git a/auto_tests/network_test.c b/auto_tests/network_test.c index 9e3e0e15..1885c81f 100644 --- a/auto_tests/network_test.c +++ b/auto_tests/network_test.c | |||
@@ -38,7 +38,7 @@ START_TEST(test_addr_resolv_localhost) | |||
38 | 38 | ||
39 | int res = addr_resolve(localhost, &ip, nullptr); | 39 | int res = addr_resolve(localhost, &ip, nullptr); |
40 | 40 | ||
41 | ck_assert_msg(res > 0, "Resolver failed: %u, %s (%x, %x)", errno, strerror(errno)); | 41 | ck_assert_msg(res > 0, "Resolver failed: %u, %s", errno, strerror(errno)); |
42 | 42 | ||
43 | char ip_str[IP_NTOA_LEN]; | 43 | char ip_str[IP_NTOA_LEN]; |
44 | ck_assert_msg(ip.family == TOX_AF_INET, "Expected family TOX_AF_INET, got %u.", ip.family); | 44 | ck_assert_msg(ip.family == TOX_AF_INET, "Expected family TOX_AF_INET, got %u.", ip.family); |
@@ -54,7 +54,7 @@ START_TEST(test_addr_resolv_localhost) | |||
54 | localhost_split = 1; | 54 | localhost_split = 1; |
55 | } | 55 | } |
56 | 56 | ||
57 | ck_assert_msg(res > 0, "Resolver failed: %u, %s (%x, %x)", errno, strerror(errno)); | 57 | ck_assert_msg(res > 0, "Resolver failed: %u, %s", errno, strerror(errno)); |
58 | 58 | ||
59 | ck_assert_msg(ip.family == TOX_AF_INET6, "Expected family TOX_AF_INET6 (%u), got %u.", TOX_AF_INET6, ip.family); | 59 | ck_assert_msg(ip.family == TOX_AF_INET6, "Expected family TOX_AF_INET6 (%u), got %u.", TOX_AF_INET6, ip.family); |
60 | IP6 ip6_loopback = get_ip6_loopback(); | 60 | IP6 ip6_loopback = get_ip6_loopback(); |
@@ -71,7 +71,7 @@ START_TEST(test_addr_resolv_localhost) | |||
71 | IP extra; | 71 | IP extra; |
72 | ip_reset(&extra); | 72 | ip_reset(&extra); |
73 | res = addr_resolve(localhost, &ip, &extra); | 73 | res = addr_resolve(localhost, &ip, &extra); |
74 | ck_assert_msg(res > 0, "Resolver failed: %u, %s (%x, %x)", errno, strerror(errno)); | 74 | ck_assert_msg(res > 0, "Resolver failed: %u, %s", errno, strerror(errno)); |
75 | 75 | ||
76 | #if USE_IPV6 | 76 | #if USE_IPV6 |
77 | ck_assert_msg(ip.family == TOX_AF_INET6, "Expected family TOX_AF_INET6 (%u), got %u.", TOX_AF_INET6, ip.family); | 77 | ck_assert_msg(ip.family == TOX_AF_INET6, "Expected family TOX_AF_INET6 (%u), got %u.", TOX_AF_INET6, ip.family); |
@@ -149,7 +149,7 @@ START_TEST(test_ip_equal) | |||
149 | 149 | ||
150 | ip2.ip6.uint8[15]++; | 150 | ip2.ip6.uint8[15]++; |
151 | res = ip_equal(&ip1, &ip2); | 151 | res = ip_equal(&ip1, &ip2); |
152 | ck_assert_msg(res == 0, "ip_equal( {TOX_AF_INET6, ::1}, {TOX_AF_INET6, ::2} ): expected result 0, got %res.", res); | 152 | ck_assert_msg(res == 0, "ip_equal( {TOX_AF_INET6, ::1}, {TOX_AF_INET6, ::2} ): expected result 0, got %u.", res); |
153 | } | 153 | } |
154 | END_TEST | 154 | END_TEST |
155 | 155 | ||
diff --git a/auto_tests/onion_test.c b/auto_tests/onion_test.c index bf764f67..5989df17 100644 --- a/auto_tests/onion_test.c +++ b/auto_tests/onion_test.c | |||
@@ -449,7 +449,7 @@ START_TEST(test_announce) | |||
449 | 449 | ||
450 | for (i = 0; i < NUM_ONIONS; ++i) { | 450 | for (i = 0; i < NUM_ONIONS; ++i) { |
451 | onions[i] = new_onions(i + 34655); | 451 | onions[i] = new_onions(i + 34655); |
452 | ck_assert_msg(onions[i] != nullptr, "Failed to create onions. %u"); | 452 | ck_assert_msg(onions[i] != nullptr, "Failed to create onions. %u", i); |
453 | } | 453 | } |
454 | 454 | ||
455 | IP ip = get_loopback(); | 455 | IP ip = get_loopback(); |
diff --git a/auto_tests/tox_many_tcp_test.c b/auto_tests/tox_many_tcp_test.c index 81e6244a..e4309db7 100644 --- a/auto_tests/tox_many_tcp_test.c +++ b/auto_tests/tox_many_tcp_test.c | |||
@@ -259,21 +259,15 @@ loop_top: | |||
259 | END_TEST | 259 | END_TEST |
260 | 260 | ||
261 | 261 | ||
262 | #ifdef TRAVIS_ENV | ||
263 | static const uint8_t timeout_mux = 20; | ||
264 | #else | ||
265 | static const uint8_t timeout_mux = 10; | ||
266 | #endif | ||
267 | |||
268 | static Suite *tox_suite(void) | 262 | static Suite *tox_suite(void) |
269 | { | 263 | { |
270 | Suite *s = suite_create("Tox many tcp"); | 264 | Suite *s = suite_create("Tox many tcp"); |
271 | 265 | ||
272 | /* Each tox connects to a single tox TCP */ | 266 | /* Each tox connects to a single tox TCP */ |
273 | DEFTESTCASE_SLOW(many_clients_tcp, 4 * timeout_mux); | 267 | DEFTESTCASE(many_clients_tcp); |
274 | 268 | ||
275 | /* Try to make a connection to each "older sibling" tox instance via TCP */ | 269 | /* Try to make a connection to each "older sibling" tox instance via TCP */ |
276 | DEFTESTCASE_SLOW(many_clients_tcp_b, 8 * timeout_mux); | 270 | DEFTESTCASE(many_clients_tcp_b); |
277 | 271 | ||
278 | return s; | 272 | return s; |
279 | } | 273 | } |
diff --git a/auto_tests/tox_many_test.c b/auto_tests/tox_many_test.c index 3d3aad6d..bacaaff8 100644 --- a/auto_tests/tox_many_test.c +++ b/auto_tests/tox_many_test.c | |||
@@ -139,17 +139,11 @@ loop_top: | |||
139 | } | 139 | } |
140 | END_TEST | 140 | END_TEST |
141 | 141 | ||
142 | #ifdef TRAVIS_ENV | ||
143 | static const uint8_t timeout_mux = 20; | ||
144 | #else | ||
145 | static const uint8_t timeout_mux = 10; | ||
146 | #endif | ||
147 | |||
148 | static Suite *tox_suite(void) | 142 | static Suite *tox_suite(void) |
149 | { | 143 | { |
150 | Suite *s = suite_create("Tox"); | 144 | Suite *s = suite_create("Tox"); |
151 | 145 | ||
152 | DEFTESTCASE_SLOW(many_clients, 8 * timeout_mux); | 146 | DEFTESTCASE(many_clients); |
153 | 147 | ||
154 | return s; | 148 | return s; |
155 | } | 149 | } |
diff --git a/auto_tests/tox_strncasecmp_test.c b/auto_tests/tox_strncasecmp_test.c index 3a544c00..fc0d2fc8 100644 --- a/auto_tests/tox_strncasecmp_test.c +++ b/auto_tests/tox_strncasecmp_test.c | |||
@@ -29,7 +29,7 @@ void verify(const char *s1, const char *s2, size_t n, Comparison expected) | |||
29 | 29 | ||
30 | ck_assert_msg(actual == expected, | 30 | ck_assert_msg(actual == expected, |
31 | "tox_strncasecmp(\"%s\", \"%s\", %u) == %s, but expected %s.", | 31 | "tox_strncasecmp(\"%s\", \"%s\", %u) == %s, but expected %s.", |
32 | s1, s2, n, Comparison_Str[actual], Comparison_Str[expected]); | 32 | s1, s2, (unsigned)n, Comparison_Str[actual], Comparison_Str[expected]); |
33 | } | 33 | } |
34 | 34 | ||
35 | START_TEST(test_general) | 35 | START_TEST(test_general) |
diff --git a/auto_tests/tox_test.c b/auto_tests/tox_test.c index be6da1d4..82c18b37 100644 --- a/auto_tests/tox_test.c +++ b/auto_tests/tox_test.c | |||
@@ -234,7 +234,7 @@ static void tox_file_chunk_request(Tox *tox, uint32_t friend_number, uint32_t fi | |||
234 | } | 234 | } |
235 | 235 | ||
236 | if (sending_pos != position) { | 236 | if (sending_pos != position) { |
237 | ck_abort_msg("Bad position %llu", position); | 237 | ck_abort_msg("Bad position %llu", (unsigned long long)position); |
238 | } | 238 | } |
239 | 239 | ||
240 | if (length == 0) { | 240 | if (length == 0) { |
@@ -614,8 +614,9 @@ START_TEST(test_few_clients) | |||
614 | } | 614 | } |
615 | 615 | ||
616 | ck_abort_msg("Something went wrong in file transfer %u %u %u %u %u %u %llu %llu %llu", sendf_ok, file_recv, | 616 | ck_abort_msg("Something went wrong in file transfer %u %u %u %u %u %u %llu %llu %llu", sendf_ok, file_recv, |
617 | totalf_size == file_size, size_recv == file_size, sending_pos == size_recv, file_accepted == 1, totalf_size, size_recv, | 617 | totalf_size == file_size, size_recv == file_size, sending_pos == size_recv, file_accepted == 1, |
618 | sending_pos); | 618 | (unsigned long long)totalf_size, (unsigned long long)size_recv, |
619 | (unsigned long long)sending_pos); | ||
619 | } | 620 | } |
620 | 621 | ||
621 | uint32_t tox1_interval = tox_iteration_interval(tox1); | 622 | uint32_t tox1_interval = tox_iteration_interval(tox1); |
@@ -664,8 +665,8 @@ START_TEST(test_few_clients) | |||
664 | 665 | ||
665 | ck_abort_msg("Something went wrong in file transfer %u %u %u %u %u %u %u %llu %llu %llu %llu", sendf_ok, file_recv, | 666 | ck_abort_msg("Something went wrong in file transfer %u %u %u %u %u %u %u %llu %llu %llu %llu", sendf_ok, file_recv, |
666 | m_send_reached, totalf_size == file_size, size_recv == max_sending, sending_pos == size_recv, file_accepted == 1, | 667 | m_send_reached, totalf_size == file_size, size_recv == max_sending, sending_pos == size_recv, file_accepted == 1, |
667 | totalf_size, file_size, | 668 | (unsigned long long)totalf_size, (unsigned long long)file_size, |
668 | size_recv, sending_pos); | 669 | (unsigned long long)size_recv, (unsigned long long)sending_pos); |
669 | } | 670 | } |
670 | 671 | ||
671 | uint32_t tox1_interval = tox_iteration_interval(tox1); | 672 | uint32_t tox1_interval = tox_iteration_interval(tox1); |
@@ -708,8 +709,9 @@ START_TEST(test_few_clients) | |||
708 | } | 709 | } |
709 | 710 | ||
710 | ck_abort_msg("Something went wrong in file transfer %u %u %u %u %u %u %llu %llu %llu", sendf_ok, file_recv, | 711 | ck_abort_msg("Something went wrong in file transfer %u %u %u %u %u %u %llu %llu %llu", sendf_ok, file_recv, |
711 | totalf_size == file_size, size_recv == file_size, sending_pos == size_recv, file_accepted == 1, totalf_size, size_recv, | 712 | totalf_size == file_size, size_recv == file_size, sending_pos == size_recv, file_accepted == 1, |
712 | sending_pos); | 713 | (unsigned long long)totalf_size, (unsigned long long)size_recv, |
714 | (unsigned long long)sending_pos); | ||
713 | } | 715 | } |
714 | 716 | ||
715 | uint32_t tox1_interval = tox_iteration_interval(tox1); | 717 | uint32_t tox1_interval = tox_iteration_interval(tox1); |
@@ -728,17 +730,11 @@ START_TEST(test_few_clients) | |||
728 | } | 730 | } |
729 | END_TEST | 731 | END_TEST |
730 | 732 | ||
731 | #ifdef TRAVIS_ENV | ||
732 | static const uint8_t timeout_mux = 20; | ||
733 | #else | ||
734 | static const uint8_t timeout_mux = 10; | ||
735 | #endif | ||
736 | |||
737 | static Suite *tox_suite(void) | 733 | static Suite *tox_suite(void) |
738 | { | 734 | { |
739 | Suite *s = suite_create("Tox few clients"); | 735 | Suite *s = suite_create("Tox few clients"); |
740 | 736 | ||
741 | DEFTESTCASE_SLOW(few_clients, 8 * timeout_mux); | 737 | DEFTESTCASE(few_clients); |
742 | 738 | ||
743 | return s; | 739 | return s; |
744 | } | 740 | } |
diff --git a/auto_tests/toxav_many_test.c b/auto_tests/toxav_many_test.c index 9a639eb8..02215098 100644 --- a/auto_tests/toxav_many_test.c +++ b/auto_tests/toxav_many_test.c | |||
@@ -341,10 +341,7 @@ static Suite *tox_suite(void) | |||
341 | { | 341 | { |
342 | Suite *s = suite_create("ToxAV"); | 342 | Suite *s = suite_create("ToxAV"); |
343 | 343 | ||
344 | TCase *tc_av_three_calls = tcase_create("AV_three_calls"); | 344 | DEFTESTCASE(AV_three_calls); |
345 | tcase_add_test(tc_av_three_calls, test_AV_three_calls); | ||
346 | tcase_set_timeout(tc_av_three_calls, 150); | ||
347 | suite_add_tcase(s, tc_av_three_calls); | ||
348 | 345 | ||
349 | return s; | 346 | return s; |
350 | } | 347 | } |
@@ -1,140 +1,148 @@ | |||
1 | machine: | ||
2 | environment: | ||
3 | MAKEFLAGS: "j4" | ||
4 | # --- Android build --- | ||
5 | _toolchain_: "/home/ubuntu/c-toxcore/toolchains/" | ||
6 | _s_: "/home/ubuntu/c-toxcore/src/" | ||
7 | AND_PATH: "$_toolchain_/arm-linux-androideabi/bin:$PATH" | ||
8 | AND_PKG_CONFIG_PATH: "$_toolchain_/arm-linux-androideabi/sysroot/usr/lib/pkgconfig" | ||
9 | AND_CC: "$_toolchain_/arm-linux-androideabi/bin/arm-linux-androideabi-clang" | ||
10 | AND_CXX: "$_toolchain_/arm-linux-androideabi/bin/arm-linux-androideabi-clang++" | ||
11 | # --- Android build --- | ||
12 | dependencies: | ||
13 | pre: | ||
14 | - sudo apt-get update | ||
15 | - sudo bash -c "echo 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' >> /etc/apt/sources.list" # add backports repo | ||
16 | - sudo apt-get update | ||
17 | - sudo apt-get install astyle/trusty-backports | ||
18 | - sudo apt-get install clang | ||
19 | - sudo apt-get install build-essential libtool autotools-dev automake checkinstall check git yasm | ||
20 | - sudo apt-get install libopus-dev libvpx-dev pkg-config | ||
21 | |||
22 | # ------------ network_test requires that "localhost" resolves to ::1 ------------ | ||
23 | - sudo bash -c "echo '::1 localhost ipv6-localhost ipv6-loopback' >> /etc/hosts" # ipv6 localhost entry | ||
24 | # ------------ network_test requires that "localhost" resolves to ::1 ------------ | ||
25 | |||
26 | - sudo bash -c "echo /usr/local/lib/x86_64-linux-gnu > /etc/ld.so.conf.d/fix685519.conf" # fix https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685519 | ||
27 | |||
28 | - java -version ; exit 0 | ||
29 | - gcc --version ; exit 0 | ||
30 | - clang --version ; exit 0 | ||
31 | - astyle --version ; exit 0 | ||
32 | |||
33 | compile: | 1 | compile: |
34 | override: | 2 | override: |
35 | ### ----- check code style ------ | 3 | - "echo 'TODO(zoff99): fix compile'" |
36 | - cd .. ; cp -av c-toxcore ./astyle_check/ | ||
37 | - cd ../astyle_check/ ; ls -al other/astyle/astylerc | ||
38 | - cd ../astyle_check/ ; | ||
39 | SOURCES=`find . -name "*.[ch]" -and -not -name "*.api.h" -and -not -wholename "*crypto_pwhash*" -and -not -wholename "./super_donators/*"|sort`; | ||
40 | astyle -n --options=other/astyle/astylerc $SOURCES ; exit 0 | ||
41 | - cd ../astyle_check/ ; git --no-pager diff | ||
42 | - cd ../astyle_check/ ; git diff | cat > $CIRCLE_ARTIFACTS/astyle_check.patch 2>&1 | ||
43 | ### ----- check code style ------ | ||
44 | |||
45 | ### ------- get libsodium ------- | ||
46 | - mkdir ~/libsodium | ||
47 | - cd ~/libsodium/ ; git clone https://github.com/jedisct1/libsodium.git | ||
48 | - cd ~/libsodium/ ; cd libsodium/ ; git checkout tags/1.0.11 | ||
49 | - cd ~/libsodium/ ; cd libsodium/ ; ./autogen.sh | ||
50 | - cd ~/libsodium/ ; cd libsodium/ ; ./configure && make check | ||
51 | - cd ~/libsodium/ ; cd libsodium/ ; sudo bash -c "printf 'y\naa\n\n' | checkinstall --install --pkgname libsodium --pkgversion 1.0.0 --nodoc --deldesc=no --pkglicense='GPL2'" | ||
52 | - cd ~/libsodium/ ; cd libsodium/ ; sudo ldconfig | ||
53 | ### ------- get libsodium ------- | ||
54 | |||
55 | ##### ------------ BUILD ------------ | ||
56 | - cmake -DASAN=ON -DDEBUG=ON -DSTRICT_ABI=ON -DTRACE=ON -DWARNINGS=OFF . | ||
57 | #- cmake . | ||
58 | - make | ||
59 | - sudo make install | ||
60 | - sudo ldconfig -v 2>/dev/null | grep toxcore | ||
61 | - sudo ldconfig -v 2>/dev/null | grep sodium | ||
62 | ##### ------------ BUILD ------------ | ||
63 | |||
64 | # --- Android build --- | ||
65 | - echo 'export PATH="$AND_PATH";export PKG_CONFIG_PATH="$AND_PKG_CONFIG_PATH";export CC="$AND_CC";export CXX="$AND_CXX";export CPPFLAGS="";export LDFLAGS=""' > ~/pp | ||
66 | - chmod u+x ~/pp | ||
67 | - mkdir -p "$_s_" | ||
68 | |||
69 | - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ | ||
70 | - mkdir -p $CIRCLE_ARTIFACTS/android/ | ||
71 | |||
72 | |||
73 | - . ~/pp;mkdir -p "$PKG_CONFIG_PATH" | ||
74 | - . ~/pp;curl -s http://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip -o android-ndk-r13b-linux-x86_64.zip | ||
75 | - . ~/pp;unzip android-ndk-r13b-linux-x86_64.zip | ||
76 | - . ~/pp;mv -v /home/ubuntu/c-toxcore/android-ndk-r13b /home/ubuntu/android-ndk | ||
77 | - . ~/pp;/home/ubuntu/android-ndk/build/tools/make_standalone_toolchain.py --arch arm --install-dir "$_toolchain_"/arm-linux-androideabi --api 12 --force | ||
78 | |||
79 | - . ~/pp;cd $_s_;git clone --depth=1 --branch=v1.3.0 https://github.com/yasm/yasm.git | ||
80 | - . ~/pp;cd $_s_/yasm/;autoreconf -fi | ||
81 | - . ~/pp;rm -Rf ~/build/ | ||
82 | - . ~/pp;mkdir -p ~/build/ | ||
83 | - . ~/pp;cd ~/build/;$_s_/yasm/configure --prefix="$_toolchain_"/arm-linux-androideabi/sysroot/usr --disable-shared --disable-soname-versions --host=arm-linux-androideabi --with-sysroot="$_toolchain_"/arm-linux-androideabi/sysroot | ||
84 | - . ~/pp;cd ~/build/;make -j4 | ||
85 | - . ~/pp;cd ~/build/;make install | ||
86 | |||
87 | |||
88 | - . ~/pp;cd $_s_;git clone --depth=1 --branch=v1.6.0 https://github.com/webmproject/libvpx.git | ||
89 | - . ~/pp;rm -Rf ~/build/ | ||
90 | - . ~/pp;mkdir -p ~/build/ | ||
91 | - . ~/pp;cd ~/build/;$_s_/libvpx/configure --prefix="$_toolchain_"/arm-linux-androideabi/sysroot/usr --disable-examples --disable-unit-tests --sdk-path=/home/ubuntu/android-ndk --target=armv7-android-gcc | ||
92 | - . ~/pp;cd ~/build/;make -j4 | ||
93 | - . ~/pp;cd ~/build/;make install | ||
94 | - . ~/pp;cd ~/build/;make clean | ||
95 | - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ | ||
96 | - . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install | ||
97 | - cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/libvpx.zip * | ||
98 | |||
99 | |||
100 | - . ~/pp;cd $_s_;git clone --depth=1 --branch=v1.1.3 https://github.com/xiph/opus.git | ||
101 | - . ~/pp;cd $_s_/opus/;autoreconf -fi | ||
102 | - . ~/pp;rm -Rf ~/build/ | ||
103 | - . ~/pp;mkdir -p ~/build/ | ||
104 | - . ~/pp;cd ~/build/;$_s_/opus/configure --prefix="$_toolchain_"/arm-linux-androideabi/sysroot/usr --disable-shared --disable-soname-versions --host=arm-linux-androideabi --with-sysroot="$_toolchain_"/arm-linux-androideabi/sysroot | ||
105 | - . ~/pp;cd ~/build/;make -j4 | ||
106 | - . ~/pp;cd ~/build/;make install | ||
107 | - . ~/pp;cd ~/build/;make clean | ||
108 | - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ | ||
109 | - . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install | ||
110 | - cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/opus.zip * | ||
111 | |||
112 | |||
113 | - . ~/pp;cd $_s_;git clone --depth=1 --branch=1.0.11 https://github.com/jedisct1/libsodium.git | ||
114 | - . ~/pp;cd $_s_/libsodium/;autoreconf -fi | ||
115 | - . ~/pp;rm -Rf ~/build/ | ||
116 | - . ~/pp;mkdir -p ~/build/ | ||
117 | - . ~/pp;cd ~/build/;$_s_/libsodium/configure --prefix="$_toolchain_"/arm-linux-androideabi/sysroot/usr --disable-shared --disable-soname-versions --host=arm-linux-androideabi --with-sysroot="$_toolchain_"/arm-linux-androideabi/sysroot --enable-minimal --disable-pie | ||
118 | - . ~/pp;cd ~/build/;make -j4 | ||
119 | - . ~/pp;cd ~/build/;make install | ||
120 | - . ~/pp;cd ~/build/;make clean | ||
121 | - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ | ||
122 | - . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install | ||
123 | - cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/libsodium.zip * | ||
124 | |||
125 | |||
126 | - . ~/pp;cd ~/c-toxcore/;autoreconf -fi | ||
127 | - . ~/pp;rm -Rf ~/build/ | ||
128 | - . ~/pp;mkdir -p ~/build/ | ||
129 | - . ~/pp;cd ~/build/;~/c-toxcore/configure --prefix="$_toolchain_"/arm-linux-androideabi/sysroot/usr --disable-soname-versions --host=arm-linux-androideabi --with-sysroot="$_toolchain_"/arm-linux-androideabi/sysroot --disable-testing --disable-rt | ||
130 | - . ~/pp;cd ~/build/;make -j4 | ||
131 | - . ~/pp;cd ~/build/;make install | ||
132 | - . ~/pp;cd ~/build/;make clean | ||
133 | - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ | ||
134 | - . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install | ||
135 | - cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/c-toxcore.zip * | ||
136 | # --- Android build --- | ||
137 | 4 | ||
138 | test: | 5 | test: |
139 | override: | 6 | override: |
140 | - make test ARGS="--rerun-failed" CTEST_OUTPUT_ON_FAILURE=1 || make test ARGS="--rerun-failed" CTEST_OUTPUT_ON_FAILURE=1 || make test ARGS="--rerun-failed" CTEST_OUTPUT_ON_FAILURE=1 || make test ARGS="--rerun-failed" CTEST_OUTPUT_ON_FAILURE=1 || make test ARGS="--rerun-failed" CTEST_OUTPUT_ON_FAILURE=1 | 7 | - "echo 'TODO(zoff99): fix compile'" |
8 | |||
9 | #machine: | ||
10 | # environment: | ||
11 | # MAKEFLAGS: "j4" | ||
12 | ## --- Android build --- | ||
13 | # _toolchain_: "/home/ubuntu/c-toxcore/toolchains/" | ||
14 | # _s_: "/home/ubuntu/c-toxcore/src/" | ||
15 | # AND_PATH: "$_toolchain_/arm-linux-androideabi/bin:$PATH" | ||
16 | # AND_PKG_CONFIG_PATH: "$_toolchain_/arm-linux-androideabi/sysroot/usr/lib/pkgconfig" | ||
17 | # AND_CC: "$_toolchain_/arm-linux-androideabi/bin/arm-linux-androideabi-clang" | ||
18 | # AND_CXX: "$_toolchain_/arm-linux-androideabi/bin/arm-linux-androideabi-clang++" | ||
19 | ## --- Android build --- | ||
20 | #dependencies: | ||
21 | # pre: | ||
22 | # - sudo apt-get update | ||
23 | # - sudo bash -c "echo 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' >> /etc/apt/sources.list" # add backports repo | ||
24 | # - sudo apt-get update | ||
25 | # - sudo apt-get install astyle/trusty-backports | ||
26 | # - sudo apt-get install clang | ||
27 | # - sudo apt-get install build-essential libtool autotools-dev automake checkinstall git yasm | ||
28 | # - sudo apt-get install libopus-dev libvpx-dev pkg-config | ||
29 | # | ||
30 | ## ------------ network_test requires that "localhost" resolves to ::1 ------------ | ||
31 | # - sudo bash -c "echo '::1 localhost ipv6-localhost ipv6-loopback' >> /etc/hosts" # ipv6 localhost entry | ||
32 | ## ------------ network_test requires that "localhost" resolves to ::1 ------------ | ||
33 | # | ||
34 | # - sudo bash -c "echo /usr/local/lib/x86_64-linux-gnu > /etc/ld.so.conf.d/fix685519.conf" # fix https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685519 | ||
35 | # | ||
36 | # - java -version ; exit 0 | ||
37 | # - gcc --version ; exit 0 | ||
38 | # - clang --version ; exit 0 | ||
39 | # - astyle --version ; exit 0 | ||
40 | # | ||
41 | #compile: | ||
42 | # override: | ||
43 | # ### ----- check code style ------ | ||
44 | # - cd .. ; cp -av c-toxcore ./astyle_check/ | ||
45 | # - cd ../astyle_check/ ; ls -al other/astyle/astylerc | ||
46 | # - cd ../astyle_check/ ; | ||
47 | # SOURCES=`find . -name "*.[ch]" -and -not -name "*.api.h" -and -not -wholename "*crypto_pwhash*" -and -not -wholename "./super_donators/*"|sort`; | ||
48 | # astyle -n --options=other/astyle/astylerc $SOURCES ; exit 0 | ||
49 | # - cd ../astyle_check/ ; git --no-pager diff | ||
50 | # - cd ../astyle_check/ ; git diff | cat > $CIRCLE_ARTIFACTS/astyle_check.patch 2>&1 | ||
51 | # ### ----- check code style ------ | ||
52 | # | ||
53 | # ### ------- get libsodium ------- | ||
54 | # - mkdir ~/libsodium | ||
55 | # - cd ~/libsodium/ ; git clone https://github.com/jedisct1/libsodium.git | ||
56 | # - cd ~/libsodium/ ; cd libsodium/ ; git checkout tags/1.0.11 | ||
57 | # - cd ~/libsodium/ ; cd libsodium/ ; ./autogen.sh | ||
58 | # - cd ~/libsodium/ ; cd libsodium/ ; ./configure && make check | ||
59 | # - cd ~/libsodium/ ; cd libsodium/ ; sudo bash -c "printf 'y\naa\n\n' | checkinstall --install --pkgname libsodium --pkgversion 1.0.0 --nodoc --deldesc=no --pkglicense='GPL2'" | ||
60 | # - cd ~/libsodium/ ; cd libsodium/ ; sudo ldconfig | ||
61 | # ### ------- get libsodium ------- | ||
62 | # | ||
63 | ###### ------------ BUILD ------------ | ||
64 | # - cmake -DASAN=ON -DDEBUG=ON -DSTRICT_ABI=ON -DTRACE=ON -DWARNINGS=OFF . | ||
65 | # #- cmake . | ||
66 | # - make | ||
67 | # - sudo make install | ||
68 | # - sudo ldconfig -v 2>/dev/null | grep toxcore | ||
69 | # - sudo ldconfig -v 2>/dev/null | grep sodium | ||
70 | ###### ------------ BUILD ------------ | ||
71 | # | ||
72 | ## --- Android build --- | ||
73 | # - echo 'export PATH="$AND_PATH";export PKG_CONFIG_PATH="$AND_PKG_CONFIG_PATH";export CC="$AND_CC";export CXX="$AND_CXX";export CPPFLAGS="";export LDFLAGS=""' > ~/pp | ||
74 | # - chmod u+x ~/pp | ||
75 | # - mkdir -p "$_s_" | ||
76 | # | ||
77 | # - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ | ||
78 | # - mkdir -p $CIRCLE_ARTIFACTS/android/ | ||
79 | # | ||
80 | # | ||
81 | # - . ~/pp;mkdir -p "$PKG_CONFIG_PATH" | ||
82 | # - . ~/pp;curl -s http://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip -o android-ndk-r13b-linux-x86_64.zip | ||
83 | # - . ~/pp;unzip android-ndk-r13b-linux-x86_64.zip | ||
84 | # - . ~/pp;mv -v /home/ubuntu/c-toxcore/android-ndk-r13b /home/ubuntu/android-ndk | ||
85 | # - . ~/pp;/home/ubuntu/android-ndk/build/tools/make_standalone_toolchain.py --arch arm --install-dir "$_toolchain_"/arm-linux-androideabi --api 12 --force | ||
86 | # | ||
87 | # - . ~/pp;cd $_s_;git clone --depth=1 --branch=v1.3.0 https://github.com/yasm/yasm.git | ||
88 | # - . ~/pp;cd $_s_/yasm/;autoreconf -fi | ||
89 | # - . ~/pp;rm -Rf ~/build/ | ||
90 | # - . ~/pp;mkdir -p ~/build/ | ||
91 | # - . ~/pp;cd ~/build/;$_s_/yasm/configure --prefix="$_toolchain_"/arm-linux-androideabi/sysroot/usr --disable-shared --disable-soname-versions --host=arm-linux-androideabi --with-sysroot="$_toolchain_"/arm-linux-androideabi/sysroot | ||
92 | # - . ~/pp;cd ~/build/;make -j4 | ||
93 | # - . ~/pp;cd ~/build/;make install | ||
94 | # | ||
95 | # | ||
96 | # - . ~/pp;cd $_s_;git clone --depth=1 --branch=v1.6.0 https://github.com/webmproject/libvpx.git | ||
97 | # - . ~/pp;rm -Rf ~/build/ | ||
98 | # - . ~/pp;mkdir -p ~/build/ | ||
99 | # - . ~/pp;cd ~/build/;$_s_/libvpx/configure --prefix="$_toolchain_"/arm-linux-androideabi/sysroot/usr --disable-examples --disable-unit-tests --sdk-path=/home/ubuntu/android-ndk --target=armv7-android-gcc | ||
100 | # - . ~/pp;cd ~/build/;make -j4 | ||
101 | # - . ~/pp;cd ~/build/;make install | ||
102 | # - . ~/pp;cd ~/build/;make clean | ||
103 | # - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ | ||
104 | # - . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install | ||
105 | # - cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/libvpx.zip * | ||
106 | # | ||
107 | # | ||
108 | # - . ~/pp;cd $_s_;git clone --depth=1 --branch=v1.1.3 https://github.com/xiph/opus.git | ||
109 | # - . ~/pp;cd $_s_/opus/;autoreconf -fi | ||
110 | # - . ~/pp;rm -Rf ~/build/ | ||
111 | # - . ~/pp;mkdir -p ~/build/ | ||
112 | # - . ~/pp;cd ~/build/;$_s_/opus/configure --prefix="$_toolchain_"/arm-linux-androideabi/sysroot/usr --disable-shared --disable-soname-versions --host=arm-linux-androideabi --with-sysroot="$_toolchain_"/arm-linux-androideabi/sysroot | ||
113 | # - . ~/pp;cd ~/build/;make -j4 | ||
114 | # - . ~/pp;cd ~/build/;make install | ||
115 | # - . ~/pp;cd ~/build/;make clean | ||
116 | # - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ | ||
117 | # - . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install | ||
118 | # - cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/opus.zip * | ||
119 | # | ||
120 | # | ||
121 | # - . ~/pp;cd $_s_;git clone --depth=1 --branch=1.0.11 https://github.com/jedisct1/libsodium.git | ||
122 | # - . ~/pp;cd $_s_/libsodium/;autoreconf -fi | ||
123 | # - . ~/pp;rm -Rf ~/build/ | ||
124 | # - . ~/pp;mkdir -p ~/build/ | ||
125 | # - . ~/pp;cd ~/build/;$_s_/libsodium/configure --prefix="$_toolchain_"/arm-linux-androideabi/sysroot/usr --disable-shared --disable-soname-versions --host=arm-linux-androideabi --with-sysroot="$_toolchain_"/arm-linux-androideabi/sysroot --enable-minimal --disable-pie | ||
126 | # - . ~/pp;cd ~/build/;make -j4 | ||
127 | # - . ~/pp;cd ~/build/;make install | ||
128 | # - . ~/pp;cd ~/build/;make clean | ||
129 | # - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ | ||
130 | # - . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install | ||
131 | # - cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/libsodium.zip * | ||
132 | # | ||
133 | # | ||
134 | # - . ~/pp;cd ~/c-toxcore/;autoreconf -fi | ||
135 | # - . ~/pp;rm -Rf ~/build/ | ||
136 | # - . ~/pp;mkdir -p ~/build/ | ||
137 | # - . ~/pp;cd ~/build/;~/c-toxcore/configure --prefix="$_toolchain_"/arm-linux-androideabi/sysroot/usr --disable-soname-versions --host=arm-linux-androideabi --with-sysroot="$_toolchain_"/arm-linux-androideabi/sysroot --disable-testing --disable-rt | ||
138 | # - . ~/pp;cd ~/build/;make -j4 | ||
139 | # - . ~/pp;cd ~/build/;make install | ||
140 | # - . ~/pp;cd ~/build/;make clean | ||
141 | # - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ | ||
142 | # - . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install | ||
143 | # - cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/c-toxcore.zip * | ||
144 | ## --- Android build --- | ||
145 | # | ||
146 | #test: | ||
147 | # override: | ||
148 | # - make test ARGS="--rerun-failed" CTEST_OUTPUT_ON_FAILURE=1 || make test ARGS="--rerun-failed" CTEST_OUTPUT_ON_FAILURE=1 || make test ARGS="--rerun-failed" CTEST_OUTPUT_ON_FAILURE=1 || make test ARGS="--rerun-failed" CTEST_OUTPUT_ON_FAILURE=1 || make test ARGS="--rerun-failed" CTEST_OUTPUT_ON_FAILURE=1 | ||
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index 572b77b0..66e94da7 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake | |||
@@ -20,9 +20,6 @@ pkg_use_module(VPX vpx ) | |||
20 | # For tox-bootstrapd. | 20 | # For tox-bootstrapd. |
21 | pkg_use_module(LIBCONFIG libconfig ) | 21 | pkg_use_module(LIBCONFIG libconfig ) |
22 | 22 | ||
23 | # For auto tests. | ||
24 | pkg_use_module(CHECK check ) | ||
25 | |||
26 | # For tox-spectest. | 23 | # For tox-spectest. |
27 | pkg_use_module(MSGPACK msgpack ) | 24 | pkg_use_module(MSGPACK msgpack ) |
28 | 25 | ||
@@ -38,7 +35,6 @@ pkg_use_module(SNDFILE sndfile ) | |||
38 | # These require specific installation paths of dependencies: | 35 | # These require specific installation paths of dependencies: |
39 | # - libsodium in libsodium/Win32/Release/v140/static | 36 | # - libsodium in libsodium/Win32/Release/v140/static |
40 | # - pthreads in pthreads-win32/Pre-built.2 | 37 | # - pthreads in pthreads-win32/Pre-built.2 |
41 | # - check in %PROGRAMFILES%/check | ||
42 | # | 38 | # |
43 | ############################################################################### | 39 | ############################################################################### |
44 | 40 | ||
@@ -60,27 +56,6 @@ if(MSVC) | |||
60 | message(FATAL_ERROR "libsodium libraries not found") | 56 | message(FATAL_ERROR "libsodium libraries not found") |
61 | endif() | 57 | endif() |
62 | 58 | ||
63 | # check | ||
64 | # ----- | ||
65 | # | ||
66 | # We look for the check and compat (containing clock_gettime and other POSIX | ||
67 | # functions not present on Windows) libraries in Program Files, since that is | ||
68 | # the default location where cmake installs its packages. | ||
69 | find_library(LIBCHECK_LIBRARIES | ||
70 | NAMES check libcheck | ||
71 | PATHS "$ENV{PROGRAMFILES}/check/lib" | ||
72 | ) | ||
73 | find_library(LIBCOMPAT_LIBRARIES | ||
74 | NAMES compat libcompat | ||
75 | PATHS "$ENV{PROGRAMFILES}/check/lib" | ||
76 | ) | ||
77 | if(LIBCHECK_LIBRARIES AND LIBCOMPAT_LIBRARIES) | ||
78 | include_directories("$ENV{PROGRAMFILES}/check/include") | ||
79 | set(CHECK_FOUND TRUE) | ||
80 | set(CHECK_LIBRARIES ${LIBCHECK_LIBRARIES} ${LIBCOMPAT_LIBRARIES}) | ||
81 | message("check: ${CHECK_LIBRARIES}") | ||
82 | endif() | ||
83 | |||
84 | # pthreads | 59 | # pthreads |
85 | # -------- | 60 | # -------- |
86 | if(CMAKE_USE_WIN32_THREADS_INIT) | 61 | if(CMAKE_USE_WIN32_THREADS_INIT) |
diff --git a/configure.ac b/configure.ac index 18796bdd..e094489f 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -26,7 +26,6 @@ TOX_LOGGER="no" | |||
26 | 26 | ||
27 | NCURSES_FOUND="no" | 27 | NCURSES_FOUND="no" |
28 | LIBCONFIG_FOUND="no" | 28 | LIBCONFIG_FOUND="no" |
29 | LIBCHECK_FOUND="no" | ||
30 | WANT_NACL="no" | 29 | WANT_NACL="no" |
31 | ADD_NACL_OBJECTS_TO_PKGCONFIG="yes" | 30 | ADD_NACL_OBJECTS_TO_PKGCONFIG="yes" |
32 | SET_SO_VERSION="yes" | 31 | SET_SO_VERSION="yes" |
@@ -525,17 +524,6 @@ if test "x$BUILD_AV" = "xyes"; then | |||
525 | fi | 524 | fi |
526 | 525 | ||
527 | if test -n "$PKG_CONFIG"; then | 526 | if test -n "$PKG_CONFIG"; then |
528 | if test "x$BUILD_TESTS" = "xyes"; then | ||
529 | PKG_CHECK_MODULES([CHECK], [check], | ||
530 | [ | ||
531 | LIBCHECK_FOUND="yes" | ||
532 | ], | ||
533 | [ | ||
534 | AC_MSG_WARN([libcheck not found, not building unit tests: $CHECK_PKG_ERRORS]) | ||
535 | BUILD_TESTS="no" | ||
536 | ]) | ||
537 | fi | ||
538 | |||
539 | if test "x$BUILD_DHT_BOOTSTRAP_DAEMON" = "xyes"; then | 527 | if test "x$BUILD_DHT_BOOTSTRAP_DAEMON" = "xyes"; then |
540 | PKG_CHECK_MODULES([LIBCONFIG], [libconfig >= 1.4.6], | 528 | PKG_CHECK_MODULES([LIBCONFIG], [libconfig >= 1.4.6], |
541 | [ | 529 | [ |
@@ -572,26 +560,6 @@ if (test "x$BUILD_DHT_BOOTSTRAP_DAEMON" = "xyes") && \ | |||
572 | fi | 560 | fi |
573 | fi | 561 | fi |
574 | 562 | ||
575 | if (test "x$BUILD_TESTS" = "xyes") && (test "x$LIBCHECK_FOUND" = "xno"); then | ||
576 | AC_CHECK_HEADER([check.h], | ||
577 | [], | ||
578 | [ | ||
579 | AC_MSG_WARN([header file for check library was not found on your system, unit tests will be disabled]) | ||
580 | BUILD_TESTS="no" | ||
581 | ] | ||
582 | ) | ||
583 | |||
584 | if test "x$BUILD_TESTS" = "xyes"; then | ||
585 | AC_CHECK_LIB([check], [suite_create], | ||
586 | [], | ||
587 | [ | ||
588 | AC_MSG_WARN([library check was not found on the system, unit tests will be disabled]) | ||
589 | BUILD_TESTS="no" | ||
590 | ] | ||
591 | ) | ||
592 | fi | ||
593 | fi | ||
594 | |||
595 | if test "x$WIN32" = "xyes"; then | 563 | if test "x$WIN32" = "xyes"; then |
596 | AC_CHECK_LIB(ws2_32, main, | 564 | AC_CHECK_LIB(ws2_32, main, |
597 | [ | 565 | [ |
diff --git a/other/bootstrap_daemon/docker/Dockerfile b/other/bootstrap_daemon/docker/Dockerfile index 500321c0..373f61c6 100644 --- a/other/bootstrap_daemon/docker/Dockerfile +++ b/other/bootstrap_daemon/docker/Dockerfile | |||
@@ -8,7 +8,6 @@ RUN export BUILD_PACKAGES="\ | |||
8 | autotools-dev \ | 8 | autotools-dev \ |
9 | automake \ | 9 | automake \ |
10 | checkinstall \ | 10 | checkinstall \ |
11 | check \ | ||
12 | git \ | 11 | git \ |
13 | yasm \ | 12 | yasm \ |
14 | libsodium-dev \ | 13 | libsodium-dev \ |
diff --git a/other/bootstrap_daemon/docker/Dockerfile.alpine b/other/bootstrap_daemon/docker/Dockerfile.alpine index f0b99bab..48d9f44d 100644 --- a/other/bootstrap_daemon/docker/Dockerfile.alpine +++ b/other/bootstrap_daemon/docker/Dockerfile.alpine | |||
@@ -20,7 +20,6 @@ RUN set -x && \ | |||
20 | apk --no-cache add --virtual build-dependencies \ | 20 | apk --no-cache add --virtual build-dependencies \ |
21 | autoconf \ | 21 | autoconf \ |
22 | automake \ | 22 | automake \ |
23 | check-dev \ | ||
24 | curl \ | 23 | curl \ |
25 | build-base \ | 24 | build-base \ |
26 | libtool \ | 25 | libtool \ |
diff --git a/other/docker/windows/Dockerfile b/other/docker/windows/Dockerfile index 176c3937..07903239 100644 --- a/other/docker/windows/Dockerfile +++ b/other/docker/windows/Dockerfile | |||
@@ -4,7 +4,6 @@ FROM debian:stretch-slim | |||
4 | ARG VERSION_SODIUM=1.0.16 | 4 | ARG VERSION_SODIUM=1.0.16 |
5 | ARG VERSION_OPUS=v1.2.1 | 5 | ARG VERSION_OPUS=v1.2.1 |
6 | ARG VERSION_VPX=v1.6.1 | 6 | ARG VERSION_VPX=v1.6.1 |
7 | ARG VERSION_CHECK=0.12.0 | ||
8 | 7 | ||
9 | ARG SUPPORT_TEST=false | 8 | ARG SUPPORT_TEST=false |
10 | ARG SUPPORT_ARCH_i686=true | 9 | ARG SUPPORT_ARCH_i686=true |
diff --git a/other/docker/windows/build_dependencies.sh b/other/docker/windows/build_dependencies.sh index f3d4b603..43c6c3e1 100644 --- a/other/docker/windows/build_dependencies.sh +++ b/other/docker/windows/build_dependencies.sh | |||
@@ -59,18 +59,6 @@ build() | |||
59 | make install | 59 | make install |
60 | cd .. | 60 | cd .. |
61 | 61 | ||
62 | if [ "${SUPPORT_TEST}" = "true" ]; then | ||
63 | echo | ||
64 | echo "=== Building Check ${VERSION_CHECK} ${ARCH} ===" | ||
65 | git clone --depth=1 --branch="${VERSION_CHECK}" https://github.com/libcheck/check | ||
66 | cd check | ||
67 | autoreconf --install | ||
68 | ./configure --host="${WINDOWS_TOOLCHAIN}" --prefix="${EXTRA_PREFIX_DIR}" | ||
69 | make | ||
70 | make install | ||
71 | cd .. | ||
72 | fi | ||
73 | |||
74 | rm -rf /tmp/* | 62 | rm -rf /tmp/* |
75 | } | 63 | } |
76 | 64 | ||
diff --git a/other/docker/windows/build_toxcore.sh b/other/docker/windows/build_toxcore.sh index 0f4c2731..a3830455 100644 --- a/other/docker/windows/build_toxcore.sh +++ b/other/docker/windows/build_toxcore.sh | |||
@@ -17,7 +17,7 @@ build() | |||
17 | # toxcore dependencies that we will copy to the user for static build of toxcore (e.g. vpx, opus, sodium) | 17 | # toxcore dependencies that we will copy to the user for static build of toxcore (e.g. vpx, opus, sodium) |
18 | DEP_PREFIX_DIR="/root/prefix/${ARCH}" | 18 | DEP_PREFIX_DIR="/root/prefix/${ARCH}" |
19 | 19 | ||
20 | # toxcore dependencies that user doesn't need in build result (e.g. libcheck used for testing toxcore) | 20 | # toxcore dependencies that user doesn't need in build result |
21 | EXTRA_DEP_PREFIX_DIR="/root/extra-prefix/${ARCH}" | 21 | EXTRA_DEP_PREFIX_DIR="/root/extra-prefix/${ARCH}" |
22 | mkdir -p "${EXTRA_DEP_PREFIX_DIR}" | 22 | mkdir -p "${EXTRA_DEP_PREFIX_DIR}" |
23 | 23 | ||
@@ -73,7 +73,7 @@ build() | |||
73 | 73 | ||
74 | winecfg | 74 | winecfg |
75 | export CTEST_OUTPUT_ON_FAILURE=1 | 75 | export CTEST_OUTPUT_ON_FAILURE=1 |
76 | # add libgcc_s_sjlj-1.dll libwinpthread-1.dll libcheck-0.dll into PATH env var of wine | 76 | # add libgcc_s_sjlj-1.dll libwinpthread-1.dll into PATH env var of wine |
77 | export WINEPATH=`cd /usr/lib/gcc/${WINDOWS_TOOLCHAIN}/*posix/ ; winepath -w $(pwd)`\;`winepath -w /usr/${WINDOWS_TOOLCHAIN}/lib/`\;`winepath -w ${EXTRA_DEP_PREFIX_DIR}/bin` | 77 | export WINEPATH=`cd /usr/lib/gcc/${WINDOWS_TOOLCHAIN}/*posix/ ; winepath -w $(pwd)`\;`winepath -w /usr/${WINDOWS_TOOLCHAIN}/lib/`\;`winepath -w ${EXTRA_DEP_PREFIX_DIR}/bin` |
78 | 78 | ||
79 | if [ "${ALLOW_TEST_FAILURE}" = "true" ]; then | 79 | if [ "${ALLOW_TEST_FAILURE}" = "true" ]; then |
diff --git a/other/travis/freebsd-install-stage1 b/other/travis/freebsd-install-stage1 index 31544c44..46b40374 100755 --- a/other/travis/freebsd-install-stage1 +++ b/other/travis/freebsd-install-stage1 | |||
@@ -110,7 +110,6 @@ if [ ! -f ./$IMAGE_NAME.tgz ] || [ ! -f ./freebsd-install-stage1.sha256 ] || [ " | |||
110 | gmake \ | 110 | gmake \ |
111 | cmake \ | 111 | cmake \ |
112 | pkgconf \ | 112 | pkgconf \ |
113 | check \ | ||
114 | opencv \ | 113 | opencv \ |
115 | portaudio \ | 114 | portaudio \ |
116 | libsndfile \ | 115 | libsndfile \ |
diff --git a/other/travis/toxcore-osx-install b/other/travis/toxcore-osx-install index 1c6daecc..8f13cb5f 100755 --- a/other/travis/toxcore-osx-install +++ b/other/travis/toxcore-osx-install | |||
@@ -3,4 +3,4 @@ | |||
3 | # Workaround for bug in Homebrew where it only finds an old Ruby version. | 3 | # Workaround for bug in Homebrew where it only finds an old Ruby version. |
4 | brew update | 4 | brew update |
5 | 5 | ||
6 | brew install libsodium libvpx opus libconfig check astyle | 6 | brew install libsodium libvpx opus libconfig astyle |