From 6cd4fcdec4e6671e63e8c7cba2ab4c6d594b13fd Mon Sep 17 00:00:00 2001 From: iphydf Date: Mon, 5 Feb 2018 21:38:58 +0000 Subject: Remove libcheck from the dependencies. We're not gaining much from this library, and it's a burden, especially for windows development. --- .travis.yml | 1 - CMakeLists.txt | 13 +- INSTALL.md | 2 - appveyor.yml | 5 - auto_tests/BUILD.bazel | 2 - auto_tests/Makefile.inc | 6 +- auto_tests/check_compat.h | 74 ++++++- auto_tests/dht_test.c | 2 +- auto_tests/helpers.h | 9 - auto_tests/messenger_test.c | 26 ++- auto_tests/network_test.c | 8 +- auto_tests/onion_test.c | 2 +- auto_tests/tox_many_tcp_test.c | 10 +- auto_tests/tox_many_test.c | 8 +- auto_tests/tox_strncasecmp_test.c | 2 +- auto_tests/tox_test.c | 24 +- auto_tests/toxav_many_test.c | 5 +- circle.yml | 278 ++++++++++++------------ cmake/Dependencies.cmake | 25 --- configure.ac | 32 --- other/bootstrap_daemon/docker/Dockerfile | 1 - other/bootstrap_daemon/docker/Dockerfile.alpine | 1 - other/docker/windows/Dockerfile | 1 - other/docker/windows/build_dependencies.sh | 12 - other/docker/windows/build_toxcore.sh | 4 +- other/travis/freebsd-install-stage1 | 1 - other/travis/toxcore-osx-install | 2 +- 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: - avsm packages: - aspcud # For Opam - - check # For tests. - libconfig-dev # For tox-bootstrapd. - libcv-dev # For av_test. - 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 toxcore/util.h) target_link_modules(toxnetwork toxcrypto) +message("CMAKE_THREAD_LIBS_INIT: ${CMAKE_THREAD_LIBS_INIT}") if(CMAKE_THREAD_LIBS_INIT) target_link_modules(toxnetwork ${CMAKE_THREAD_LIBS_INIT}) set(toxnetwork_PKGCONFIG_LIBS ${toxnetwork_PKGCONFIG_LIBS} ${CMAKE_THREAD_LIBS_INIT}) @@ -497,14 +498,13 @@ elseif(FORMAT_TEST) endif() function(auto_test target) - if(CHECK_FOUND AND NOT (MSVC AND ARGV1 STREQUAL "MSVC_DONT_BUILD")) + if(NOT (MSVC AND ARGV1 STREQUAL "MSVC_DONT_BUILD")) add_executable(auto_${target}_test auto_tests/${target}_test.c) target_link_modules(auto_${target}_test toxcore toxcrypto toxmessenger - toxnetcrypto - ${CHECK_LIBRARIES}) + toxnetcrypto) if(NOT ARGV1 STREQUAL "DONT_RUN") add_test(NAME ${target} COMMAND ${CROSSCOMPILING_EMULATOR} auto_${target}_test) set_tests_properties(${target} PROPERTIES TIMEOUT "${TEST_TIMEOUT_SECONDS}") @@ -512,17 +512,16 @@ function(auto_test target) endif() endfunction() -if(BUILD_TOXAV AND CHECK_FOUND) +if(BUILD_TOXAV) add_definitions(-D__STDC_LIMIT_MACROS=1) add_executable(auto_monolith_test auto_tests/monolith_test.cpp ${ANDROID_CPU_FEATURES}) target_link_modules(auto_monolith_test - ${CHECK_LIBRARIES} + ${toxcore_PKGCONFIG_LIBS} ${LIBSODIUM_LIBRARIES} ${OPUS_LIBRARIES} - ${VPX_LIBRARIES} - ${toxcore_PKGCONFIG_LIBS}) + ${VPX_LIBRARIES}) add_test(NAME monolith COMMAND ${CROSSCOMPILING_EMULATOR} auto_monolith_test) if(ANDROID_CPU_FEATURES) diff --git a/INSTALL.md b/INSTALL.md index 02eaf7f4..dc46ea61 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -181,7 +181,6 @@ Build the container image based on the Dockerfile. The following options are ava | SUPPORT_ARCH_i686 | Support building 32-bit toxcore. | "true" or "false" (case sensitive). | true | | SUPPORT_ARCH_x86_64 | Support building 64-bit toxcore. | "true" or "false" (case sensitive). | true | | SUPPORT_TEST | Support running toxcore automated tests. | "true" or "false" (case sensitive). | false | -| VERSION_CHECK | Version of libcheck. Needed only when SUPPORT_TEST is enabled. | Git branch name. | 0.12.0 | | VERSION_OPUS | Version of libopus to build toxcore with. | Git branch name. | v1.2.1 | | VERSION_SODIUM | Version of libsodium to build toxcore with. | Git branch name. | 1.0.16 | | 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 cd other/docker/windows docker build \ --build-arg SUPPORT_TEST=true \ - --build-arg VERSION_CHECK=0.11.0 \ -t toxcore \ . ``` diff --git a/appveyor.yml b/appveyor.yml index 66453ccf..925122fe 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,11 +7,6 @@ install: - choco install curl - refreshenv - if not exist %APPDATA%\downloads mkdir %APPDATA%\downloads -# libcheck -- if not exist %APPDATA%\downloads\check.zip curl -L https://github.com/libcheck/check/archive/0.11.0.zip -o %APPDATA%\downloads\check.zip -- unzip %APPDATA%\downloads\check.zip && cd check-0.11.0 -- if not exist "%PROGRAMFILES%\check\include\check.h" cmake . && msbuild INSTALL.vcxproj -- cd .. # libsodium - mkdir libsodium && cd libsodium - 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( "//c-toxcore/toxav", "//c-toxcore/toxcore", "//c-toxcore/toxencryptsave", - "@check", ], ) for src in glob(["*_test.c"])] @@ -47,6 +46,5 @@ cc_test( ":monolith", "//c-toxcore/other:monolith", "//c-toxcore/testing:misc_tools", - "@check", ], ) 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 AUTOTEST_CFLAGS = \ $(LIBSODIUM_CFLAGS) \ - $(NACL_CFLAGS) \ - $(CHECK_CFLAGS) + $(NACL_CFLAGS) AUTOTEST_LDADD = \ $(LIBSODIUM_LDFLAGS) \ @@ -15,8 +14,7 @@ AUTOTEST_LDADD = \ libtoxencryptsave.la \ $(LIBSODIUM_LIBS) \ $(NACL_OBJECTS) \ - $(NACL_LIBS) \ - $(CHECK_LIBS) + $(NACL_LIBS) 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 @@ -#ifdef _MSC_VER -#define pid_t int -// #include -#endif -#include -#ifdef _MSC_VER -#undef pid_t -#endif +#ifndef CHECK_COMPAT_H +#define CHECK_COMPAT_H + +#include "../toxcore/ccompat.h" + +#include +#include + +#define START_TEST(name) static void name(void) +#define END_TEST + +#define DEFTESTCASE(NAME) test_##NAME() +#define DEFTESTCASE_SLOW(NAME, TIMEOUT) test_##NAME() + +typedef struct Suite Suite; +typedef struct SRunner SRunner; +enum SRunMode { CK_NORMAL }; + +Suite *suite_create(const char *title) +{ + printf("Running test suite: %s\n", title); + return nullptr; +} + +SRunner *srunner_create(Suite *s) +{ + return nullptr; +} + +void srunner_free(SRunner *s) +{ +} + +void srunner_run_all(SRunner *r, int mode) +{ +} + +int srunner_ntests_failed(SRunner *r) +{ + return 0; +} + +#define ck_assert(ok) do { \ + if (!(ok)) { \ + fprintf(stderr, "%s:%d: failed `%s'\n", __FILE__, __LINE__, #ok); \ + exit(EXIT_FAILURE); \ + } \ +} while (0) + +#define ck_assert_msg(ok, ...) do { \ + if (!(ok)) { \ + fprintf(stderr, "%s:%d: failed `%s': ", __FILE__, __LINE__, #ok); \ + fprintf(stderr, __VA_ARGS__); \ + fprintf(stderr, "\n"); \ + exit(EXIT_FAILURE); \ + } \ +} while (0) + +#define ck_abort_msg(...) do { \ + fprintf(stderr, "%s:%d: ", __FILE__, __LINE__); \ + fprintf(stderr, __VA_ARGS__); \ + fprintf(stderr, "\n"); \ + exit(EXIT_FAILURE); \ +} while (0) + +#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) ck_assert_msg(pkt[0] == NET_PACKET_GET_NODES, "Malformed packet."); ck_assert_msg(memcmp(pkt + 1, key, CRYPTO_SYMMETRIC_KEY_SIZE) == 0, "Malformed packet."); ck_assert_msg(length == 1 + CRYPTO_PUBLIC_KEY_SIZE + CRYPTO_NONCE_SIZE + sizeof(plain) + CRYPTO_MAC_SIZE, - "Invalid size. Should be %d got %d", sizeof(pkt), length); + "Invalid size. Should be %u got %d", (unsigned)sizeof(pkt), length); printf("Create Packet Successful!\n"); } 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 @@ #define c_sleep(x) usleep(1000 * (x)) #endif -#define DEFTESTCASE(NAME) \ - TCase *tc_##NAME = tcase_create(#NAME); \ - tcase_add_test(tc_##NAME, test_##NAME); \ - suite_add_tcase(s, tc_##NAME) - -#define DEFTESTCASE_SLOW(NAME, TIMEOUT) \ - DEFTESTCASE(NAME); \ - tcase_set_timeout(tc_##NAME, TIMEOUT) - static const char *tox_log_level_name(TOX_LOG_LEVEL level) { 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) DHT_save(m->dht, buffer + extra); for (i = 0; i < extra; i++) { - ck_assert_msg(buffer[i] == 0xCD, "Buffer underwritten from DHT_save() @%u", i); - ck_assert_msg(buffer[extra + size + i] == 0xCD, "Buffer overwritten from DHT_save() @%u", i); + ck_assert_msg(buffer[i] == 0xCD, "Buffer underwritten from DHT_save() @%u", (unsigned)i); + ck_assert_msg(buffer[extra + size + i] == 0xCD, "Buffer overwritten from DHT_save() @%u", (unsigned)i); } int res = DHT_load(m->dht, buffer + extra, size); @@ -263,11 +263,12 @@ START_TEST(test_dht_state_saveloadsave) uint8_t *ptr = buffer + extra + offset; sprintf(msg, "Failed to load back stored buffer: 0x%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx @%zu/%zu, code %d", ptr[-2], ptr[-1], ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], offset, size, res & 0x0F); - ck_assert_msg(res == 0, msg); + ck_assert_msg(res == 0, "%s", msg); } size_t size2 = DHT_size(m->dht); - ck_assert_msg(size == size2, "Messenger \"grew\" in size from a store/load cycle: %u -> %u", size, size2); + ck_assert_msg(size == size2, "Messenger \"grew\" in size from a store/load cycle: %u -> %u", (unsigned)size, + (unsigned)size2); VLA(uint8_t, buffer2, size2); DHT_save(m->dht, buffer2); @@ -291,8 +292,8 @@ START_TEST(test_messenger_state_saveloadsave) messenger_save(m, buffer + extra); for (i = 0; i < extra; i++) { - ck_assert_msg(buffer[i] == 0xCD, "Buffer underwritten from messenger_save() @%u", i); - ck_assert_msg(buffer[extra + size + i] == 0xCD, "Buffer overwritten from messenger_save() @%u", i); + ck_assert_msg(buffer[i] == 0xCD, "Buffer underwritten from messenger_save() @%u", (unsigned)i); + ck_assert_msg(buffer[extra + size + i] == 0xCD, "Buffer overwritten from messenger_save() @%u", (unsigned)i); } int res = messenger_load(m, buffer + extra, size); @@ -305,11 +306,12 @@ START_TEST(test_messenger_state_saveloadsave) uint8_t *ptr = buffer + extra + offset; sprintf(msg, "Failed to load back stored buffer: 0x%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx @%zu/%zu, code %d", ptr[-2], ptr[-1], ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], offset, size, res & 0x0F); - ck_assert_msg(res == 0, msg); + ck_assert_msg(res == 0, "%s", msg); } size_t size2 = messenger_size(m); - ck_assert_msg(size == size2, "Messenger \"grew\" in size from a store/load cycle: %u -> %u", size, size2); + ck_assert_msg(size == size2, "Messenger \"grew\" in size from a store/load cycle: %u -> %u", + (unsigned)size, (unsigned)size2); VLA(uint8_t, buffer2, size2); messenger_save(m, buffer2); @@ -346,10 +348,6 @@ static Suite *messenger_suite(void) int main(int argc, char *argv[]) { - Suite *messenger = messenger_suite(); - SRunner *test_runner = srunner_create(messenger); - int number_failed = 0; - friend_id = hex_string_to_bin(friend_id_str); good_id_a = hex_string_to_bin(good_id_a_str); good_id_b = hex_string_to_bin(good_id_b_str); @@ -374,6 +372,10 @@ int main(int argc, char *argv[]) "the tests will continue now...\n\n", stderr); } + Suite *messenger = messenger_suite(); + SRunner *test_runner = srunner_create(messenger); + int number_failed = 0; + srunner_run_all(test_runner, CK_NORMAL); number_failed = srunner_ntests_failed(test_runner); 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) int res = addr_resolve(localhost, &ip, nullptr); - ck_assert_msg(res > 0, "Resolver failed: %u, %s (%x, %x)", errno, strerror(errno)); + ck_assert_msg(res > 0, "Resolver failed: %u, %s", errno, strerror(errno)); char ip_str[IP_NTOA_LEN]; 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) localhost_split = 1; } - ck_assert_msg(res > 0, "Resolver failed: %u, %s (%x, %x)", errno, strerror(errno)); + ck_assert_msg(res > 0, "Resolver failed: %u, %s", errno, strerror(errno)); ck_assert_msg(ip.family == TOX_AF_INET6, "Expected family TOX_AF_INET6 (%u), got %u.", TOX_AF_INET6, ip.family); IP6 ip6_loopback = get_ip6_loopback(); @@ -71,7 +71,7 @@ START_TEST(test_addr_resolv_localhost) IP extra; ip_reset(&extra); res = addr_resolve(localhost, &ip, &extra); - ck_assert_msg(res > 0, "Resolver failed: %u, %s (%x, %x)", errno, strerror(errno)); + ck_assert_msg(res > 0, "Resolver failed: %u, %s", errno, strerror(errno)); #if USE_IPV6 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) ip2.ip6.uint8[15]++; res = ip_equal(&ip1, &ip2); - ck_assert_msg(res == 0, "ip_equal( {TOX_AF_INET6, ::1}, {TOX_AF_INET6, ::2} ): expected result 0, got %res.", res); + ck_assert_msg(res == 0, "ip_equal( {TOX_AF_INET6, ::1}, {TOX_AF_INET6, ::2} ): expected result 0, got %u.", res); } END_TEST 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) for (i = 0; i < NUM_ONIONS; ++i) { onions[i] = new_onions(i + 34655); - ck_assert_msg(onions[i] != nullptr, "Failed to create onions. %u"); + ck_assert_msg(onions[i] != nullptr, "Failed to create onions. %u", i); } 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: END_TEST -#ifdef TRAVIS_ENV -static const uint8_t timeout_mux = 20; -#else -static const uint8_t timeout_mux = 10; -#endif - static Suite *tox_suite(void) { Suite *s = suite_create("Tox many tcp"); /* Each tox connects to a single tox TCP */ - DEFTESTCASE_SLOW(many_clients_tcp, 4 * timeout_mux); + DEFTESTCASE(many_clients_tcp); /* Try to make a connection to each "older sibling" tox instance via TCP */ - DEFTESTCASE_SLOW(many_clients_tcp_b, 8 * timeout_mux); + DEFTESTCASE(many_clients_tcp_b); return s; } 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: } END_TEST -#ifdef TRAVIS_ENV -static const uint8_t timeout_mux = 20; -#else -static const uint8_t timeout_mux = 10; -#endif - static Suite *tox_suite(void) { Suite *s = suite_create("Tox"); - DEFTESTCASE_SLOW(many_clients, 8 * timeout_mux); + DEFTESTCASE(many_clients); return s; } 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) ck_assert_msg(actual == expected, "tox_strncasecmp(\"%s\", \"%s\", %u) == %s, but expected %s.", - s1, s2, n, Comparison_Str[actual], Comparison_Str[expected]); + s1, s2, (unsigned)n, Comparison_Str[actual], Comparison_Str[expected]); } 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 } if (sending_pos != position) { - ck_abort_msg("Bad position %llu", position); + ck_abort_msg("Bad position %llu", (unsigned long long)position); } if (length == 0) { @@ -614,8 +614,9 @@ START_TEST(test_few_clients) } ck_abort_msg("Something went wrong in file transfer %u %u %u %u %u %u %llu %llu %llu", sendf_ok, file_recv, - totalf_size == file_size, size_recv == file_size, sending_pos == size_recv, file_accepted == 1, totalf_size, size_recv, - sending_pos); + totalf_size == file_size, size_recv == file_size, sending_pos == size_recv, file_accepted == 1, + (unsigned long long)totalf_size, (unsigned long long)size_recv, + (unsigned long long)sending_pos); } uint32_t tox1_interval = tox_iteration_interval(tox1); @@ -664,8 +665,8 @@ START_TEST(test_few_clients) ck_abort_msg("Something went wrong in file transfer %u %u %u %u %u %u %u %llu %llu %llu %llu", sendf_ok, file_recv, m_send_reached, totalf_size == file_size, size_recv == max_sending, sending_pos == size_recv, file_accepted == 1, - totalf_size, file_size, - size_recv, sending_pos); + (unsigned long long)totalf_size, (unsigned long long)file_size, + (unsigned long long)size_recv, (unsigned long long)sending_pos); } uint32_t tox1_interval = tox_iteration_interval(tox1); @@ -708,8 +709,9 @@ START_TEST(test_few_clients) } ck_abort_msg("Something went wrong in file transfer %u %u %u %u %u %u %llu %llu %llu", sendf_ok, file_recv, - totalf_size == file_size, size_recv == file_size, sending_pos == size_recv, file_accepted == 1, totalf_size, size_recv, - sending_pos); + totalf_size == file_size, size_recv == file_size, sending_pos == size_recv, file_accepted == 1, + (unsigned long long)totalf_size, (unsigned long long)size_recv, + (unsigned long long)sending_pos); } uint32_t tox1_interval = tox_iteration_interval(tox1); @@ -728,17 +730,11 @@ START_TEST(test_few_clients) } END_TEST -#ifdef TRAVIS_ENV -static const uint8_t timeout_mux = 20; -#else -static const uint8_t timeout_mux = 10; -#endif - static Suite *tox_suite(void) { Suite *s = suite_create("Tox few clients"); - DEFTESTCASE_SLOW(few_clients, 8 * timeout_mux); + DEFTESTCASE(few_clients); return s; } 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) { Suite *s = suite_create("ToxAV"); - TCase *tc_av_three_calls = tcase_create("AV_three_calls"); - tcase_add_test(tc_av_three_calls, test_AV_three_calls); - tcase_set_timeout(tc_av_three_calls, 150); - suite_add_tcase(s, tc_av_three_calls); + DEFTESTCASE(AV_three_calls); return s; } diff --git a/circle.yml b/circle.yml index 44bf8c7f..9e0ef321 100644 --- a/circle.yml +++ b/circle.yml @@ -1,140 +1,148 @@ -machine: - environment: - MAKEFLAGS: "j4" -# --- Android build --- - _toolchain_: "/home/ubuntu/c-toxcore/toolchains/" - _s_: "/home/ubuntu/c-toxcore/src/" - AND_PATH: "$_toolchain_/arm-linux-androideabi/bin:$PATH" - AND_PKG_CONFIG_PATH: "$_toolchain_/arm-linux-androideabi/sysroot/usr/lib/pkgconfig" - AND_CC: "$_toolchain_/arm-linux-androideabi/bin/arm-linux-androideabi-clang" - AND_CXX: "$_toolchain_/arm-linux-androideabi/bin/arm-linux-androideabi-clang++" -# --- Android build --- -dependencies: - pre: - - sudo apt-get update - - sudo bash -c "echo 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' >> /etc/apt/sources.list" # add backports repo - - sudo apt-get update - - sudo apt-get install astyle/trusty-backports - - sudo apt-get install clang - - sudo apt-get install build-essential libtool autotools-dev automake checkinstall check git yasm - - sudo apt-get install libopus-dev libvpx-dev pkg-config - -# ------------ network_test requires that "localhost" resolves to ::1 ------------ - - sudo bash -c "echo '::1 localhost ipv6-localhost ipv6-loopback' >> /etc/hosts" # ipv6 localhost entry -# ------------ network_test requires that "localhost" resolves to ::1 ------------ - - - 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 - - - java -version ; exit 0 - - gcc --version ; exit 0 - - clang --version ; exit 0 - - astyle --version ; exit 0 - compile: override: - ### ----- check code style ------ - - cd .. ; cp -av c-toxcore ./astyle_check/ - - cd ../astyle_check/ ; ls -al other/astyle/astylerc - - cd ../astyle_check/ ; - SOURCES=`find . -name "*.[ch]" -and -not -name "*.api.h" -and -not -wholename "*crypto_pwhash*" -and -not -wholename "./super_donators/*"|sort`; - astyle -n --options=other/astyle/astylerc $SOURCES ; exit 0 - - cd ../astyle_check/ ; git --no-pager diff - - cd ../astyle_check/ ; git diff | cat > $CIRCLE_ARTIFACTS/astyle_check.patch 2>&1 - ### ----- check code style ------ - - ### ------- get libsodium ------- - - mkdir ~/libsodium - - cd ~/libsodium/ ; git clone https://github.com/jedisct1/libsodium.git - - cd ~/libsodium/ ; cd libsodium/ ; git checkout tags/1.0.11 - - cd ~/libsodium/ ; cd libsodium/ ; ./autogen.sh - - cd ~/libsodium/ ; cd libsodium/ ; ./configure && make check - - 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'" - - cd ~/libsodium/ ; cd libsodium/ ; sudo ldconfig - ### ------- get libsodium ------- - -##### ------------ BUILD ------------ - - cmake -DASAN=ON -DDEBUG=ON -DSTRICT_ABI=ON -DTRACE=ON -DWARNINGS=OFF . - #- cmake . - - make - - sudo make install - - sudo ldconfig -v 2>/dev/null | grep toxcore - - sudo ldconfig -v 2>/dev/null | grep sodium -##### ------------ BUILD ------------ - -# --- Android build --- - - 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 - - chmod u+x ~/pp - - mkdir -p "$_s_" - - - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ - - mkdir -p $CIRCLE_ARTIFACTS/android/ - - - - . ~/pp;mkdir -p "$PKG_CONFIG_PATH" - - . ~/pp;curl -s http://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip -o android-ndk-r13b-linux-x86_64.zip - - . ~/pp;unzip android-ndk-r13b-linux-x86_64.zip - - . ~/pp;mv -v /home/ubuntu/c-toxcore/android-ndk-r13b /home/ubuntu/android-ndk - - . ~/pp;/home/ubuntu/android-ndk/build/tools/make_standalone_toolchain.py --arch arm --install-dir "$_toolchain_"/arm-linux-androideabi --api 12 --force - - - . ~/pp;cd $_s_;git clone --depth=1 --branch=v1.3.0 https://github.com/yasm/yasm.git - - . ~/pp;cd $_s_/yasm/;autoreconf -fi - - . ~/pp;rm -Rf ~/build/ - - . ~/pp;mkdir -p ~/build/ - - . ~/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 - - . ~/pp;cd ~/build/;make -j4 - - . ~/pp;cd ~/build/;make install - - - - . ~/pp;cd $_s_;git clone --depth=1 --branch=v1.6.0 https://github.com/webmproject/libvpx.git - - . ~/pp;rm -Rf ~/build/ - - . ~/pp;mkdir -p ~/build/ - - . ~/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 - - . ~/pp;cd ~/build/;make -j4 - - . ~/pp;cd ~/build/;make install - - . ~/pp;cd ~/build/;make clean - - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ - - . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install - - cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/libvpx.zip * - - - - . ~/pp;cd $_s_;git clone --depth=1 --branch=v1.1.3 https://github.com/xiph/opus.git - - . ~/pp;cd $_s_/opus/;autoreconf -fi - - . ~/pp;rm -Rf ~/build/ - - . ~/pp;mkdir -p ~/build/ - - . ~/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 - - . ~/pp;cd ~/build/;make -j4 - - . ~/pp;cd ~/build/;make install - - . ~/pp;cd ~/build/;make clean - - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ - - . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install - - cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/opus.zip * - - - - . ~/pp;cd $_s_;git clone --depth=1 --branch=1.0.11 https://github.com/jedisct1/libsodium.git - - . ~/pp;cd $_s_/libsodium/;autoreconf -fi - - . ~/pp;rm -Rf ~/build/ - - . ~/pp;mkdir -p ~/build/ - - . ~/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 - - . ~/pp;cd ~/build/;make -j4 - - . ~/pp;cd ~/build/;make install - - . ~/pp;cd ~/build/;make clean - - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ - - . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install - - cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/libsodium.zip * - - - - . ~/pp;cd ~/c-toxcore/;autoreconf -fi - - . ~/pp;rm -Rf ~/build/ - - . ~/pp;mkdir -p ~/build/ - - . ~/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 - - . ~/pp;cd ~/build/;make -j4 - - . ~/pp;cd ~/build/;make install - - . ~/pp;cd ~/build/;make clean - - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ - - . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install - - cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/c-toxcore.zip * -# --- Android build --- + - "echo 'TODO(zoff99): fix compile'" test: override: - - 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 + - "echo 'TODO(zoff99): fix compile'" + +#machine: +# environment: +# MAKEFLAGS: "j4" +## --- Android build --- +# _toolchain_: "/home/ubuntu/c-toxcore/toolchains/" +# _s_: "/home/ubuntu/c-toxcore/src/" +# AND_PATH: "$_toolchain_/arm-linux-androideabi/bin:$PATH" +# AND_PKG_CONFIG_PATH: "$_toolchain_/arm-linux-androideabi/sysroot/usr/lib/pkgconfig" +# AND_CC: "$_toolchain_/arm-linux-androideabi/bin/arm-linux-androideabi-clang" +# AND_CXX: "$_toolchain_/arm-linux-androideabi/bin/arm-linux-androideabi-clang++" +## --- Android build --- +#dependencies: +# pre: +# - sudo apt-get update +# - sudo bash -c "echo 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' >> /etc/apt/sources.list" # add backports repo +# - sudo apt-get update +# - sudo apt-get install astyle/trusty-backports +# - sudo apt-get install clang +# - sudo apt-get install build-essential libtool autotools-dev automake checkinstall git yasm +# - sudo apt-get install libopus-dev libvpx-dev pkg-config +# +## ------------ network_test requires that "localhost" resolves to ::1 ------------ +# - sudo bash -c "echo '::1 localhost ipv6-localhost ipv6-loopback' >> /etc/hosts" # ipv6 localhost entry +## ------------ network_test requires that "localhost" resolves to ::1 ------------ +# +# - 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 +# +# - java -version ; exit 0 +# - gcc --version ; exit 0 +# - clang --version ; exit 0 +# - astyle --version ; exit 0 +# +#compile: +# override: +# ### ----- check code style ------ +# - cd .. ; cp -av c-toxcore ./astyle_check/ +# - cd ../astyle_check/ ; ls -al other/astyle/astylerc +# - cd ../astyle_check/ ; +# SOURCES=`find . -name "*.[ch]" -and -not -name "*.api.h" -and -not -wholename "*crypto_pwhash*" -and -not -wholename "./super_donators/*"|sort`; +# astyle -n --options=other/astyle/astylerc $SOURCES ; exit 0 +# - cd ../astyle_check/ ; git --no-pager diff +# - cd ../astyle_check/ ; git diff | cat > $CIRCLE_ARTIFACTS/astyle_check.patch 2>&1 +# ### ----- check code style ------ +# +# ### ------- get libsodium ------- +# - mkdir ~/libsodium +# - cd ~/libsodium/ ; git clone https://github.com/jedisct1/libsodium.git +# - cd ~/libsodium/ ; cd libsodium/ ; git checkout tags/1.0.11 +# - cd ~/libsodium/ ; cd libsodium/ ; ./autogen.sh +# - cd ~/libsodium/ ; cd libsodium/ ; ./configure && make check +# - 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'" +# - cd ~/libsodium/ ; cd libsodium/ ; sudo ldconfig +# ### ------- get libsodium ------- +# +###### ------------ BUILD ------------ +# - cmake -DASAN=ON -DDEBUG=ON -DSTRICT_ABI=ON -DTRACE=ON -DWARNINGS=OFF . +# #- cmake . +# - make +# - sudo make install +# - sudo ldconfig -v 2>/dev/null | grep toxcore +# - sudo ldconfig -v 2>/dev/null | grep sodium +###### ------------ BUILD ------------ +# +## --- Android build --- +# - 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 +# - chmod u+x ~/pp +# - mkdir -p "$_s_" +# +# - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ +# - mkdir -p $CIRCLE_ARTIFACTS/android/ +# +# +# - . ~/pp;mkdir -p "$PKG_CONFIG_PATH" +# - . ~/pp;curl -s http://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip -o android-ndk-r13b-linux-x86_64.zip +# - . ~/pp;unzip android-ndk-r13b-linux-x86_64.zip +# - . ~/pp;mv -v /home/ubuntu/c-toxcore/android-ndk-r13b /home/ubuntu/android-ndk +# - . ~/pp;/home/ubuntu/android-ndk/build/tools/make_standalone_toolchain.py --arch arm --install-dir "$_toolchain_"/arm-linux-androideabi --api 12 --force +# +# - . ~/pp;cd $_s_;git clone --depth=1 --branch=v1.3.0 https://github.com/yasm/yasm.git +# - . ~/pp;cd $_s_/yasm/;autoreconf -fi +# - . ~/pp;rm -Rf ~/build/ +# - . ~/pp;mkdir -p ~/build/ +# - . ~/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 +# - . ~/pp;cd ~/build/;make -j4 +# - . ~/pp;cd ~/build/;make install +# +# +# - . ~/pp;cd $_s_;git clone --depth=1 --branch=v1.6.0 https://github.com/webmproject/libvpx.git +# - . ~/pp;rm -Rf ~/build/ +# - . ~/pp;mkdir -p ~/build/ +# - . ~/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 +# - . ~/pp;cd ~/build/;make -j4 +# - . ~/pp;cd ~/build/;make install +# - . ~/pp;cd ~/build/;make clean +# - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ +# - . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install +# - cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/libvpx.zip * +# +# +# - . ~/pp;cd $_s_;git clone --depth=1 --branch=v1.1.3 https://github.com/xiph/opus.git +# - . ~/pp;cd $_s_/opus/;autoreconf -fi +# - . ~/pp;rm -Rf ~/build/ +# - . ~/pp;mkdir -p ~/build/ +# - . ~/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 +# - . ~/pp;cd ~/build/;make -j4 +# - . ~/pp;cd ~/build/;make install +# - . ~/pp;cd ~/build/;make clean +# - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ +# - . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install +# - cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/opus.zip * +# +# +# - . ~/pp;cd $_s_;git clone --depth=1 --branch=1.0.11 https://github.com/jedisct1/libsodium.git +# - . ~/pp;cd $_s_/libsodium/;autoreconf -fi +# - . ~/pp;rm -Rf ~/build/ +# - . ~/pp;mkdir -p ~/build/ +# - . ~/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 +# - . ~/pp;cd ~/build/;make -j4 +# - . ~/pp;cd ~/build/;make install +# - . ~/pp;cd ~/build/;make clean +# - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ +# - . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install +# - cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/libsodium.zip * +# +# +# - . ~/pp;cd ~/c-toxcore/;autoreconf -fi +# - . ~/pp;rm -Rf ~/build/ +# - . ~/pp;mkdir -p ~/build/ +# - . ~/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 +# - . ~/pp;cd ~/build/;make -j4 +# - . ~/pp;cd ~/build/;make install +# - . ~/pp;cd ~/build/;make clean +# - rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/ +# - . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install +# - cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/c-toxcore.zip * +## --- Android build --- +# +#test: +# override: +# - 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 ) # For tox-bootstrapd. pkg_use_module(LIBCONFIG libconfig ) -# For auto tests. -pkg_use_module(CHECK check ) - # For tox-spectest. pkg_use_module(MSGPACK msgpack ) @@ -38,7 +35,6 @@ pkg_use_module(SNDFILE sndfile ) # These require specific installation paths of dependencies: # - libsodium in libsodium/Win32/Release/v140/static # - pthreads in pthreads-win32/Pre-built.2 -# - check in %PROGRAMFILES%/check # ############################################################################### @@ -60,27 +56,6 @@ if(MSVC) message(FATAL_ERROR "libsodium libraries not found") endif() - # check - # ----- - # - # We look for the check and compat (containing clock_gettime and other POSIX - # functions not present on Windows) libraries in Program Files, since that is - # the default location where cmake installs its packages. - find_library(LIBCHECK_LIBRARIES - NAMES check libcheck - PATHS "$ENV{PROGRAMFILES}/check/lib" - ) - find_library(LIBCOMPAT_LIBRARIES - NAMES compat libcompat - PATHS "$ENV{PROGRAMFILES}/check/lib" - ) - if(LIBCHECK_LIBRARIES AND LIBCOMPAT_LIBRARIES) - include_directories("$ENV{PROGRAMFILES}/check/include") - set(CHECK_FOUND TRUE) - set(CHECK_LIBRARIES ${LIBCHECK_LIBRARIES} ${LIBCOMPAT_LIBRARIES}) - message("check: ${CHECK_LIBRARIES}") - endif() - # pthreads # -------- 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" NCURSES_FOUND="no" LIBCONFIG_FOUND="no" -LIBCHECK_FOUND="no" WANT_NACL="no" ADD_NACL_OBJECTS_TO_PKGCONFIG="yes" SET_SO_VERSION="yes" @@ -525,17 +524,6 @@ if test "x$BUILD_AV" = "xyes"; then fi if test -n "$PKG_CONFIG"; then - if test "x$BUILD_TESTS" = "xyes"; then - PKG_CHECK_MODULES([CHECK], [check], - [ - LIBCHECK_FOUND="yes" - ], - [ - AC_MSG_WARN([libcheck not found, not building unit tests: $CHECK_PKG_ERRORS]) - BUILD_TESTS="no" - ]) - fi - if test "x$BUILD_DHT_BOOTSTRAP_DAEMON" = "xyes"; then PKG_CHECK_MODULES([LIBCONFIG], [libconfig >= 1.4.6], [ @@ -572,26 +560,6 @@ if (test "x$BUILD_DHT_BOOTSTRAP_DAEMON" = "xyes") && \ fi fi -if (test "x$BUILD_TESTS" = "xyes") && (test "x$LIBCHECK_FOUND" = "xno"); then - AC_CHECK_HEADER([check.h], - [], - [ - AC_MSG_WARN([header file for check library was not found on your system, unit tests will be disabled]) - BUILD_TESTS="no" - ] - ) - - if test "x$BUILD_TESTS" = "xyes"; then - AC_CHECK_LIB([check], [suite_create], - [], - [ - AC_MSG_WARN([library check was not found on the system, unit tests will be disabled]) - BUILD_TESTS="no" - ] - ) - fi -fi - if test "x$WIN32" = "xyes"; then AC_CHECK_LIB(ws2_32, main, [ 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="\ autotools-dev \ automake \ checkinstall \ - check \ git \ yasm \ 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 && \ apk --no-cache add --virtual build-dependencies \ autoconf \ automake \ - check-dev \ curl \ build-base \ 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 ARG VERSION_SODIUM=1.0.16 ARG VERSION_OPUS=v1.2.1 ARG VERSION_VPX=v1.6.1 -ARG VERSION_CHECK=0.12.0 ARG SUPPORT_TEST=false 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() make install cd .. - if [ "${SUPPORT_TEST}" = "true" ]; then - echo - echo "=== Building Check ${VERSION_CHECK} ${ARCH} ===" - git clone --depth=1 --branch="${VERSION_CHECK}" https://github.com/libcheck/check - cd check - autoreconf --install - ./configure --host="${WINDOWS_TOOLCHAIN}" --prefix="${EXTRA_PREFIX_DIR}" - make - make install - cd .. - fi - rm -rf /tmp/* } 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() # toxcore dependencies that we will copy to the user for static build of toxcore (e.g. vpx, opus, sodium) DEP_PREFIX_DIR="/root/prefix/${ARCH}" - # toxcore dependencies that user doesn't need in build result (e.g. libcheck used for testing toxcore) + # toxcore dependencies that user doesn't need in build result EXTRA_DEP_PREFIX_DIR="/root/extra-prefix/${ARCH}" mkdir -p "${EXTRA_DEP_PREFIX_DIR}" @@ -73,7 +73,7 @@ build() winecfg export CTEST_OUTPUT_ON_FAILURE=1 - # add libgcc_s_sjlj-1.dll libwinpthread-1.dll libcheck-0.dll into PATH env var of wine + # add libgcc_s_sjlj-1.dll libwinpthread-1.dll into PATH env var of wine 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` 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 ] || [ " gmake \ cmake \ pkgconf \ - check \ opencv \ portaudio \ 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 @@ # Workaround for bug in Homebrew where it only finds an old Ruby version. brew update -brew install libsodium libvpx opus libconfig check astyle +brew install libsodium libvpx opus libconfig astyle -- cgit v1.2.3