diff options
author | Marcin Siodelski <marcin@isc.org> | 2014-06-04 21:42:12 +0200 |
---|---|---|
committer | Marcin Siodelski <marcin@isc.org> | 2014-06-04 21:42:12 +0200 |
commit | 6c18e5addb9d96bfe66a4c1aa34fde48a00f3e4b (patch) | |
tree | 938ee80ddee02ceee10affa5bcc09e248ef2871b /src/lib/util | |
parent | [3405] Include shell test scripts when performing distcheck. (diff) | |
download | kea-6c18e5addb9d96bfe66a4c1aa34fde48a00f3e4b.tar.xz kea-6c18e5addb9d96bfe66a4c1aa34fde48a00f3e4b.zip |
[3405] Moved SignalSet class to util from util:io.
Diffstat (limited to 'src/lib/util')
-rw-r--r-- | src/lib/util/Makefile.am | 1 | ||||
-rw-r--r-- | src/lib/util/io/Makefile.am | 3 | ||||
-rw-r--r-- | src/lib/util/io/tests/Makefile.am | 31 | ||||
-rw-r--r-- | src/lib/util/io/tests/run_unittests.cc | 23 | ||||
-rw-r--r-- | src/lib/util/signal_set.cc (renamed from src/lib/util/io/signal_set.cc) | 6 | ||||
-rw-r--r-- | src/lib/util/signal_set.h (renamed from src/lib/util/io/signal_set.h) | 2 | ||||
-rw-r--r-- | src/lib/util/tests/Makefile.am | 1 | ||||
-rw-r--r-- | src/lib/util/tests/signal_set_unittest.cc (renamed from src/lib/util/io/tests/signal_set_unittest.cc) | 6 |
8 files changed, 8 insertions, 65 deletions
diff --git a/src/lib/util/Makefile.am b/src/lib/util/Makefile.am index ffb84719d5..1f47ed3a6c 100644 --- a/src/lib/util/Makefile.am +++ b/src/lib/util/Makefile.am @@ -31,6 +31,7 @@ if USE_SHARED_MEMORY libkea_util_la_SOURCES += memory_segment_mapped.h memory_segment_mapped.cc endif libkea_util_la_SOURCES += range_utilities.h +libkea_util_la_SOURCES += signal_set.cc signal_set.h libkea_util_la_SOURCES += hash/sha1.h hash/sha1.cc libkea_util_la_SOURCES += encode/base16_from_binary.h libkea_util_la_SOURCES += encode/base32hex.h encode/base64.h diff --git a/src/lib/util/io/Makefile.am b/src/lib/util/io/Makefile.am index c0fae76b1f..8a1522d734 100644 --- a/src/lib/util/io/Makefile.am +++ b/src/lib/util/io/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = . tests +SUBDIRS = . AM_CXXFLAGS = $(B10_CXXFLAGS) AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib @@ -7,7 +7,6 @@ AM_CPPFLAGS += $(BOOST_INCLUDES) lib_LTLIBRARIES = libkea-util-io.la libkea_util_io_la_SOURCES = fd.h fd.cc fd_share.h fd_share.cc libkea_util_io_la_SOURCES += socketsession.h socketsession.cc sockaddr_util.h -libkea_util_io_la_SOURCES += signal_set.cc signal_set.h libkea_util_io_la_SOURCES += pktinfo_utilities.h libkea_util_io_la_LIBADD = $(top_builddir)/src/lib/exceptions/libkea-exceptions.la diff --git a/src/lib/util/io/tests/Makefile.am b/src/lib/util/io/tests/Makefile.am deleted file mode 100644 index d71c28b8c3..0000000000 --- a/src/lib/util/io/tests/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -SUBDIRS = . - -AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib -AM_CPPFLAGS += $(BOOST_INCLUDES) -AM_CXXFLAGS = $(B10_CXXFLAGS) - -if USE_STATIC_LINK -AM_LDFLAGS = -static -endif - -CLEANFILES = *.gcno *.gcda - -TESTS_ENVIRONMENT = \ - $(LIBTOOL) --mode=execute $(VALGRIND_COMMAND) - -TESTS = -if HAVE_GTEST -TESTS += run_unittests -run_unittests_SOURCES = run_unittests.cc -run_unittests_SOURCES += signal_set_unittest.cc - -run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES) -run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS) - -run_unittests_LDADD = $(top_builddir)/src/lib/exceptions/libkea-exceptions.la -run_unittests_LDADD += $(top_builddir)/src/lib/util/io/libkea-util-io.la -run_unittests_LDADD += $(GTEST_LDADD) - -endif - -noinst_PROGRAMS = $(TESTS) diff --git a/src/lib/util/io/tests/run_unittests.cc b/src/lib/util/io/tests/run_unittests.cc deleted file mode 100644 index 304c652382..0000000000 --- a/src/lib/util/io/tests/run_unittests.cc +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC") -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -// PERFORMANCE OF THIS SOFTWARE. - -#include <log/logger_support.h> -#include <gtest/gtest.h> - -int -main(int argc, char* argv[]) { - ::testing::InitGoogleTest(&argc, argv); - int result = RUN_ALL_TESTS(); - return (result); -} diff --git a/src/lib/util/io/signal_set.cc b/src/lib/util/signal_set.cc index b187df69d1..5834c409f2 100644 --- a/src/lib/util/io/signal_set.cc +++ b/src/lib/util/signal_set.cc @@ -12,13 +12,13 @@ // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR // PERFORMANCE OF THIS SOFTWARE. -#include <util/io/signal_set.h> +#include <util/signal_set.h> #include <cerrno> #include <list> using namespace isc; -using namespace isc::util::io; +using namespace isc::util; namespace { @@ -70,7 +70,6 @@ void internalHandler(int sig) { namespace isc { namespace util { -namespace io { SignalSet::SignalSet(const int sig0) { add(sig0); @@ -222,6 +221,5 @@ SignalSet::remove(const int sig) { } } -} // end of isc::util::io } // end of isc::util } // end of isc diff --git a/src/lib/util/io/signal_set.h b/src/lib/util/signal_set.h index 5d52559568..f561d9c44c 100644 --- a/src/lib/util/io/signal_set.h +++ b/src/lib/util/signal_set.h @@ -24,7 +24,6 @@ namespace isc { namespace util { -namespace io { /// @brief Exception thrown when the @c isc::util::io::SignalSet class /// experiences an error. @@ -183,7 +182,6 @@ private: } } -} #endif // SIGNAL_SET_H diff --git a/src/lib/util/tests/Makefile.am b/src/lib/util/tests/Makefile.am index b3019dbefd..c4cc086cc4 100644 --- a/src/lib/util/tests/Makefile.am +++ b/src/lib/util/tests/Makefile.am @@ -47,6 +47,7 @@ run_unittests_SOURCES += socketsession_unittest.cc run_unittests_SOURCES += strutil_unittest.cc run_unittests_SOURCES += time_utilities_unittest.cc run_unittests_SOURCES += range_utilities_unittest.cc +run_unittests_SOURCES += signal_set_unittest.cc run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES) run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS) diff --git a/src/lib/util/io/tests/signal_set_unittest.cc b/src/lib/util/tests/signal_set_unittest.cc index 9fcd4fda47..58bc0d8760 100644 --- a/src/lib/util/io/tests/signal_set_unittest.cc +++ b/src/lib/util/tests/signal_set_unittest.cc @@ -12,7 +12,7 @@ // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR // PERFORMANCE OF THIS SOFTWARE. -#include <util/io/signal_set.h> +#include <util/signal_set.h> #include <boost/bind.hpp> #include <boost/shared_ptr.hpp> #include <gtest/gtest.h> @@ -21,9 +21,9 @@ namespace { using namespace isc; -using namespace isc::util::io; +using namespace isc::util; -/// @brief Test fixture class for @c isc::util::io::SignalSet class. +/// @brief Test fixture class for @c isc::util::SignalSet class. /// /// This class contains a handler function which records the signal /// being handled. It allows for checking whether the signal set |