diff --git a/configure.ac b/configure.ac index 3470d12044..860c8c2891 100644 --- a/configure.ac +++ b/configure.ac @@ -1363,6 +1363,8 @@ AC_CONFIG_FILES([compatcheck/Makefile ext/Makefile m4macros/Makefile Makefile + src/Makefile + src/bin/Makefile src/bin/d2/Makefile src/bin/d2/spec_config.h.pre src/bin/d2/tests/Makefile @@ -1370,30 +1372,33 @@ AC_CONFIG_FILES([compatcheck/Makefile src/bin/d2/tests/test_data_files_config.h src/bin/dhcp4/Makefile src/bin/dhcp4/spec_config.h.pre - src/bin/dhcp4/tests/dhcp4_process_tests.sh src/bin/dhcp4/tests/Makefile + src/bin/dhcp4/tests/dhcp4_process_tests.sh src/bin/dhcp4/tests/marker_file.h src/bin/dhcp4/tests/test_data_files_config.h src/bin/dhcp4/tests/test_libraries.h src/bin/dhcp6/Makefile src/bin/dhcp6/spec_config.h.pre - src/bin/dhcp6/tests/dhcp6_process_tests.sh src/bin/dhcp6/tests/Makefile + src/bin/dhcp6/tests/dhcp6_process_tests.sh src/bin/dhcp6/tests/marker_file.h src/bin/dhcp6/tests/test_data_files_config.h src/bin/dhcp6/tests/test_libraries.h - src/bin/keactrl/keactrl - src/bin/keactrl/kea.conf - src/bin/keactrl/keactrl.conf src/bin/keactrl/Makefile - src/bin/keactrl/tests/keactrl_tests.sh + src/bin/keactrl/kea.conf + src/bin/keactrl/keactrl + src/bin/keactrl/keactrl.conf src/bin/keactrl/tests/Makefile - src/bin/Makefile + src/bin/keactrl/tests/keactrl_tests.sh + src/bin/perfdhcp/Makefile + src/bin/perfdhcp/tests/Makefile + src/bin/perfdhcp/tests/testdata/Makefile + src/hooks/Makefile src/hooks/dhcp/Makefile src/hooks/dhcp/user_chk/Makefile src/hooks/dhcp/user_chk/tests/Makefile src/hooks/dhcp/user_chk/tests/test_data_files_config.h - src/hooks/Makefile + src/lib/Makefile src/lib/asiodns/Makefile src/lib/asiodns/tests/Makefile src/lib/asiolink/Makefile @@ -1403,21 +1408,21 @@ AC_CONFIG_FILES([compatcheck/Makefile src/lib/cc/tests/Makefile src/lib/cc/tests/session_unittests_config.h src/lib/config/Makefile - src/lib/config/tests/data_def_unittests_config.h src/lib/config/tests/Makefile + src/lib/config/tests/data_def_unittests_config.h src/lib/config/tests/testdata/Makefile src/lib/cryptolink/Makefile src/lib/cryptolink/tests/Makefile + src/lib/dhcp/Makefile + src/lib/dhcp/tests/Makefile src/lib/dhcp_ddns/Makefile src/lib/dhcp_ddns/tests/Makefile - src/lib/dhcp/Makefile src/lib/dhcpsrv/Makefile - src/lib/dhcpsrv/testutils/Makefile src/lib/dhcpsrv/tests/Makefile src/lib/dhcpsrv/tests/test_libraries.h - src/lib/dhcp/tests/Makefile - src/lib/dns/gen-rdatacode.py + src/lib/dhcpsrv/testutils/Makefile src/lib/dns/Makefile + src/lib/dns/gen-rdatacode.py src/lib/dns/tests/Makefile src/lib/dns/tests/testdata/Makefile src/lib/exceptions/Makefile @@ -1426,37 +1431,32 @@ AC_CONFIG_FILES([compatcheck/Makefile src/lib/hooks/tests/Makefile src/lib/hooks/tests/marker_file.h src/lib/hooks/tests/test_libraries.h + src/lib/log/Makefile src/lib/log/compiler/Makefile src/lib/log/interprocess/Makefile src/lib/log/interprocess/tests/Makefile - src/lib/log/Makefile + src/lib/log/tests/Makefile src/lib/log/tests/buffer_logger_test.sh src/lib/log/tests/console_test.sh src/lib/log/tests/destination_test.sh src/lib/log/tests/init_logger_test.sh src/lib/log/tests/local_file_test.sh src/lib/log/tests/logger_lock_test.sh - src/lib/log/tests/Makefile src/lib/log/tests/severity_test.sh src/lib/log/tests/tempdir.h - src/lib/Makefile - src/lib/testutils/dhcp_test_lib.sh src/lib/testutils/Makefile + src/lib/testutils/dhcp_test_lib.sh src/lib/testutils/testdata/Makefile - src/lib/util/io/Makefile src/lib/util/Makefile - src/lib/util/python/gen_wiredata.py + src/lib/util/io/Makefile src/lib/util/python/Makefile + src/lib/util/python/gen_wiredata.py src/lib/util/tests/Makefile src/lib/util/threads/Makefile src/lib/util/threads/tests/Makefile src/lib/util/unittests/Makefile - src/Makefile tests/Makefile tests/tools/Makefile - tests/tools/perfdhcp/Makefile - tests/tools/perfdhcp/tests/Makefile - tests/tools/perfdhcp/tests/testdata/Makefile ]) AC_CONFIG_COMMANDS([permissions], [ diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am index 3ffb1b72a7..a3c5e15610 100644 --- a/src/bin/Makefile.am +++ b/src/bin/Makefile.am @@ -1,5 +1,5 @@ # The following build order must be maintained. -SUBDIRS = dhcp4 dhcp6 d2 +SUBDIRS = dhcp4 dhcp6 d2 perfdhcp if CONFIG_BACKEND_JSON SUBDIRS += keactrl diff --git a/tests/tools/perfdhcp/.gitignore b/src/bin/perfdhcp/.gitignore similarity index 100% rename from tests/tools/perfdhcp/.gitignore rename to src/bin/perfdhcp/.gitignore diff --git a/tests/tools/perfdhcp/Makefile.am b/src/bin/perfdhcp/Makefile.am similarity index 96% rename from tests/tools/perfdhcp/Makefile.am rename to src/bin/perfdhcp/Makefile.am index f9c7a6fc22..0c03353704 100644 --- a/tests/tools/perfdhcp/Makefile.am +++ b/src/bin/perfdhcp/Makefile.am @@ -17,7 +17,7 @@ if USE_STATIC_LINK AM_LDFLAGS += -static endif -bin_PROGRAMS = perfdhcp +sbin_PROGRAMS = perfdhcp perfdhcp_SOURCES = main.cc perfdhcp_SOURCES += command_options.cc command_options.h perfdhcp_SOURCES += localized_option.h @@ -45,13 +45,13 @@ perfdhcp_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la # ... and the documentation EXTRA_DIST = perfdhcp_internals.dox -man_MANS = perfdhcp.1 +man_MANS = perfdhcp.8 DISTCLEANFILES = $(man_MANS) EXTRA_DIST += $(man_MANS) perfdhcp.xml if GENERATE_DOCS -perfdhcp.1: perfdhcp.xml +perfdhcp.8: perfdhcp.xml @XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(builddir)/perfdhcp.xml else diff --git a/tests/tools/perfdhcp/command_options.cc b/src/bin/perfdhcp/command_options.cc similarity index 100% rename from tests/tools/perfdhcp/command_options.cc rename to src/bin/perfdhcp/command_options.cc diff --git a/tests/tools/perfdhcp/command_options.h b/src/bin/perfdhcp/command_options.h similarity index 100% rename from tests/tools/perfdhcp/command_options.h rename to src/bin/perfdhcp/command_options.h diff --git a/tests/tools/perfdhcp/localized_option.h b/src/bin/perfdhcp/localized_option.h similarity index 100% rename from tests/tools/perfdhcp/localized_option.h rename to src/bin/perfdhcp/localized_option.h diff --git a/tests/tools/perfdhcp/main.cc b/src/bin/perfdhcp/main.cc similarity index 97% rename from tests/tools/perfdhcp/main.cc rename to src/bin/perfdhcp/main.cc index a5254fc915..06d123a7c1 100644 --- a/tests/tools/perfdhcp/main.cc +++ b/src/bin/perfdhcp/main.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2012-2013 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2012-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 @@ -61,4 +61,3 @@ main(int argc, char* argv[]) { } return (ret_code); } - diff --git a/tests/tools/perfdhcp/packet_storage.h b/src/bin/perfdhcp/packet_storage.h similarity index 100% rename from tests/tools/perfdhcp/packet_storage.h rename to src/bin/perfdhcp/packet_storage.h diff --git a/tests/tools/perfdhcp/perf_pkt4.cc b/src/bin/perfdhcp/perf_pkt4.cc similarity index 100% rename from tests/tools/perfdhcp/perf_pkt4.cc rename to src/bin/perfdhcp/perf_pkt4.cc diff --git a/tests/tools/perfdhcp/perf_pkt4.h b/src/bin/perfdhcp/perf_pkt4.h similarity index 98% rename from tests/tools/perfdhcp/perf_pkt4.h rename to src/bin/perfdhcp/perf_pkt4.h index 6f031936bc..d3f82e422f 100644 --- a/tests/tools/perfdhcp/perf_pkt4.h +++ b/src/bin/perfdhcp/perf_pkt4.h @@ -1,4 +1,4 @@ -// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2012-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 @@ -113,7 +113,7 @@ public: void writeAt(size_t dest_pos, std::vector::iterator first, std::vector::iterator last); - + /// \brief Replace contents of buffer with value. /// /// Function replaces part of buffer with value. diff --git a/tests/tools/perfdhcp/perf_pkt6.cc b/src/bin/perfdhcp/perf_pkt6.cc similarity index 100% rename from tests/tools/perfdhcp/perf_pkt6.cc rename to src/bin/perfdhcp/perf_pkt6.cc diff --git a/tests/tools/perfdhcp/perf_pkt6.h b/src/bin/perfdhcp/perf_pkt6.h similarity index 100% rename from tests/tools/perfdhcp/perf_pkt6.h rename to src/bin/perfdhcp/perf_pkt6.h diff --git a/tests/tools/perfdhcp/perfdhcp.xml b/src/bin/perfdhcp/perfdhcp.xml similarity index 99% rename from tests/tools/perfdhcp/perfdhcp.xml rename to src/bin/perfdhcp/perfdhcp.xml index 4baf304a5a..7fe028372a 100644 --- a/tests/tools/perfdhcp/perfdhcp.xml +++ b/src/bin/perfdhcp/perfdhcp.xml @@ -24,7 +24,7 @@ perfdhcp - 1 + 8 Kea diff --git a/tests/tools/perfdhcp/perfdhcp_internals.dox b/src/bin/perfdhcp/perfdhcp_internals.dox similarity index 100% rename from tests/tools/perfdhcp/perfdhcp_internals.dox rename to src/bin/perfdhcp/perfdhcp_internals.dox diff --git a/tests/tools/perfdhcp/pkt_transform.cc b/src/bin/perfdhcp/pkt_transform.cc similarity index 99% rename from tests/tools/perfdhcp/pkt_transform.cc rename to src/bin/perfdhcp/pkt_transform.cc index 0267d33908..80cd705500 100644 --- a/tests/tools/perfdhcp/pkt_transform.cc +++ b/src/bin/perfdhcp/pkt_transform.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2012-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 @@ -214,7 +214,7 @@ PktTransform::unpackOptions(const OptionBuffer& in_buffer, in_buffer.begin() + offset + opt_len); } } - + void PktTransform::writeAt(dhcp::OptionBuffer& in_buffer, size_t dest_pos, dhcp::OptionBuffer::iterator first, diff --git a/tests/tools/perfdhcp/pkt_transform.h b/src/bin/perfdhcp/pkt_transform.h similarity index 100% rename from tests/tools/perfdhcp/pkt_transform.h rename to src/bin/perfdhcp/pkt_transform.h diff --git a/tests/tools/perfdhcp/rate_control.cc b/src/bin/perfdhcp/rate_control.cc similarity index 100% rename from tests/tools/perfdhcp/rate_control.cc rename to src/bin/perfdhcp/rate_control.cc diff --git a/tests/tools/perfdhcp/rate_control.h b/src/bin/perfdhcp/rate_control.h similarity index 100% rename from tests/tools/perfdhcp/rate_control.h rename to src/bin/perfdhcp/rate_control.h diff --git a/tests/tools/perfdhcp/stats_mgr.h b/src/bin/perfdhcp/stats_mgr.h similarity index 100% rename from tests/tools/perfdhcp/stats_mgr.h rename to src/bin/perfdhcp/stats_mgr.h diff --git a/tests/tools/perfdhcp/test_control.cc b/src/bin/perfdhcp/test_control.cc similarity index 100% rename from tests/tools/perfdhcp/test_control.cc rename to src/bin/perfdhcp/test_control.cc diff --git a/tests/tools/perfdhcp/test_control.h b/src/bin/perfdhcp/test_control.h similarity index 100% rename from tests/tools/perfdhcp/test_control.h rename to src/bin/perfdhcp/test_control.h diff --git a/tests/tools/perfdhcp/tests/.gitignore b/src/bin/perfdhcp/tests/.gitignore similarity index 100% rename from tests/tools/perfdhcp/tests/.gitignore rename to src/bin/perfdhcp/tests/.gitignore diff --git a/tests/tools/perfdhcp/tests/Makefile.am b/src/bin/perfdhcp/tests/Makefile.am similarity index 79% rename from tests/tools/perfdhcp/tests/Makefile.am rename to src/bin/perfdhcp/tests/Makefile.am index b246df3c1c..9e102af91b 100644 --- a/tests/tools/perfdhcp/tests/Makefile.am +++ b/src/bin/perfdhcp/tests/Makefile.am @@ -31,12 +31,12 @@ run_unittests_SOURCES += rate_control_unittest.cc run_unittests_SOURCES += stats_mgr_unittest.cc run_unittests_SOURCES += test_control_unittest.cc run_unittests_SOURCES += command_options_helper.h -run_unittests_SOURCES += $(top_builddir)/tests/tools/perfdhcp/command_options.cc -run_unittests_SOURCES += $(top_builddir)/tests/tools/perfdhcp/pkt_transform.cc -run_unittests_SOURCES += $(top_builddir)/tests/tools/perfdhcp/perf_pkt6.cc -run_unittests_SOURCES += $(top_builddir)/tests/tools/perfdhcp/perf_pkt4.cc -run_unittests_SOURCES += $(top_builddir)/tests/tools/perfdhcp/rate_control.cc -run_unittests_SOURCES += $(top_builddir)/tests/tools/perfdhcp/test_control.cc +run_unittests_SOURCES += $(top_builddir)/src/bin/perfdhcp/command_options.cc +run_unittests_SOURCES += $(top_builddir)/src/bin/perfdhcp/pkt_transform.cc +run_unittests_SOURCES += $(top_builddir)/src/bin/perfdhcp/perf_pkt6.cc +run_unittests_SOURCES += $(top_builddir)/src/bin/perfdhcp/perf_pkt4.cc +run_unittests_SOURCES += $(top_builddir)/src/bin/perfdhcp/rate_control.cc +run_unittests_SOURCES += $(top_builddir)/src/bin/perfdhcp/test_control.cc run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES) run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS) diff --git a/tests/tools/perfdhcp/tests/command_options_helper.h b/src/bin/perfdhcp/tests/command_options_helper.h similarity index 100% rename from tests/tools/perfdhcp/tests/command_options_helper.h rename to src/bin/perfdhcp/tests/command_options_helper.h diff --git a/tests/tools/perfdhcp/tests/command_options_unittest.cc b/src/bin/perfdhcp/tests/command_options_unittest.cc similarity index 99% rename from tests/tools/perfdhcp/tests/command_options_unittest.cc rename to src/bin/perfdhcp/tests/command_options_unittest.cc index 3d2ce2e9a6..5431018ece 100644 --- a/tests/tools/perfdhcp/tests/command_options_unittest.cc +++ b/src/bin/perfdhcp/tests/command_options_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2012-2013 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2012-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 @@ -781,7 +781,7 @@ TEST_F(CommandOptionsTest, Interface) { const dhcp::IfaceMgr::IfaceCollection& ifaces = iface_mgr.getIfaces(); std::string iface_name; CommandOptions& opt = CommandOptions::instance(); - // The local loopback interface should be available. + // The local loopback interface should be available. // If no interface have been found for any reason we should // not fail this test. if (ifaces.size() > 0) { diff --git a/tests/tools/perfdhcp/tests/localized_option_unittest.cc b/src/bin/perfdhcp/tests/localized_option_unittest.cc similarity index 100% rename from tests/tools/perfdhcp/tests/localized_option_unittest.cc rename to src/bin/perfdhcp/tests/localized_option_unittest.cc diff --git a/tests/tools/perfdhcp/tests/packet_storage_unittest.cc b/src/bin/perfdhcp/tests/packet_storage_unittest.cc similarity index 100% rename from tests/tools/perfdhcp/tests/packet_storage_unittest.cc rename to src/bin/perfdhcp/tests/packet_storage_unittest.cc diff --git a/tests/tools/perfdhcp/tests/perf_pkt4_unittest.cc b/src/bin/perfdhcp/tests/perf_pkt4_unittest.cc similarity index 100% rename from tests/tools/perfdhcp/tests/perf_pkt4_unittest.cc rename to src/bin/perfdhcp/tests/perf_pkt4_unittest.cc diff --git a/tests/tools/perfdhcp/tests/perf_pkt6_unittest.cc b/src/bin/perfdhcp/tests/perf_pkt6_unittest.cc similarity index 100% rename from tests/tools/perfdhcp/tests/perf_pkt6_unittest.cc rename to src/bin/perfdhcp/tests/perf_pkt6_unittest.cc diff --git a/tests/tools/perfdhcp/tests/rate_control_unittest.cc b/src/bin/perfdhcp/tests/rate_control_unittest.cc similarity index 100% rename from tests/tools/perfdhcp/tests/rate_control_unittest.cc rename to src/bin/perfdhcp/tests/rate_control_unittest.cc diff --git a/tests/tools/perfdhcp/tests/run_unittests.cc b/src/bin/perfdhcp/tests/run_unittests.cc similarity index 100% rename from tests/tools/perfdhcp/tests/run_unittests.cc rename to src/bin/perfdhcp/tests/run_unittests.cc diff --git a/tests/tools/perfdhcp/tests/stats_mgr_unittest.cc b/src/bin/perfdhcp/tests/stats_mgr_unittest.cc similarity index 100% rename from tests/tools/perfdhcp/tests/stats_mgr_unittest.cc rename to src/bin/perfdhcp/tests/stats_mgr_unittest.cc diff --git a/tests/tools/perfdhcp/tests/test_control_unittest.cc b/src/bin/perfdhcp/tests/test_control_unittest.cc similarity index 100% rename from tests/tools/perfdhcp/tests/test_control_unittest.cc rename to src/bin/perfdhcp/tests/test_control_unittest.cc diff --git a/tests/tools/perfdhcp/tests/testdata/.gitignore b/src/bin/perfdhcp/tests/testdata/.gitignore similarity index 100% rename from tests/tools/perfdhcp/tests/testdata/.gitignore rename to src/bin/perfdhcp/tests/testdata/.gitignore diff --git a/tests/tools/perfdhcp/tests/testdata/Makefile.am b/src/bin/perfdhcp/tests/testdata/Makefile.am similarity index 100% rename from tests/tools/perfdhcp/tests/testdata/Makefile.am rename to src/bin/perfdhcp/tests/testdata/Makefile.am diff --git a/tests/tools/perfdhcp/tests/testdata/discover-example.hex b/src/bin/perfdhcp/tests/testdata/discover-example.hex similarity index 100% rename from tests/tools/perfdhcp/tests/testdata/discover-example.hex rename to src/bin/perfdhcp/tests/testdata/discover-example.hex diff --git a/tests/tools/perfdhcp/tests/testdata/request4-example.hex b/src/bin/perfdhcp/tests/testdata/request4-example.hex similarity index 100% rename from tests/tools/perfdhcp/tests/testdata/request4-example.hex rename to src/bin/perfdhcp/tests/testdata/request4-example.hex diff --git a/tests/tools/perfdhcp/tests/testdata/request6-example.hex b/src/bin/perfdhcp/tests/testdata/request6-example.hex similarity index 100% rename from tests/tools/perfdhcp/tests/testdata/request6-example.hex rename to src/bin/perfdhcp/tests/testdata/request6-example.hex diff --git a/tests/tools/perfdhcp/tests/testdata/solicit-example.hex b/src/bin/perfdhcp/tests/testdata/solicit-example.hex similarity index 100% rename from tests/tools/perfdhcp/tests/testdata/solicit-example.hex rename to src/bin/perfdhcp/tests/testdata/solicit-example.hex diff --git a/tests/tools/Makefile.am b/tests/tools/Makefile.am index 2fab4e57ab..1a7eb296dc 100644 --- a/tests/tools/Makefile.am +++ b/tests/tools/Makefile.am @@ -1 +1 @@ -SUBDIRS = . perfdhcp +SUBDIRS = .