Skip to content

Commit

Permalink
Fix test warnings regarding boost dynamic linking define
Browse files Browse the repository at this point in the history
Meson passes BOOST_TEST_DYN_LINK through the command line so there's no need to re-define
it in each test file. Otherwise the compiler warns about the redefinition.

warning: "BOOST_TEST_DYN_LINK" redefined
    1 | #define BOOST_TEST_DYN_LINK
      |
<command-line>: note: this is the location of the previous definition
  • Loading branch information
fredmorcos committed Nov 23, 2023
1 parent 4bb0d3a commit 1c2d079
Show file tree
Hide file tree
Showing 99 changed files with 306 additions and 3 deletions.
3 changes: 3 additions & 0 deletions modules/remotebackend/test-remotebackend-http.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ class RemoteLoader

std::unique_ptr<DNSBackend> backendUnderTest;

#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_MAIN
#define BOOST_TEST_MODULE unit

Expand Down
3 changes: 3 additions & 0 deletions modules/remotebackend/test-remotebackend-json.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ class RemoteLoader

std::unique_ptr<DNSBackend> backendUnderTest;

#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_MAIN
#define BOOST_TEST_MODULE unit

Expand Down
3 changes: 3 additions & 0 deletions modules/remotebackend/test-remotebackend-pipe.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_MAIN
#define BOOST_TEST_MODULE unit

Expand Down
3 changes: 3 additions & 0 deletions modules/remotebackend/test-remotebackend-post.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ class RemoteLoader

std::unique_ptr<DNSBackend> backendUnderTest;

#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_MAIN
#define BOOST_TEST_MODULE unit

Expand Down
3 changes: 3 additions & 0 deletions modules/remotebackend/test-remotebackend-unix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_MAIN
#define BOOST_TEST_MODULE unit

Expand Down
3 changes: 3 additions & 0 deletions modules/remotebackend/test-remotebackend-zeromq.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_MAIN
#define BOOST_TEST_MODULE unit

Expand Down
3 changes: 3 additions & 0 deletions modules/remotebackend/test-remotebackend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#ifdef HAVE_CONFIG_H
Expand Down
4 changes: 3 additions & 1 deletion pdns/dnsdistdist/test-connectionmanagement_hh.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#include <boost/test/unit_test.hpp>
Expand Down
3 changes: 3 additions & 0 deletions pdns/dnsdistdist/test-delaypipe_hh.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN
#ifdef HAVE_CONFIG_H
#include "config.h"
Expand Down
3 changes: 3 additions & 0 deletions pdns/dnsdistdist/test-dnsdist-connections-cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#include <boost/test/unit_test.hpp>
Expand Down
3 changes: 3 additions & 0 deletions pdns/dnsdistdist/test-dnsdist-dnsparser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#include <boost/test/unit_test.hpp>
Expand Down
3 changes: 3 additions & 0 deletions pdns/dnsdistdist/test-dnsdist-lua-ffi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#include <boost/test/unit_test.hpp>
Expand Down
3 changes: 3 additions & 0 deletions pdns/dnsdistdist/test-dnsdistasync.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#include <boost/test/unit_test.hpp>
Expand Down
3 changes: 3 additions & 0 deletions pdns/dnsdistdist/test-dnsdistbackend_cc.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#include <boost/test/unit_test.hpp>
Expand Down
3 changes: 3 additions & 0 deletions pdns/dnsdistdist/test-dnsdistdynblocks_hh.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#include <boost/test/unit_test.hpp>
Expand Down
3 changes: 3 additions & 0 deletions pdns/dnsdistdist/test-dnsdistedns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#include <boost/test/unit_test.hpp>
Expand Down
3 changes: 3 additions & 0 deletions pdns/dnsdistdist/test-dnsdistkvs_cc.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#include <boost/test/unit_test.hpp>
Expand Down
3 changes: 3 additions & 0 deletions pdns/dnsdistdist/test-dnsdistlbpolicies_cc.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#include <boost/test/unit_test.hpp>
Expand Down
3 changes: 3 additions & 0 deletions pdns/dnsdistdist/test-dnsdistluanetwork.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#include <boost/test/unit_test.hpp>
Expand Down
3 changes: 3 additions & 0 deletions pdns/dnsdistdist/test-dnsdistnghttp2-in_cc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#include <boost/test/unit_test.hpp>
Expand Down
3 changes: 3 additions & 0 deletions pdns/dnsdistdist/test-dnsdistnghttp2_cc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#include <boost/test/unit_test.hpp>
Expand Down
3 changes: 3 additions & 0 deletions pdns/dnsdistdist/test-dnsdistrings_cc.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#include <thread>
Expand Down
3 changes: 3 additions & 0 deletions pdns/dnsdistdist/test-dnsdistrules_cc.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#include <thread>
Expand Down
3 changes: 3 additions & 0 deletions pdns/dnsdistdist/test-dnsdistsvc_cc.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#include <boost/test/unit_test.hpp>
Expand Down
3 changes: 3 additions & 0 deletions pdns/dnsdistdist/test-dnsdisttcp_cc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#include <boost/test/unit_test.hpp>
Expand Down
3 changes: 3 additions & 0 deletions pdns/dnsdistdist/testrunner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_MAIN
#define BOOST_TEST_MODULE unit

Expand Down
3 changes: 3 additions & 0 deletions pdns/recursordist/test-aggressive_nsec_cc.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#include <boost/test/unit_test.hpp>

#include "aggressive_nsec.hh"
Expand Down
3 changes: 3 additions & 0 deletions pdns/recursordist/test-ednsoptions_cc.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#ifdef HAVE_CONFIG_H
Expand Down
3 changes: 3 additions & 0 deletions pdns/recursordist/test-filterpo_cc.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#ifdef HAVE_CONFIG_H
Expand Down
3 changes: 3 additions & 0 deletions pdns/recursordist/test-histogram_hh.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#ifdef HAVE_CONFIG_H
Expand Down
3 changes: 3 additions & 0 deletions pdns/recursordist/test-mtasker.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#ifdef HAVE_CONFIG_H
Expand Down
3 changes: 3 additions & 0 deletions pdns/recursordist/test-negcache_cc.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN
#include <boost/test/unit_test.hpp>

Expand Down
3 changes: 3 additions & 0 deletions pdns/recursordist/test-nod_cc.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN
#include <boost/test/unit_test.hpp>
#include "nod.hh"
Expand Down
3 changes: 3 additions & 0 deletions pdns/recursordist/test-rec-taskqueue.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#include <boost/test/unit_test.hpp>

#include <stdio.h>
Expand Down
3 changes: 3 additions & 0 deletions pdns/recursordist/test-rec-tcounters_cc.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#ifdef HAVE_CONFIG_H
Expand Down
3 changes: 3 additions & 0 deletions pdns/recursordist/test-rec-zonetocache.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#include <boost/test/unit_test.hpp>

#include <stdio.h>
Expand Down
3 changes: 3 additions & 0 deletions pdns/recursordist/test-recpacketcache_cc.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#ifdef HAVE_CONFIG_H
Expand Down
3 changes: 3 additions & 0 deletions pdns/recursordist/test-recursorcache_cc.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#ifdef HAVE_CONFIG_H
Expand Down
3 changes: 3 additions & 0 deletions pdns/recursordist/test-reczones-helpers.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#include <boost/test/unit_test.hpp>

#include <cstdio>
Expand Down
3 changes: 3 additions & 0 deletions pdns/recursordist/test-secpoll_cc.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_NO_MAIN

#ifdef HAVE_CONFIG_H
Expand Down
3 changes: 3 additions & 0 deletions pdns/recursordist/test-settings.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#include <boost/test/unit_test.hpp>

#include <memory>
Expand Down
3 changes: 3 additions & 0 deletions pdns/recursordist/test-syncres_cc.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif

#include <boost/test/unit_test.hpp>

#include "aggressive_nsec.hh"
Expand Down
Loading

0 comments on commit 1c2d079

Please sign in to comment.