diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index c0ce21437c212466b491357cfbfc594fb2e64949..51a936c8b179c896498f9bfd988bdcfed6d2efdf 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -128,7 +128,8 @@ set (COMMON_LIB_SRC_FILES utils/strerror_r_wrapper.cpp CreationLog.cpp Configuration.cpp - ConfigurationFile.cpp + ConfigurationFile.cpp + SourcedParameter.cpp TapePool.cpp Timer.cpp UserIdentity.cpp @@ -150,6 +151,8 @@ target_link_libraries (ctacommon set (COMMON_UNIT_TESTS_LIB_SRC_FILES checksum/ChecksumTest.cpp + ConfigurationFileTests.cpp + SourcedParameterTests.cpp dataStructures/ArchiveFileTest.cpp dataStructures/StorageClassTest.cpp processCap/SmartCapTest.cpp @@ -183,6 +186,6 @@ set_property(TARGET ctacommonunittests PROPERTY SOVERSION "${CTA_SOVERSION}") set_property(TARGET ctacommonunittests PROPERTY VERSION "${CTA_LIBVERSION}") install(TARGETS ctacommonunittests DESTINATION usr/${CMAKE_INSTALL_LIBDIR}) - add_executable(mutexLtrace threading/MutexLtrace.cpp) -target_link_libraries (mutexLtrace ctacommon) +target_link_libraries(mutexLtrace ctacommon) + diff --git a/tapeserver/daemon/ConfigurationFileTests.cpp b/common/ConfigurationFileTests.cpp similarity index 100% rename from tapeserver/daemon/ConfigurationFileTests.cpp rename to common/ConfigurationFileTests.cpp diff --git a/tapeserver/daemon/SourcedParameter.cpp b/common/SourcedParameter.cpp similarity index 98% rename from tapeserver/daemon/SourcedParameter.cpp rename to common/SourcedParameter.cpp index e1acc547470d6594c9b86ca1c62e619a8e68e531..cc360c1745b62f8faf33b807b022294f434257c9 100644 --- a/tapeserver/daemon/SourcedParameter.cpp +++ b/common/SourcedParameter.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "tapeserver/daemon/SourcedParameter.hpp" +#include "SourcedParameter.hpp" #include "tapeserver/daemon/FetchReportOrFlushLimits.hpp" #include "tapeserver/daemon/TpconfigLine.hpp" #include <algorithm> @@ -123,4 +123,4 @@ void SourcedParameter<TpconfigLine>::addLogParamForValue(log::LogContext & lc) { lc.pushOrReplace({"librarySlot", m_value.rawLibrarySlot}); } -}}} // namespace cta::tape::daemon \ No newline at end of file +}}} // namespace cta::tape::daemon diff --git a/tapeserver/daemon/SourcedParameter.hpp b/common/SourcedParameter.hpp similarity index 100% rename from tapeserver/daemon/SourcedParameter.hpp rename to common/SourcedParameter.hpp diff --git a/tapeserver/daemon/SourcedParameterTests.cpp b/common/SourcedParameterTests.cpp similarity index 91% rename from tapeserver/daemon/SourcedParameterTests.cpp rename to common/SourcedParameterTests.cpp index f66771bde8d3fa15359e2f0589edf3338cca95f8..24af5799498b9c186134da29d2e6742d5974b992 100644 --- a/tapeserver/daemon/SourcedParameterTests.cpp +++ b/common/SourcedParameterTests.cpp @@ -18,8 +18,8 @@ #include <gtest/gtest.h> -#include "SourcedParameter.hpp" -#include "FetchReportOrFlushLimits.hpp" +#include "common/SourcedParameter.hpp" +#include "tapeserver/daemon/FetchReportOrFlushLimits.hpp" namespace unitTests { diff --git a/tapeserver/daemon/CMakeLists.txt b/tapeserver/daemon/CMakeLists.txt index 1168864e9d341252078987df9ae43736e9c5a9e9..269f622ebd8c18af1e82dd216619e8ed03e7fd98 100644 --- a/tapeserver/daemon/CMakeLists.txt +++ b/tapeserver/daemon/CMakeLists.txt @@ -17,7 +17,6 @@ add_library(ctatapedaemon DriveHandlerProxy.cpp GarbageCollectorHandler.cpp SignalHandler.cpp - SourcedParameter.cpp SubprocessHandler.cpp ProcessManager.cpp TapedConfiguration.cpp @@ -44,10 +43,8 @@ target_link_libraries(ctatapedaemon File) add_library(ctadaemonunittests SHARED - ConfigurationFileTests.cpp TapedConfigurationTests.cpp - TpconfigTests.cpp - SourcedParameterTests.cpp) + TpconfigTests.cpp) set_property(TARGET ctadaemonunittests PROPERTY SOVERSION "${CTA_SOVERSION}") set_property(TARGET ctadaemonunittests PROPERTY VERSION "${CTA_LIBVERSION}") diff --git a/tapeserver/daemon/TapedConfiguration.hpp b/tapeserver/daemon/TapedConfiguration.hpp index fa3cad5e9303e8f952d47d5be7612eb8119a1062..16702901cb12a6d759492ba52b317d6d1b1008d7 100644 --- a/tapeserver/daemon/TapedConfiguration.hpp +++ b/tapeserver/daemon/TapedConfiguration.hpp @@ -23,7 +23,7 @@ #include <limits> #include "common/log/DummyLogger.hpp" #include "common/exception/Exception.hpp" -#include "SourcedParameter.hpp" +#include "common/SourcedParameter.hpp" #include "FetchReportOrFlushLimits.hpp" #include "Tpconfig.hpp" diff --git a/tapeserver/daemon/Tpconfig.hpp b/tapeserver/daemon/Tpconfig.hpp index 885069cb81fc7f16e33cdeadc990d7e9711d6ac4..00bb2c626e3875ceb993c5c8d1d28408111ab255 100644 --- a/tapeserver/daemon/Tpconfig.hpp +++ b/tapeserver/daemon/Tpconfig.hpp @@ -19,7 +19,7 @@ #pragma once #include "tapeserver/daemon/TpconfigLine.hpp" -#include "tapeserver/daemon/SourcedParameter.hpp" +#include "common/SourcedParameter.hpp" #include "common/exception/Exception.hpp" #include <map>