mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-01 06:25:34 +00:00
[#899] added missing files
This commit is contained in:
48
src/hooks/dhcp/run_script/libloadtests/Makefile.am
Normal file
48
src/hooks/dhcp/run_script/libloadtests/Makefile.am
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
SUBDIRS = .
|
||||||
|
|
||||||
|
AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
|
||||||
|
AM_CPPFLAGS += -I$(top_builddir)/src/hooks/dhcp/run_script -I$(top_srcdir)/src/hooks/dhcp/run_script
|
||||||
|
AM_CPPFLAGS += $(BOOST_INCLUDES)
|
||||||
|
AM_CPPFLAGS += -DLIBRUN_SCRIPT_SO=\"$(abs_top_builddir)/src/hooks/dhcp/run_script/.libs/libdhcp_run_script.so\"
|
||||||
|
AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\"
|
||||||
|
|
||||||
|
AM_CXXFLAGS = $(KEA_CXXFLAGS)
|
||||||
|
|
||||||
|
if USE_STATIC_LINK
|
||||||
|
AM_LDFLAGS = -static
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Unit test data files need to get installed.
|
||||||
|
EXTRA_DIST =
|
||||||
|
|
||||||
|
CLEANFILES = *.gcno *.gcda
|
||||||
|
|
||||||
|
# TESTS_ENVIRONMENT = $(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||||
|
LOG_COMPILER = $(LIBTOOL)
|
||||||
|
AM_LOG_FLAGS = --mode=execute
|
||||||
|
|
||||||
|
TESTS =
|
||||||
|
if HAVE_GTEST
|
||||||
|
TESTS += run_script_unittests
|
||||||
|
|
||||||
|
run_script_unittests_SOURCES = run_unittests.cc
|
||||||
|
run_script_unittests_SOURCES += load_unload_unittests.cc
|
||||||
|
run_script_unittests_SOURCES += close_unittests.cc
|
||||||
|
|
||||||
|
run_script_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES) $(LOG4CPLUS_INCLUDES)
|
||||||
|
|
||||||
|
run_script_unittests_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS) $(GTEST_LDFLAGS)
|
||||||
|
|
||||||
|
run_script_unittests_CXXFLAGS = $(AM_CXXFLAGS)
|
||||||
|
|
||||||
|
run_script_unittests_LDADD = $(top_builddir)/src/lib/hooks/libkea-hooks.la
|
||||||
|
run_script_unittests_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la
|
||||||
|
run_script_unittests_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
|
||||||
|
run_script_unittests_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
|
||||||
|
run_script_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
|
||||||
|
run_script_unittests_LDADD += $(LOG4CPLUS_LIBS)
|
||||||
|
run_script_unittests_LDADD += $(CRYPTO_LIBS)
|
||||||
|
run_script_unittests_LDADD += $(BOOST_LIBS)
|
||||||
|
run_script_unittests_LDADD += $(GTEST_LDADD)
|
||||||
|
endif
|
||||||
|
noinst_PROGRAMS = $(TESTS)
|
23
src/hooks/dhcp/run_script/run_script_messages.cc
Normal file
23
src/hooks/dhcp/run_script/run_script_messages.cc
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
// File created from ../../../../src/hooks/dhcp/run_script/run_script_messages.mes
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
#include <log/message_types.h>
|
||||||
|
#include <log/message_initializer.h>
|
||||||
|
|
||||||
|
extern const isc::log::MessageID RUN_SCRIPT_LOAD = "RUN_SCRIPT_LOAD";
|
||||||
|
extern const isc::log::MessageID RUN_SCRIPT_LOAD_ERROR = "RUN_SCRIPT_LOAD_ERROR";
|
||||||
|
extern const isc::log::MessageID RUN_SCRIPT_UNLOAD = "RUN_SCRIPT_UNLOAD";
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
const char* values[] = {
|
||||||
|
"RUN_SCRIPT_LOAD", "Run Script hooks library has been loaded",
|
||||||
|
"RUN_SCRIPT_LOAD_ERROR", "Run Script hooks library failed: %1",
|
||||||
|
"RUN_SCRIPT_UNLOAD", "Run Script hooks library has been unloaded",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
const isc::log::MessageInitializer initializer(values);
|
||||||
|
|
||||||
|
} // Anonymous namespace
|
||||||
|
|
12
src/hooks/dhcp/run_script/run_script_messages.h
Normal file
12
src/hooks/dhcp/run_script/run_script_messages.h
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
// File created from ../../../../src/hooks/dhcp/run_script/run_script_messages.mes
|
||||||
|
|
||||||
|
#ifndef RUN_SCRIPT_MESSAGES_H
|
||||||
|
#define RUN_SCRIPT_MESSAGES_H
|
||||||
|
|
||||||
|
#include <log/message_types.h>
|
||||||
|
|
||||||
|
extern const isc::log::MessageID RUN_SCRIPT_LOAD;
|
||||||
|
extern const isc::log::MessageID RUN_SCRIPT_LOAD_ERROR;
|
||||||
|
extern const isc::log::MessageID RUN_SCRIPT_UNLOAD;
|
||||||
|
|
||||||
|
#endif // RUN_SCRIPT_MESSAGES_H
|
48
src/hooks/dhcp/run_script/tests/Makefile.am
Normal file
48
src/hooks/dhcp/run_script/tests/Makefile.am
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
SUBDIRS = .
|
||||||
|
|
||||||
|
AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
|
||||||
|
AM_CPPFLAGS += -I$(top_builddir)/src/hooks/dhcp/run_script -I$(top_srcdir)/src/hooks/dhcp/run_script
|
||||||
|
AM_CPPFLAGS += $(BOOST_INCLUDES)
|
||||||
|
AM_CPPFLAGS += -DRUN_SCRIPT_LIB_SO=\"$(abs_top_builddir)/src/hooks/dhcp/run_script/.libs/libdhcp_run_script.so\"
|
||||||
|
AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\"
|
||||||
|
|
||||||
|
AM_CXXFLAGS = $(KEA_CXXFLAGS)
|
||||||
|
|
||||||
|
if USE_STATIC_LINK
|
||||||
|
AM_LDFLAGS = -static
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Unit test data files need to get installed.
|
||||||
|
EXTRA_DIST =
|
||||||
|
|
||||||
|
CLEANFILES = *.gcno *.gcda
|
||||||
|
|
||||||
|
# TESTS_ENVIRONMENT = $(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||||
|
LOG_COMPILER = $(LIBTOOL)
|
||||||
|
AM_LOG_FLAGS = --mode=execute
|
||||||
|
|
||||||
|
TESTS =
|
||||||
|
if HAVE_GTEST
|
||||||
|
TESTS += run_script_unittests
|
||||||
|
|
||||||
|
run_script_unittests_SOURCES = run_unittests.cc
|
||||||
|
run_script_unittests_SOURCES += run_script_unittests.cc
|
||||||
|
|
||||||
|
run_script_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES) $(LOG4CPLUS_INCLUDES)
|
||||||
|
|
||||||
|
run_script_unittests_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS) $(GTEST_LDFLAGS)
|
||||||
|
|
||||||
|
run_script_unittests_CXXFLAGS = $(AM_CXXFLAGS)
|
||||||
|
|
||||||
|
run_script_unittests_LDADD = $(top_builddir)/src/hooks/dhcp/run_script/librun_script.la
|
||||||
|
run_script_unittests_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
|
||||||
|
run_script_unittests_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la
|
||||||
|
run_script_unittests_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
|
||||||
|
run_script_unittests_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
|
||||||
|
run_script_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
|
||||||
|
run_script_unittests_LDADD += $(LOG4CPLUS_LIBS)
|
||||||
|
run_script_unittests_LDADD += $(CRYPTO_LIBS)
|
||||||
|
run_script_unittests_LDADD += $(BOOST_LIBS)
|
||||||
|
run_script_unittests_LDADD += $(GTEST_LDADD)
|
||||||
|
endif
|
||||||
|
noinst_PROGRAMS = $(TESTS)
|
17
src/hooks/dhcp/run_script/version.cc
Normal file
17
src/hooks/dhcp/run_script/version.cc
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
// Copyright (C) 2021 Internet Systems Consortium, Inc. ("ISC")
|
||||||
|
//
|
||||||
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
#include <hooks/hooks.h>
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
|
||||||
|
/// @brief returns Kea hooks version.
|
||||||
|
int version() {
|
||||||
|
return (KEA_HOOKS_VERSION);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user