Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
39387427
Commit
39387427
authored
May 15, 2013
by
Thomas Markwalder
Browse files
[2594] Moved d2Srv to d2, removed "Srv" and "srv" from file names
and source. Corrected other review items.
parent
e448bbba
Changes
14
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
39387427
...
...
@@ -1201,8 +1201,8 @@ AC_CONFIG_FILES([Makefile
src/bin/dhcp6/tests/Makefile
src/bin/dhcp4/Makefile
src/bin/dhcp4/tests/Makefile
src/bin/d2
srv
/Makefile
src/bin/d2
srv
/tests/Makefile
src/bin/d2/Makefile
src/bin/d2/tests/Makefile
src/bin/resolver/Makefile
src/bin/resolver/tests/Makefile
src/bin/resolver/bench/Makefile
...
...
@@ -1381,7 +1381,7 @@ AC_OUTPUT([doc/version.ent
src/bin/auth/gen-statisticsitems.py.pre
src/bin/dhcp4/spec_config.h.pre
src/bin/dhcp6/spec_config.h.pre
src/bin/d2
srv
/spec_config.h.pre
src/bin/d2/spec_config.h.pre
src/bin/tests/process_rename_test.py
src/lib/config/tests/data_def_unittests_config.h
src/lib/python/isc/config/tests/config_test
...
...
src/bin/Makefile.am
View file @
39387427
SUBDIRS
=
bind10 bindctl cfgmgr ddns loadzone msgq cmdctl auth xfrin
\
xfrout usermgr zonemgr stats tests resolver sockcreator dhcp4 dhcp6 d2
srv
\
xfrout usermgr zonemgr stats tests resolver sockcreator dhcp4 dhcp6 d2
\
dbutil sysinfo
check-recursive
:
all-recursive
src/bin/d2
srv
/Makefile.am
→
src/bin/d2/Makefile.am
View file @
39387427
...
...
@@ -18,15 +18,15 @@ pkglibexecdir = $(libexecdir)/@PACKAGE@
CLEANFILES
=
*
.gcno
*
.gcda spec_config.h d2_srv_messages.h d2_srv_messages.cc
man_MANS
=
b10-d2
srv
.8
man_MANS
=
b10-d2.8
DISTCLEANFILES
=
$(man_MANS)
EXTRA_DIST
=
$(man_MANS)
b10-d2
srv
.xml d2
srv
.spec
EXTRA_DIST
=
$(man_MANS)
b10-d2.xml d2.spec
if
GENERATE_DOCS
b10-d2
srv
.8
:
b10-d2
srv
.xml
b10-d2.8
:
b10-d2.xml
@
XSLTPROC@
--novalid
--xinclude
--nonet
-o
$@
\
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
\
$(srcdir)
/b10-d2
srv
.xml
$(srcdir)
/b10-d2.xml
else
...
...
@@ -39,27 +39,20 @@ endif
spec_config.h
:
spec_config.h.pre
$(SED)
-e
"s|@@LOCALSTATEDIR@@|
$(localstatedir)
|"
spec_config.h.pre
>
$@
d2
srv
_messages.h d2
srv
_messages.cc
:
d2
srv
_messages.mes
$(top_builddir)
/src/lib/log/compiler/message
$(top_srcdir)
/src/bin/d2
srv/d2srv
_messages.mes
d2_messages.h d2_messages.cc
:
d2_messages.mes
$(top_builddir)
/src/lib/log/compiler/message
$(top_srcdir)
/src/bin/d2
/d2
_messages.mes
BUILT_SOURCES
=
spec_config.h d2
srv
_messages.h d2
srv
_messages.cc
BUILT_SOURCES
=
spec_config.h d2_messages.h d2_messages.cc
pkglibexec_PROGRAMS
=
b10-d2
srv
pkglibexec_PROGRAMS
=
b10-d2
b10_d2
srv
_SOURCES
=
main.cc
b10_d2
srv
_SOURCES
+=
d2
srv
_log.cc d2
srv
_log.h
b10_d2_SOURCES
=
main.cc
b10_d2_SOURCES
+=
d2_log.cc d2_log.h
nodist_b10_d2
srv
_SOURCES
=
d2
srv
_messages.h d2
srv
_messages.cc
EXTRA_DIST
+=
d2
srv
_messages.mes
nodist_b10_d2_SOURCES
=
d2_messages.h d2_messages.cc
EXTRA_DIST
+=
d2_messages.mes
b10_d2srv_LDADD
=
$(top_builddir)
/src/lib/dhcp/libb10-dhcp++.la
b10_d2srv_LDADD
+=
$(top_builddir)
/src/lib/util/libb10-util.la
b10_d2srv_LDADD
+=
$(top_builddir)
/src/lib/dhcpsrv/libb10-dhcpsrv.la
b10_d2srv_LDADD
+=
$(top_builddir)
/src/lib/exceptions/libb10-exceptions.la
b10_d2srv_LDADD
+=
$(top_builddir)
/src/lib/asiolink/libb10-asiolink.la
b10_d2srv_LDADD
+=
$(top_builddir)
/src/lib/log/libb10-log.la
b10_d2srv_LDADD
+=
$(top_builddir)
/src/lib/config/libb10-cfgclient.la
b10_d2srv_LDADD
+=
$(top_builddir)
/src/lib/cc/libb10-cc.la
b10_d2_LDADD
=
$(top_builddir)
/src/lib/log/libb10-log.la
b10_d2
srv
dir
=
$(pkgdatadir)
b10_d2
srv
_DATA
=
d2
srv
.spec
b10_d2dir
=
$(pkgdatadir)
b10_d2_DATA
=
d2.spec
src/bin/d2
srv
/b10-d2
srv
.xml
→
src/bin/d2/b10-d2.xml
View file @
39387427
...
...
@@ -2,7 +2,7 @@
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
[<!ENTITY mdash "—">
]>
<!--
- Copyright (C) 201
1
Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 201
3
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
...
...
@@ -20,30 +20,30 @@
<refentry>
<refentryinfo>
<date>
October 27
, 201
1
</date>
<date>
May 15
, 201
3
</date>
</refentryinfo>
<refmeta>
<refentrytitle>
b10-d2
srv
</refentrytitle>
<refentrytitle>
b10-d2
</refentrytitle>
<manvolnum>
8
</manvolnum>
<refmiscinfo>
BIND10
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>
b10-d2
srv
</refname>
<refpurpose>
D
HCPv4 server
in BIND 10 architecture
</refpurpose>
<refname>
b10-d2
</refname>
<refpurpose>
D
2 process
in BIND 10 architecture
</refpurpose>
</refnamediv>
<docinfo>
<copyright>
<year>
201
1
</year>
<year>
201
3
</year>
<holder>
Internet Systems Consortium, Inc. ("ISC")
</holder>
</copyright>
</docinfo>
<refsynopsisdiv>
<cmdsynopsis>
<command>
b10-d2
srv
</command>
<command>
b10-d2
</command>
<arg><option>
-v
</option></arg>
</cmdsynopsis>
</refsynopsisdiv>
...
...
@@ -51,8 +51,8 @@
<refsect1>
<title>
DESCRIPTION
</title>
<para>
The
<command>
b10-d2
srv
</command>
daemon
will provide the
D2 server implementation when it becomes functional
.
The
<command>
b10-d2
</command>
daemon
processes requests to
to update DNS mapping based on DHCP lease change events
.
</para>
</refsect1>
...
...
@@ -79,7 +79,7 @@
<title>
SEE ALSO
</title>
<para>
<citerefentry>
<refentrytitle>
b10-
init
</refentrytitle><manvolnum>
8
</manvolnum>
<refentrytitle>
b10-
d2
</refentrytitle><manvolnum>
8
</manvolnum>
</citerefentry>
,
<citerefentry>
<refentrytitle>
bind10
</refentrytitle><manvolnum>
8
</manvolnum>
...
...
@@ -90,8 +90,8 @@
<refsect1>
<title>
HISTORY
</title>
<para>
The
<command>
b10-d2
srv
</command>
daemon
was first coded in
November
2013 by
Thomas Markwalder
The
<command>
b10-d2
</command>
process
was first coded in
May
2013 by
the ISC Kea/Dhcp team.
</para>
</refsect1>
</refentry>
<!--
...
...
src/bin/d2
srv/d2srv
.spec
→
src/bin/d2
/d2
.spec
View file @
39387427
{
"module_spec": {
"module_name": "D2
Srv
",
"module_description": "DHCP-DDNS
server daemon
",
"module_name": "D2",
"module_description": "DHCP-DDNS
process
",
"config_data": [
],
"commands": [
{
"command_name": "shutdown",
"command_description": "Shuts down
D2Srv server
.",
"command_description": "Shuts down
the D2 process
.",
"command_args": [
{
"item_name": "pid",
...
...
src/bin/d2
srv/d2srv
_log.cc
→
src/bin/d2
/d2
_log.cc
View file @
39387427
// Copyright (C) 201
2
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 201
3
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
...
...
@@ -14,13 +14,13 @@
/// Defines the logger used by the top-level component of b10-dhcp4.
#include <d2
srv/d2srv
_log.h>
#include <d2
/d2
_log.h>
namespace
isc
{
namespace
d2
srv
{
namespace
d2
{
isc
::
log
::
Logger
d2
srv
_logger
(
"d2
srv
"
);
isc
::
log
::
Logger
d2_logger
(
"d2"
);
}
// namespace d2
srv
}
// namespace d2
}
// namespace isc
src/bin/d2
srv/d2srv
_log.h
→
src/bin/d2
/d2
_log.h
View file @
39387427
// Copyright (C) 201
2
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 201
3
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
...
...
@@ -12,23 +12,23 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#ifndef D2
SRV
_LOG_H
#define D2
SRV
_LOG_H
#ifndef D2_LOG_H
#define D2_LOG_H
#include <log/logger_support.h>
#include <log/macros.h>
#include <d2
srv/d2srv
_messages.h>
#include <d2
/d2
_messages.h>
namespace
isc
{
namespace
d2
srv
{
namespace
d2
{
/// Define the logger for the "dhcp4" module part of b10-dhcp4. We could define
/// a logger in each file, but we would want to define a common name to avoid
/// spelling mistakes, so it is just one small step from there to define a
/// module-common logger.
extern
isc
::
log
::
Logger
d2
srv
_logger
;
extern
isc
::
log
::
Logger
d2_logger
;
}
// namespace d2
srv
}
// namespace d2
}
// namespace isc
#endif // D2
SRV
_LOG_H
#endif // D2_LOG_H
src/bin/d2
srv/d2srv
_messages.mes
→
src/bin/d2
/d2
_messages.mes
View file @
39387427
# Copyright (C)
2012-
2013 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2013 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
...
...
@@ -12,17 +12,17 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
$NAMESPACE isc::d2
srv
$NAMESPACE isc::d2
% D2
SRV
_STARTING :
server
starting
This is a debug message issued during a D
Controller server
startup.
% D2_STARTING :
process
starting
This is a debug message issued during a D
2 process
startup.
% D2
SRV
_START_INFO pid: %1, verbose: %2, standalone: %3
This is a debug message issued during the D
Controller server
startup.
It lists some information about the parameters with which the
server
is running.
% D2_START_INFO pid: %1, verbose: %2, standalone: %3
This is a debug message issued during the D
2 process
startup.
It lists some information about the parameters with which the
process
is running.
% D2
SRV
_SHUTDOWN :
server
is performing a normal shutting down
This is a debug message issued when a D2
Server
shuts down
% D2_SHUTDOWN :
process
is performing a normal shutting down
This is a debug message issued when a D2
process
shuts down
normally in response to command to stop.
src/bin/d2
srv
/main.cc
→
src/bin/d2/main.cc
View file @
39387427
// Copyright (C) 201
1-2012
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 201
3
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
...
...
@@ -13,31 +13,31 @@
// PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
#include <d2
srv/d2srv
_log.h>
#include <d2
/d2
_log.h>
#include <log/logger_support.h>
#include <log/logger_manager.h>
#include <iostream>
using
namespace
isc
::
d2
srv
;
using
namespace
isc
::
d2
;
using
namespace
std
;
/// This file contains entry point (main() function) for standard DHCP-DDNS
///
server
, b10-d2
srv
, component for BIND10 framework. It parses command-line
///
process
, b10-d2, component for BIND10 framework. It parses command-line
/// arguments and instantiates D2Controller class that is responsible for
/// establishing connection with msgq (receiving commands and configuration)
/// and also creating D2Server object as well.
///
/// For detailed explanation or relations between main(), D2Controller,
/// D2Server and other classes, see \ref d2
srv
Session.
/// D2Server and other classes, see \ref d2Session.
namespace
{
const
char
*
const
D2
SRV
_NAME
=
"b10-d2
srv
"
;
const
char
*
const
D2_NAME
=
"b10-d2"
;
void
usage
()
{
cerr
<<
"Usage: "
<<
D2
SRV
_NAME
<<
" [-v] [-s]
[-p number]
"
<<
endl
;
cerr
<<
"Usage: "
<<
D2_NAME
<<
" [-v] [-s]"
<<
endl
;
cerr
<<
" -v: verbose output"
<<
endl
;
cerr
<<
" -s: stand-alone mode (don't connect to BIND10)"
<<
endl
;
exit
(
EXIT_FAILURE
);
...
...
@@ -47,6 +47,12 @@ usage() {
int
main
(
int
argc
,
char
*
argv
[])
{
int
ch
;
// NOTE these parameters are preliminary only. They are here to
// for symmetry with the DHCP servers. They may or may not
// become part of the eventual implementation.
bool
stand_alone
=
false
;
// Should be connect to BIND10 msgq?
bool
verbose_mode
=
false
;
// Should server be verbose?
...
...
@@ -72,18 +78,20 @@ main(int argc, char* argv[]) {
// Initialize logging. If verbose, we'll use maximum verbosity.
// If standalone is enabled, do not buffer initial log messages
isc
::
log
::
initLogger
(
D2
SRV
_NAME
,
isc
::
log
::
initLogger
(
D2_NAME
,
(
verbose_mode
?
isc
::
log
::
DEBUG
:
isc
::
log
::
INFO
),
isc
::
log
::
MAX_DEBUG_LEVEL
,
NULL
,
!
stand_alone
);
LOG_INFO
(
d2
srv
_logger
,
D2
SRV
_STARTING
);
LOG_DEBUG
(
d2
srv
_logger
,
DBGLVL_START_SHUT
,
D2
SRV
_START_INFO
)
LOG_INFO
(
d2_logger
,
D2_STARTING
);
LOG_DEBUG
(
d2_logger
,
DBGLVL_START_SHUT
,
D2_START_INFO
)
.
arg
(
getpid
()).
arg
(
verbose_mode
?
"yes"
:
"no"
)
.
arg
(
stand_alone
?
"yes"
:
"no"
);
int
ret
=
EXIT_SUCCESS
;
// For now we will sleep awhile to simulate doing something.
// Without at least a sleep, the process will start, exit and be
// restarted by Bind10/Init endlessley in a rapid succession.
sleep
(
1000
);
LOG_INFO
(
d2
srv
_logger
,
D2
SRV
_SHUTDOWN
);
return
(
ret
);
LOG_INFO
(
d2_logger
,
D2_SHUTDOWN
);
return
(
EXIT_SUCCESS
);
}
src/bin/d2
srv
/spec_config.h.pre.in
→
src/bin/d2/spec_config.h.pre.in
View file @
39387427
// Copyright (C) 201
1
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 201
3
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
...
...
@@ -12,4 +12,4 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#define D
HCP4
_SPECFILE_LOCATION "@prefix@/share/@PACKAGE@/d
hcp4
.spec"
#define D
2
_SPECFILE_LOCATION "@prefix@/share/@PACKAGE@/d
2
.spec"
src/bin/d2
srv
/tests/Makefile.am
→
src/bin/d2/tests/Makefile.am
View file @
39387427
PYCOVERAGE_RUN
=
@PYCOVERAGE_RUN@
PYTESTS
=
d2
srv
_test.py
PYTESTS
=
d2_test.py
EXTRA_DIST
=
$(PYTESTS)
# Explicitly specify paths to dynamic libraries required by loadable python
...
...
@@ -28,7 +28,7 @@ AM_CPPFLAGS += -I$(top_builddir)/src/lib/cc
AM_CPPFLAGS
+=
-I
$(top_srcdir)
/src/lib/asiolink
AM_CPPFLAGS
+=
$(BOOST_INCLUDES)
AM_CPPFLAGS
+=
-DTEST_DATA_DIR
=
\"
$(abs_top_srcdir)
/src/lib/testutils/testdata
\"
AM_CPPFLAGS
+=
-DTEST_DATA_BUILDDIR
=
\"
$(abs_top_builddir)
/src/bin/d2
srv
/tests
\"
AM_CPPFLAGS
+=
-DTEST_DATA_BUILDDIR
=
\"
$(abs_top_builddir)
/src/bin/d2/tests
\"
AM_CPPFLAGS
+=
-DINSTALL_PROG
=
\"
$(abs_top_srcdir)
/install-sh
\"
CLEANFILES
=
$(builddir)
/interfaces.txt
$(builddir)
/logger_lockfile
...
...
@@ -49,23 +49,23 @@ TESTS_ENVIRONMENT = \
TESTS
=
if
HAVE_GTEST
TESTS
+=
d2
srv
_unittests
TESTS
+=
d2_unittests
d2
srv
_unittests_SOURCES
=
../d2
srv
_log.h ../d2
srv
_log.cc
d2
srv
_unittests_SOURCES
+=
d2
srv
_unittests.cc
nodist_d2
srv
_unittests_SOURCES
=
../d2
srv
_messages.h ../d2
srv
_messages.cc
d2_unittests_SOURCES
=
../d2_log.h ../d2_log.cc
d2_unittests_SOURCES
+=
d2_unittests.cc
nodist_d2_unittests_SOURCES
=
../d2_messages.h ../d2_messages.cc
d2
srv
_unittests_CPPFLAGS
=
$(AM_CPPFLAGS)
$(GTEST_INCLUDES)
d2
srv
_unittests_LDFLAGS
=
$(AM_LDFLAGS)
$(GTEST_LDFLAGS)
d2
srv
_unittests_LDADD
=
$(GTEST_LDADD)
d2
srv
_unittests_LDADD
+=
$(top_builddir)
/src/lib/asiolink/libb10-asiolink.la
d2
srv
_unittests_LDADD
+=
$(top_builddir)
/src/lib/cc/libb10-cc.la
d2
srv
_unittests_LDADD
+=
$(top_builddir)
/src/lib/config/libb10-cfgclient.la
d2
srv
_unittests_LDADD
+=
$(top_builddir)
/src/lib/dhcp/libb10-dhcp++.la
d2
srv
_unittests_LDADD
+=
$(top_builddir)
/src/lib/dhcpsrv/libb10-dhcpsrv.la
d2
srv
_unittests_LDADD
+=
$(top_builddir)
/src/lib/exceptions/libb10-exceptions.la
d2
srv
_unittests_LDADD
+=
$(top_builddir)
/src/lib/log/libb10-log.la
d2
srv
_unittests_LDADD
+=
$(top_builddir)
/src/lib/util/libb10-util.la
d2_unittests_CPPFLAGS
=
$(AM_CPPFLAGS)
$(GTEST_INCLUDES)
d2_unittests_LDFLAGS
=
$(AM_LDFLAGS)
$(GTEST_LDFLAGS)
d2_unittests_LDADD
=
$(GTEST_LDADD)
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/asiolink/libb10-asiolink.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/cc/libb10-cc.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/config/libb10-cfgclient.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/dhcp/libb10-dhcp++.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/dhcpsrv/libb10-dhcpsrv.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/exceptions/libb10-exceptions.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/log/libb10-log.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/util/libb10-util.la
endif
noinst_PROGRAMS
=
$(TESTS)
src/bin/d2
srv
/tests/d2
srv
_test.py
→
src/bin/d2/tests/d2_test.py
View file @
39387427
# Copyright (C) 201
2
Internet Systems Consortium.
# Copyright (C) 201
3
Internet Systems Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
...
...
@@ -25,7 +25,7 @@ import time
import
isc
import
fcntl
class
TestD2
srv
Daemon
(
unittest
.
TestCase
):
class
TestD2Daemon
(
unittest
.
TestCase
):
def
setUp
(
self
):
# Don't redirect stdout/stderr here as we want to print out things
# during the test
...
...
@@ -156,13 +156,12 @@ class TestD2srvDaemon(unittest.TestCase):
return
(
rc
,
output
,
error
)
def
test_alive
(
self
):
print
(
"Note: Purpose of some of the tests is to check if D2 server can be started,"
)
print
(
" not that is can bind sockets correctly. Please ignore binding errors."
)
print
(
"THIS TEST IS A PLACE HOLDER DURING INITIAL D2 SERVER WORK - IT ALWAYS PASSES"
)
#(returncode, output, error) = self.runCommand(["../b10-d2srv", "-v"])
#output_text = str(output) + str(error)
#self.assertEqual(output_text.count("D2SRV_STARTING"), 1)
print
(
"Note: Simple test to verify that D2 server can be started."
)
# note that "-s" for stand alone is necessary in order to flush the log output
# soon enough to catch it.
(
returncode
,
output
,
error
)
=
self
.
runCommand
([
"../b10-d2"
,
"-s"
])
output_text
=
str
(
output
)
+
str
(
error
)
self
.
assertEqual
(
output_text
.
count
(
"D2_STARTING"
),
1
)
if
__name__
==
'__main__'
:
unittest
.
main
()
src/bin/d2
srv
/tests/d2
srv
_unittests.cc
→
src/bin/d2/tests/d2_unittests.cc
View file @
39387427
// Copyright (C) 201
1
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 201
3
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
...
...
@@ -13,7 +13,7 @@
// PERFORMANCE OF THIS SOFTWARE.
#include <log/logger_support.h>
#include <d2
srv/d2srv
_log.h>
#include <d2
/d2
_log.h>
#include <gtest/gtest.h>
int
...
...
src/bin/d2/tests/d2srv_unittests
0 → 100755
View file @
39387427
#! /bin/sh
# d2srv_unittests - temporary wrapper script for .libs/d2srv_unittests
# Generated by libtool (GNU libtool) 2.4.2
#
# The d2srv_unittests program cannot be directly executed until all the libtool
# libraries that it depends on are installed.
#
# This wrapper script should never be moved out of the build directory.
# If it is, it will not operate correctly.
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
sed_quote_subst
=
's/\([`"$\\]\)/\\\1/g'
# Be Bourne compatible
if
test
-n
"
${
ZSH_VERSION
+set
}
"
&&
(
emulate sh
)
>
/dev/null 2>&1
;
then
emulate sh
NULLCMD
=
:
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias
-g
'${1+"$@"}'
=
'"$@"'
setopt NO_GLOB_SUBST
else
case
`
(
set
-o
)
2>/dev/null
`
in
*
posix
*
)
set
-o
posix
;;
esac
fi
BIN_SH
=
xpg4
;
export
BIN_SH
# for Tru64
DUALCASE
=
1
;
export
DUALCASE
# for MKS sh
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
(
unset
CDPATH
)
>
/dev/null 2>&1
&&
unset
CDPATH
relink_command
=
""
# This environment variable determines our operation mode.
if
test
"
$libtool_install_magic
"
=
"%%%MAGIC variable%%%"
;
then
# install mode needs the following variables:
generated_by_libtool_version
=
'2.4.2'
notinst_deplibs
=
' ../../../../src/lib/asiolink/libb10-asiolink.la ../../../../src/lib/cc/libb10-cc.la ../../../../src/lib/config/libb10-cfgclient.la /Users/tmark/ddns/build/trac2954/bind10/src/lib/cc/libb10-cc.la ../../../../src/lib/dhcp/libb10-dhcp++.la ../../../../src/lib/dhcpsrv/libb10-dhcpsrv.la /Users/tmark/ddns/build/trac2954/bind10/src/lib/dhcp/libb10-dhcp++.la /Users/tmark/ddns/build/trac2954/bind10/src/lib/asiolink/libb10-asiolink.la /Users/tmark/ddns/build/trac2954/bind10/src/lib/log/libb10-log.la /Users/tmark/ddns/build/trac2954/bind10/src/lib/dns/libb10-dns++.la /Users/tmark/ddns/build/trac2954/bind10/src/lib/cryptolink/libb10-cryptolink.la ../../../../src/lib/exceptions/libb10-exceptions.la ../../../../src/lib/log/libb10-log.la /Users/tmark/ddns/build/trac2954/bind10/src/lib/util/libb10-util.la /Users/tmark/ddns/build/trac2954/bind10/src/lib/util/threads/libb10-threads.la ../../../../src/lib/util/libb10-util.la /Users/tmark/ddns/build/trac2954/bind10/src/lib/exceptions/libb10-exceptions.la'
else
# When we are sourced in execute mode, $file and $ECHO are already set.
if
test
"
$libtool_execute_magic
"
!=
"%%%MAGIC variable%%%"
;
then
file
=
"
$0
"
# A function that is used when there is no print builtin or printf.
func_fallback_echo
()
{
eval
'cat <<_LTECHO_EOF
$1
_LTECHO_EOF'
}
ECHO
=
"printf %s
\\
n"
fi
# Very basic option parsing. These options are (a) specific to
# the libtool wrapper, (b) are identical between the wrapper
# /script/ and the wrapper /executable/ which is used only on
# windows platforms, and (c) all begin with the string --lt-
# (application programs are unlikely to have options which match
# this pattern).
#
# There are only two supported options: --lt-debug and
# --lt-dump-script. There is, deliberately, no --lt-help.
#
# The first argument to this parsing function should be the
# script's ../../../../libtool value, followed by no.
lt_option_debug
=
func_parse_lt_options
()
{
lt_script_arg0
=
$0
shift
for
lt_opt
do
case
"
$lt_opt
"
in
--lt-debug
)
lt_option_debug
=
1
;;
--lt-dump-script
)
lt_dump_D
=
`
$ECHO
"X
$lt_script_arg0
"
| /usr/bin/sed
-e
's/^X//'
-e
's%/[^/]*$%%'
`
test
"X
$lt_dump_D
"
=
"X
$lt_script_arg0
"
&&
lt_dump_D
=
.
lt_dump_F
=
`
$ECHO
"X
$lt_script_arg0
"
| /usr/bin/sed
-e
's/^X//'
-e
's%^.*/%%'
`
cat
"
$lt_dump_D
/
$lt_dump_F
"
exit
0
;;
--lt-
*
)
$ECHO
"Unrecognized --lt- option: '
$lt_opt
'"
1>&2
exit
1
;;
esac
done
# Print the debug banner immediately:
if
test
-n
"
$lt_option_debug
"
;
then
echo
"d2srv_unittests:d2srv_unittests:
${
LINENO
}
: libtool wrapper (GNU libtool) 2.4.2"
1>&2
fi
}
# Used when --lt-debug. Prints its arguments to stdout
# (redirection is the responsibility of the caller)
func_lt_dump_args
()
{
lt_dump_args_N
=
1
;
for
lt_arg
do
$ECHO
"d2srv_unittests:d2srv_unittests:
${
LINENO
}
: newargv[
$lt_dump_args_N
]:
$lt_arg
"
lt_dump_args_N
=
`
expr
$lt_dump_args_N
+ 1
`
done
}
# Core function for launching the target application
func_exec_program_core
()
{
if
test
-n
"
$lt_option_debug
"
;
then
$ECHO
"d2srv_unittests:d2srv_unittests:
${
LINENO
}
: newargv[0]:
$progdir
/
$program
"
1>&2
func_lt_dump_args
${
1
+
"
$@
"
}
1>&2
fi
exec
"
$progdir
/
$program
"
${
1
+
"
$@
"
}
$ECHO
"
$0
: cannot exec
$program
$*
"
1>&2
exit
1
}
# A function to encapsulate launching the target application
# Strips options in the --lt-* namespace from $@ and
# launches target application with the remaining arguments.
func_exec_program
()
{
case
"
$*
"
in
*
\
--lt-
*
)
for
lt_wr_arg
do
case
$lt_wr_arg
in
--lt-
*
)
;;
*
)
set
x
"
$@
"
"
$lt_wr_arg
"
;
shift
;;
esac
shift
done
;;
esac
func_exec_program_core
${
1
+
"
$@
"
}
}
# Parse options
func_parse_lt_options
"
$0
"
${
1
+
"
$@
"
}
# Find the directory that this script lives in.
thisdir
=
`
$ECHO
"
$file
"
| /usr/bin/sed
's%/[^/]*$%%'
`
test
"x
$thisdir
"
=
"x
$file
"
&&
thisdir
=
.
# Follow symbolic links until we get to the real thisdir.
file
=
`
ls
-ld
"
$file
"
| /usr/bin/sed
-n
's/.*-> //p'
`
while
test
-n
"
$file
"
;
do
destdir
=
`
$ECHO
"
$file
"
| /usr/bin/sed
's%/[^/]*$%%'
`
# If there was a directory component, then change thisdir.
if
test
"x
$destdir
"
!=
"x
$file
"
;
then
case
"
$destdir
"
in
[
\\
/]
*
|
[
A-Za-z]:[
\\
/]
*
)
thisdir
=
"
$destdir
"
;;
*
)
thisdir
=
"
$thisdir
/
$destdir
"
;;
esac