Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
e0192925
Commit
e0192925
authored
Feb 19, 2016
by
Eric Cano
Browse files
Packaged the unit tests and system tests in RPMs for continuous integration.
parent
9f9de3eb
Changes
29
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
e0192925
...
...
@@ -150,10 +150,17 @@ endif (${COMPILE_PACKAGING} STREQUAL "1")
# COMMENT "Not running the unit tests" VERBATIM)
configure_file
(
tests/valgrind.suppr tests/valgrind.suppr COPYONLY
)
add_custom_target
(
unittests
tests/unitTests
COMMAND valgrind --track-fds=yes --leak-check=full --demangle=yes --gen-suppressions=all --show-reachable=yes --error-exitcode=1 --suppressions=tests/valgrind.suppr tests/unitTests
COMMAND valgrind --tool=helgrind -v --demangle=no --conflict-cache-size=30000000 --error-exitcode=1 tests/unitTests
configure_file
(
tests/helgrind.suppr tests/helgrind.suppr COPYONLY
)
add_custom_target
(
fullunittests
tests/cta-unitTests
COMMAND valgrind --track-fds=yes --leak-check=full --demangle=yes --gen-suppressions=all --show-reachable=yes --error-exitcode=1 --suppressions=tests/valgrind.suppr tests/cta-unitTests
COMMAND valgrind --tool=helgrind -v --demangle=yes --gen-suppressions=all --conflict-cache-size=30000000 --error-exitcode=1 --suppressions=tests/helgrind.suppr tests/cta-unitTests
DEPENDS tests/cta-unitTests tests/valgrind.suppr tests/helgrind.suppr
COMMENT
"Running unit tests with memory leak and race conditions detection"
VERBATIM
)
DEPENDS tests/unittests tests/valgrind.suppr
add_custom_target
(
shortunittests
tests/cta-unitTests
DEPENDS tests/cta-unitTests
COMMENT
"Running unit tests"
VERBATIM
)
catalogue/CMakeLists.txt
View file @
e0192925
...
...
@@ -27,3 +27,5 @@ add_library (ctacatalogueunittests SHARED
${
CATALOGUE_UNIT_TESTS_LIB_SRC_FILES
}
)
target_link_libraries
(
ctacatalogueunittests ctacatalogue
)
install
(
TARGETS ctacatalogueunittests DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
common/CMakeLists.txt
View file @
e0192925
...
...
@@ -113,3 +113,5 @@ set (COMMON_UNIT_TESTS_LIB_SRC_FILES
add_library
(
ctacommonunittests SHARED
${
COMMON_UNIT_TESTS_LIB_SRC_FILES
}
)
install
(
TARGETS ctacommonunittests DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
\ No newline at end of file
cta.spec.in
View file @
e0192925
...
...
@@ -26,7 +26,7 @@ Source: %{name}-%{ctaVersion}-%{ctaRelease}.tar.gz
License: http://cern.ch/castor/DIST/CONDITIONS
Group: Application/cta
BuildRoot: %{_builddir}/%{name}-%{version}-root
BuildRequires: cmake >= 2.6 redhat-rpm-config
spaceMonkey2000-devel
BuildRequires: cmake >= 2.6 redhat-rpm-config
# only build debug info if you're building the whole code
%description
...
...
@@ -58,25 +58,25 @@ cd build
%check
%if "%{skip_unit_tests}" == "0"
cd build
%{__make} test
%{__make}
shortunit
test
s
%endif
# The packages will be cta-tapeserver, cta-frontend, cta-cli
%package -n cta-tape
server
Summary: CERN Tape Archive
%package -n cta-tape
d
Summary: CERN Tape Archive
: tape daemon
Group: Application/CTA
requires: cta-lib
%description -n cta-tape
server
%description -n cta-tape
d
CERN Tape Archive:
The tape server daemon
%files -n cta-tape
server
%files -n cta-tape
d
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/cta-tape
server
d
%attr(0755,root,root) %{_bindir}/cta-taped
%attr(0755,root,root) %{_libdir}/libctamessages.so
%package -n cta-frontend
Summary: CERN Tape Archive
Summary: CERN Tape Archive
: Xrootd plugin
Group: Application/CTA
requires: cta-lib
%description -n cta-frontend
...
...
@@ -88,7 +88,7 @@ The xroot plugin
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/xrd.cf.cta
%package -n cta-cli
Summary: CERN Tape Archive
Summary: CERN Tape Archive
: command line interface
Group: Application/CTA
%description -n cta-cli
CERN Tape Archive:
...
...
@@ -98,6 +98,7 @@ The xroot plugin
%attr(0755,root,root) %{_bindir}/cta
%attr(0755,root,root) %{_bindir}/ctaAddAdminUser
%package -n cta-lib
Summary: CERN Tape Archive
Group: Application/CTA
...
...
@@ -110,4 +111,49 @@ The shared libraries
%attr(0755,root,root) %{_libdir}/libctanameserver.so
%attr(0755,root,root) %{_libdir}/libctaremotens.so
%attr(0755,root,root) %{_libdir}/libctascheduler.so
%attr(0755,root,root) %{_libdir}/libctaobjectstore.so
\ No newline at end of file
%attr(0755,root,root) %{_libdir}/libctaobjectstore.so
%attr(0755,root,root) %{_libdir}/libctamediachangerutils.so
%attr(0755,root,root) %{_libdir}/libctamessages.so
%attr(0755,root,root) %{_libdir}/libctamessagesutils.so
%attr(0755,root,root) %{_libdir}/libctatapereactorutils.so
%attr(0755,root,root) %{_libdir}/libctatapeserverdaemonutils.so
%package -n cta-unittests
Summary: CERN Tape Archive: unit tests
Group: Application/CTA
%description -n cta-unittests
CERN Tape Archive:
unit tests
%files -n cta-unittests
%attr(0755,root,root) %{_bindir}/cta-unitTests
%attr(0755,root,root) %{_bindir}/cta-valgrindUnitTests.sh
%attr(0755,root,root) %{_libdir}/libctacatalogueunittests.so
%attr(0755,root,root) %{_libdir}/libctacommonunittests.so
%attr(0755,root,root) %{_libdir}/libctaexceptionunittests.so
%attr(0755,root,root) %{_libdir}/libctaiounittests.so
%attr(0755,root,root) %{_libdir}/libctalegacymsgunittests.so
%attr(0755,root,root) %{_libdir}/libctamessagesunittests.so
%attr(0755,root,root) %{_libdir}/libctanameserverunittests.so
%attr(0755,root,root) %{_libdir}/libctaobjectstoreunittests.so
%attr(0755,root,root) %{_libdir}/libctaremotensunittests.so
%attr(0755,root,root) %{_libdir}/libctaschedulerunittests.so
%attr(0755,root,root) %{_libdir}/libctaserverunittests.so
%attr(0755,root,root) %{_libdir}/libctatapereactorunittests.so
%attr(0755,root,root) %{_libdir}/libctatapeserverdaemonunittests.so
%attr(0755,root,root) %{_libdir}/libctatapeserverdriveunittests.so
%attr(0755,root,root) %{_libdir}/libctatapeserverfileunittests.so
%attr(0755,root,root) %{_libdir}/libctatapeserverscsiunittests.so
%attr(0755,root,root) %{_libdir}/libctatapeserverutilsunittests.so
%attr(0755,root,root) %{_libdir}/libctautilsunittests.so
%attr(0644,root,root) %{_datadir}/%{name}-%{ctaVersion}/unittest/*.suppr
%package -n cta-systemtests
Summary: CERN Tape Archive: system tests with virtual tape drives
Group: Application/CTA
%description -n cta-systemtests
CERN Tape Archive:
system tests with virtual tape drives
%files -n cta-systemtests
%attr(0755,root,root) %{_bindir}/cta-systemTests
%attr(0755,root,root) %{_libdir}/libsystemTestHelperTests.so
nameserver/CMakeLists.txt
View file @
e0192925
...
...
@@ -21,5 +21,7 @@ add_library (ctanameserverunittests SHARED
target_link_libraries
(
ctanameserverunittests
ctanameserver
)
install
(
TARGETS ctanameserverunittests DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
add_executable
(
makeMockNameServerBasePath mockNS/makeMockNameServerBasePath.cpp
)
target_link_libraries
(
makeMockNameServerBasePath ctacommon
)
\ No newline at end of file
objectstore/CMakeLists.txt
View file @
e0192925
...
...
@@ -65,6 +65,7 @@ set(ObjectStoreUnitTests
add_library
(
ctaobjectstoreunittests SHARED
${
ObjectStoreUnitTests
}
)
target_link_libraries
(
ctaobjectstoreunittests
protobuf rados ctacommon gtest ctaobjectstore
)
install
(
TARGETS ctaobjectstoreunittests DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
add_executable
(
makeMinimalVFS makeMinimalVFS.cpp
)
target_link_libraries
(
makeMinimalVFS
...
...
remotens/CMakeLists.txt
View file @
e0192925
...
...
@@ -25,3 +25,5 @@ add_library (ctaremotensunittests SHARED
target_link_libraries
(
ctaremotensunittests
ctaremotens
ctautils
)
install
(
TARGETS ctaremotensunittests DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
scheduler/CMakeLists.txt
View file @
e0192925
...
...
@@ -47,7 +47,8 @@ add_library (ctaschedulerunittests SHARED
SchedulerDatabaseFactory.cpp
SchedulerDatabaseTest.cpp
)
target_link_libraries
(
ctaschedulerunittests
${
SQLITE3_LIBRARY_RELEASE
}
)
target_link_libraries
(
ctaschedulerunittests
target_link_libraries
(
ctaschedulerunittests
${
SQLITE3_LIBRARY_RELEASE
}
ctascheduler
)
install
(
TARGETS ctaschedulerunittests DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
\ No newline at end of file
tapeserver/CMakeLists.txt
View file @
e0192925
...
...
@@ -10,3 +10,4 @@ add_subdirectory (daemon)
add_executable
(
cta-taped cta-taped.cpp
)
target_link_libraries
(
cta-taped
ctatapedaemon ctacommon protobuf
)
install
(
TARGETS cta-taped DESTINATION usr/bin
)
tapeserver/castor/exception/CMakeLists.txt
View file @
e0192925
...
...
@@ -4,3 +4,5 @@ include_directories(${PROJECT_SOURCE_DIR}/tapeserver)
add_library
(
ctaexceptionunittests SHARED
ExceptionTest.cpp
)
install
(
TARGETS ctaexceptionunittests DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
tapeserver/castor/io/CMakeLists.txt
View file @
e0192925
...
...
@@ -11,3 +11,5 @@ add_library (ctaiounittests SHARED
IoTest.cpp
)
target_link_libraries
(
ctaiounittests
ctaio
)
install
(
TARGETS ctaiounittests DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
tapeserver/castor/legacymsg/CMakeLists.txt
View file @
e0192925
...
...
@@ -30,3 +30,4 @@ add_library (ctalegacymsgunittests SHARED
target_link_libraries
(
ctalegacymsgunittests
ctamessages
ctautils
)
install
(
TARGETS ctalegacymsgunittests DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
tapeserver/castor/mediachanger/CMakeLists.txt
View file @
e0192925
...
...
@@ -36,3 +36,4 @@ add_library(ctamediachanger ${MEDIA_CHANGER_LIB_SRC_FILES})
add_library
(
ctamediachangerutils SHARED
MmcProxyDummy.cpp
)
install
(
TARGETS ctamediachangerutils DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
tapeserver/castor/messages/CMakeLists.txt
View file @
e0192925
...
...
@@ -34,6 +34,7 @@ add_library(ctamessagesprotobuf
add_library
(
ctamessagesutils SHARED
AcsProxyDummy.cpp
TapeserverProxyDummy.cpp
)
install
(
TARGETS ctamessagesutils DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
set
(
CtaMessageSrcs
AcsProxy.cpp
...
...
@@ -70,3 +71,4 @@ add_library(ctamessagesunittests SHARED
MessagesTest.cpp
MutexLockerTest.cpp
MutexTest.cpp
)
install
(
TARGETS ctamessagesunittests DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
tapeserver/castor/server/CMakeLists.txt
View file @
e0192925
...
...
@@ -24,3 +24,5 @@ add_library (ctaserverunittests SHARED
ThreadingTests.cpp
)
target_link_libraries
(
ctaserverunittests
)
install
(
TARGETS ctaserverunittests DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
tapeserver/castor/server/Semaphores.cpp
View file @
e0192925
...
...
@@ -106,7 +106,8 @@ castor::server::CondVarSemaphore::~CondVarSemaphore() {
pthread_mutex_lock
(
&
m_mutex
);
pthread_mutex_unlock
(
&
m_mutex
);
/* Cleanup */
pthread_cond_destroy
(
&
m_cond
);
int
rc
=
pthread_cond_destroy
(
&
m_cond
);
rc
=
rc
;
pthread_mutex_destroy
(
&
m_mutex
);
}
//------------------------------------------------------------------------------
...
...
tapeserver/castor/tape/reactor/CMakeLists.txt
View file @
e0192925
...
...
@@ -38,10 +38,14 @@ add_library (ctatapereactorutils SHARED
DummyPollReactor.cpp
DummyZMQReactor.cpp
)
install
(
TARGETS ctatapereactorutils DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
add_library
(
ctatapereactorunittests SHARED
PollReactorImplTest.cpp
ZMQReactorTest.cpp
)
install
(
TARGETS ctatapereactorunittests DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
target_link_libraries
(
ctatapereactorunittests
ctatapereactor
ctatapereactorutils
)
tapeserver/castor/tape/tapeserver/SCSI/CMakeLists.txt
View file @
e0192925
...
...
@@ -37,3 +37,5 @@ add_library(SCSI Device.cpp Structures.cpp Constants.cpp Exception.cpp)
add_library
(
ctatapeserverscsiunittests SHARED
DeviceTest.cpp
StructuresTest.cpp
)
install
(
TARGETS ctatapeserverscsiunittests DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
tapeserver/castor/tape/tapeserver/daemon/CMakeLists.txt
View file @
e0192925
...
...
@@ -101,11 +101,13 @@ add_executable(cta-tapeserverd TapeDaemon.cpp)
target_link_libraries
(
cta-tapeserverd ctaTapeServerDaemon SCSI System Utils
File TapeDrive ctacommon ctatapereactor
${
LIBCAP_LIB
}
${
ZLIB_LIBRARIES
}
ctamessages zmq ctaio ctautils ctaserverutils
)
install
(
TARGETS cta-tapeserverd DESTINATION usr/bin
)
#
install (TARGETS cta-tapeserverd DESTINATION usr/bin)
add_library
(
ctatapeserverdaemonutils SHARED
ProcessForkerProxyDummy.cpp
)
install
(
TARGETS ctatapeserverdaemonutils DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
add_library
(
ctatapeserverdaemonunittests SHARED
CatalogueDriveStateTest.cpp
CatalogueTest.cpp
...
...
@@ -129,3 +131,5 @@ target_link_libraries(ctatapeserverdaemonunittests
ctaserverutils
ctatapeserverdaemonutils
)
#ctaschedulerutils
install
(
TARGETS ctatapeserverdaemonunittests DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
tapeserver/castor/tape/tapeserver/drive/CMakeLists.txt
View file @
e0192925
...
...
@@ -73,3 +73,5 @@ target_link_libraries(ctatapeserverdriveunittests
System
TapeDrive
ctautils
)
install
(
TARGETS ctatapeserverdriveunittests DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment