diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-02-23 14:48:46 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-02-23 14:48:46 -0800 |
| commit | c457bddfae64521ea9861f2211e6cb25858559b3 (patch) | |
| tree | 4c0ef1c7450198ce14ef4fbcdddb5d47e911fb4f /tests | |
| parent | c31c9147320741904b604e2172f99d5ca08eb417 (diff) | |
| download | nng-c457bddfae64521ea9861f2211e6cb25858559b3.tar.gz nng-c457bddfae64521ea9861f2211e6cb25858559b3.tar.bz2 nng-c457bddfae64521ea9861f2211e6cb25858559b3.zip | |
Move compatibility header so that <nanomsg/nn.h> works.
Basically, we have moved the compat stuff into a separate directory.
Compatibility layer users will have to update their compile flags, but
should be able to avoid changing any *source* files with this change.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/CMakeLists.txt | 15 | ||||
| -rw-r--r-- | tests/compat_block.c | 2 | ||||
| -rw-r--r-- | tests/compat_bug777.c | 7 | ||||
| -rw-r--r-- | tests/compat_bus.c | 2 | ||||
| -rw-r--r-- | tests/compat_cmsg.c | 4 | ||||
| -rw-r--r-- | tests/compat_device.c | 2 | ||||
| -rw-r--r-- | tests/compat_iovec.c | 2 | ||||
| -rw-r--r-- | tests/compat_msg.c | 2 | ||||
| -rw-r--r-- | tests/compat_pair.c | 2 | ||||
| -rw-r--r-- | tests/compat_pipeline.c | 2 | ||||
| -rw-r--r-- | tests/compat_reqrep.c | 6 | ||||
| -rw-r--r-- | tests/compat_reqttl.c | 4 | ||||
| -rw-r--r-- | tests/compat_shutdown.c | 2 | ||||
| -rw-r--r-- | tests/compat_survey.c | 2 | ||||
| -rw-r--r-- | tests/compat_testutil.c | 4 |
15 files changed, 25 insertions, 33 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 51903572..df7e5701 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -3,7 +3,7 @@ # Copyright (c) 2013 GoPivotal, Inc. All rights reserved. # Copyright (c) 2015-2016 Jack R. Dunaway. All rights reserved. # Copyright 2016 Franklin "Snaipe" Mathieu <franklinmathieu@gmail.com> -# Copyright 2018 Garrett D'Amore <garrett@damore.org> +# Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> # Copyright 2018 Capitar IT Group BV <info@capitar.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -53,9 +53,6 @@ if (NNG_TESTS) target_link_libraries (${NAME} ${PROJECT_NAME}_static) target_link_libraries (${NAME} ${NNG_REQUIRED_LIBRARIES}) target_compile_definitions(${NAME} PUBLIC -DNNG_STATIC_LIB) - if (CMAKE_THREAD_LIBS_INIT) - target_link_libraries (${NAME} "${CMAKE_THREAD_LIBS_INIT}") - endif() add_test (NAME ${NAME} COMMAND ${NAME} -v -p TEST_PORT=${TEST_PORT}) set_tests_properties (${NAME} PROPERTIES TIMEOUT ${TIMEOUT}) @@ -81,9 +78,8 @@ if (NNG_TESTS) target_link_libraries (${NAME} ${PROJECT_NAME}_static) target_link_libraries (${NAME} ${NNG_REQUIRED_LIBRARIES}) target_compile_definitions(${NAME} PUBLIC -DNNG_STATIC_LIB) - if (CMAKE_THREAD_LIBS_INIT) - target_link_libraries (${NAME} "${CMAKE_THREAD_LIBS_INIT}") - endif() + target_include_directories(${NAME} PUBLIC + ${PROJECT_SOURCE_DIR}/src/compat) add_test (NAME ${NAME} COMMAND ${NAME} ${TEST_PORT}) set_tests_properties (${NAME} PROPERTIES TIMEOUT ${TIMEOUT}) @@ -92,7 +88,7 @@ if (NNG_TESTS) else () macro (add_nng_compat_test NAME TIMEOUT) endmacro (add_nng_compat_test) - message (STATUS "Compatibility tests disabled (unconfigured legacy protocols)") + message (STATUS "Compatibility tests disabled (unconfigured protocols)") endif () macro (add_nng_cpp_test NAME TIMEOUT) @@ -103,9 +99,6 @@ if (NNG_TESTS) target_link_libraries (${NAME} ${PROJECT_NAME}_static) target_link_libraries (${NAME} ${NNG_REQUIRED_LIBRARIES}) target_compile_definitions(${NAME} PUBLIC -DNNG_STATIC_LIB) - if (CMAKE_THREAD_LIBS_INIT) - target_link_libraries (${NAME} "${CMAKE_THREAD_LIBS_INIT}") - endif() add_test (NAME ${NAME} COMMAND ${NAME} ${TEST_PORT}) set_tests_properties (${NAME} PROPERTIES TIMEOUT ${TIMEOUT}) diff --git a/tests/compat_block.c b/tests/compat_block.c index e873cc86..65bd123c 100644 --- a/tests/compat_block.c +++ b/tests/compat_block.c @@ -20,7 +20,7 @@ IN THE SOFTWARE. */ -#include "nng_compat.h" +#include <nanomsg/nn.h> #include "compat_testutil.h" /* This test checks whether blocking on send/recv works as expected. */ diff --git a/tests/compat_bug777.c b/tests/compat_bug777.c index ba4a8b02..f5cfde6a 100644 --- a/tests/compat_bug777.c +++ b/tests/compat_bug777.c @@ -1,6 +1,6 @@ /* - Copyright 2017 Garrett D'Amore <garrett@damore.org> - Copyright 2017 Capitar IT Group BV <info@capitar.com> + Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> + Copyright 2018 Capitar IT Group BV <info@capitar.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -21,8 +21,7 @@ IN THE SOFTWARE. */ -#include "nng_compat.h" -#include "nng.h" +#include <nanomsg/nn.h> #include "compat_testutil.h" int main (NN_UNUSED int argc, NN_UNUSED const char *argv[]) diff --git a/tests/compat_bus.c b/tests/compat_bus.c index ac4cc030..a8b380ab 100644 --- a/tests/compat_bus.c +++ b/tests/compat_bus.c @@ -20,7 +20,7 @@ IN THE SOFTWARE. */ -#include "nng_compat.h" +#include <nanomsg/nn.h> #include "compat_testutil.h" #define SOCKET_ADDRESS_A "inproc://a" diff --git a/tests/compat_cmsg.c b/tests/compat_cmsg.c index 4d70dabe..9484161b 100644 --- a/tests/compat_cmsg.c +++ b/tests/compat_cmsg.c @@ -1,6 +1,6 @@ /* Copyright (c) 2014 Martin Sustrik All rights reserved. - Copyright 2015 Garrett D'Amore <garrett@damore.org> + Copyright 2018 Garrett D'Amore <garrett@damore.org> Copyright 2016 Franklin "Snaipe" Mathieu <franklinmathieu@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy @@ -22,7 +22,7 @@ IN THE SOFTWARE. */ -#include "nng_compat.h" +#include <nanomsg/nn.h> #include "compat_testutil.h" int main (int argc, const char *argv[]) diff --git a/tests/compat_device.c b/tests/compat_device.c index e04839ef..21b9c16e 100644 --- a/tests/compat_device.c +++ b/tests/compat_device.c @@ -21,7 +21,7 @@ * IN THE SOFTWARE. */ -#include "nng_compat.h" +#include <nanomsg/nn.h> #include "compat_testutil.h" #define SOCKET_ADDRESS_A "inproc://a" diff --git a/tests/compat_iovec.c b/tests/compat_iovec.c index 44cb5deb..6a68e1ba 100644 --- a/tests/compat_iovec.c +++ b/tests/compat_iovec.c @@ -20,7 +20,7 @@ IN THE SOFTWARE. */ -#include "nng_compat.h" +#include <nanomsg/nn.h> #include "compat_testutil.h" diff --git a/tests/compat_msg.c b/tests/compat_msg.c index 683739d3..7618ea0a 100644 --- a/tests/compat_msg.c +++ b/tests/compat_msg.c @@ -23,7 +23,7 @@ IN THE SOFTWARE. */ -#include "nng_compat.h" +#include <nanomsg/nn.h> #include "compat_testutil.h" #include <string.h> diff --git a/tests/compat_pair.c b/tests/compat_pair.c index d12e135e..769b99fa 100644 --- a/tests/compat_pair.c +++ b/tests/compat_pair.c @@ -20,7 +20,7 @@ IN THE SOFTWARE. */ -#include "nng_compat.h" +#include <nanomsg/nn.h> #include "compat_testutil.h" diff --git a/tests/compat_pipeline.c b/tests/compat_pipeline.c index 4ed58af7..2e5b0de9 100644 --- a/tests/compat_pipeline.c +++ b/tests/compat_pipeline.c @@ -21,7 +21,7 @@ IN THE SOFTWARE. */ -#include "nng_compat.h" +#include <nanomsg/nn.h> #include "compat_testutil.h" #define SOCKET_ADDRESS "inproc://a" diff --git a/tests/compat_reqrep.c b/tests/compat_reqrep.c index 046955cf..79bb74bb 100644 --- a/tests/compat_reqrep.c +++ b/tests/compat_reqrep.c @@ -1,7 +1,7 @@ /* Copyright (c) 2012 Martin Sustrik All rights reserved. - Copyright 2017 Garrett D'Amore <garrett@damore.org> - Copyright 2017 Capitar IT Group BV <info@capitar.com> + Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> + Copyright 2018 Capitar IT Group BV <info@capitar.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -22,7 +22,7 @@ IN THE SOFTWARE. */ -#include "nng_compat.h" +#include <nanomsg/nn.h> #include "compat_testutil.h" diff --git a/tests/compat_reqttl.c b/tests/compat_reqttl.c index c758f92e..84c73e09 100644 --- a/tests/compat_reqttl.c +++ b/tests/compat_reqttl.c @@ -2,7 +2,7 @@ Copyright (c) 2012 Martin Sustrik All rights reserved. Copyright (c) 2013 GoPivotal, Inc. All rights reserved. Copyright 2016 Franklin "Snaipe" Mathieu <franklinmathieu@gmail.com> - Copyright 2017 Garrett D'Amore <garrett@damore.org> + Copyright 2018 Garrett D'Amore <garrett@damore.org> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -23,7 +23,7 @@ IN THE SOFTWARE. */ -#include "nng_compat.h" +#include <nanomsg/nn.h> #include "compat_testutil.h" diff --git a/tests/compat_shutdown.c b/tests/compat_shutdown.c index 834eacee..6d078ee2 100644 --- a/tests/compat_shutdown.c +++ b/tests/compat_shutdown.c @@ -21,7 +21,7 @@ IN THE SOFTWARE. */ -#include "nng_compat.h" +#include <nanomsg/nn.h> #include "compat_testutil.h" int main (int argc, const char *argv[]) diff --git a/tests/compat_survey.c b/tests/compat_survey.c index fc5f8091..30b7ae68 100644 --- a/tests/compat_survey.c +++ b/tests/compat_survey.c @@ -21,7 +21,7 @@ DEALINGS IN THE SOFTWARE. */ -#include "nng_compat.h" +#include <nanomsg/nn.h> #include "compat_testutil.h" diff --git a/tests/compat_testutil.c b/tests/compat_testutil.c index e24f31fc..ef17cb3f 100644 --- a/tests/compat_testutil.c +++ b/tests/compat_testutil.c @@ -32,8 +32,8 @@ #include <stdlib.h> #include <string.h> +#include <nanomsg/nn.h> #include "compat_testutil.h" -#include "nng_compat.h" int test_socket_impl(char *file, int line, int family, int protocol); int test_connect_impl(char *file, int line, int sock, char *address); @@ -226,4 +226,4 @@ void nn_sleep(int ms) { nng_msleep(ms); -}
\ No newline at end of file +} |
