forked from xrootd/xrootd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Tests] Remove CppUnit code from common tests
Convert also the common test code into shared library and link tests against it instead of recompiling the code into each binary.
- Loading branch information
Showing
9 changed files
with
22 additions
and
422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,12 @@ | ||
add_executable(xrdec-unit-tests | ||
MicroTest.cc | ||
../common/Server.cc | ||
../common/Utils.cc | ||
../common/TestEnv.cc | ||
) | ||
if(NOT BUILD_XRDEC) | ||
return() | ||
endif() | ||
|
||
add_executable(xrdec-unit-tests XrdEcTests.cc) | ||
|
||
target_link_libraries(xrdec-unit-tests | ||
XrdEc | ||
XrdCl | ||
XrdXml | ||
XrdUtils | ||
ZLIB::ZLIB | ||
GTest::GTest | ||
GTest::Main | ||
${ISAL_LIBRARIES} | ||
) | ||
XrdEc XrdTestUtils GTest::GTest GTest::Main ${ISAL_LIBRARIES}) | ||
|
||
target_include_directories(xrdec-unit-tests | ||
PRIVATE ${CMAKE_SOURCE_DIR}/src | ||
PRIVATE ../common | ||
${ISAL_INCLUDE_DIRS} | ||
) | ||
target_include_directories(xrdec-unit-tests PRIVATE ${ISAL_INCLUDE_DIRS}) | ||
|
||
gtest_discover_tests(xrdec-unit-tests TEST_PREFIX XrdCl::) | ||
gtest_discover_tests(xrdec-unit-tests TEST_PREFIX XrdEc::) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,9 @@ | ||
|
||
|
||
add_library( | ||
XrdClTestsHelper SHARED | ||
Server.cc Server.hh | ||
Utils.cc Utils.hh | ||
add_library(XrdTestUtils SHARED | ||
Server.cc Server.hh | ||
TestEnv.cc TestEnv.hh | ||
CppUnitXrdHelpers.hh) | ||
|
||
target_link_libraries( | ||
XrdClTestsHelper | ||
${CMAKE_THREAD_LIBS_INIT} | ||
${CPPUNIT_LIBRARIES} | ||
ZLIB::ZLIB | ||
XrdCl | ||
XrdUtils) | ||
|
||
target_include_directories( | ||
XrdClTestsHelper PUBLIC ${CPPUNIT_INCLUDE_DIRS}) | ||
|
||
add_executable( | ||
test-runner | ||
TextRunner.cc | ||
PathProcessor.hh) | ||
|
||
target_link_libraries( | ||
test-runner | ||
${CMAKE_DL_LIBS} | ||
${CPPUNIT_LIBRARIES} | ||
${CMAKE_THREAD_LIBS_INIT}) | ||
Utils.cc Utils.hh) | ||
|
||
target_include_directories( | ||
test-runner PRIVATE ${CPPUNIT_INCLUDE_DIRS}) | ||
target_link_libraries(XrdTestUtils ZLIB::ZLIB XrdCl XrdUtils) | ||
|
||
#------------------------------------------------------------------------------- | ||
# Install | ||
#------------------------------------------------------------------------------- | ||
install( | ||
TARGETS XrdClTestsHelper test-runner | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
target_include_directories(XrdTestUtils | ||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.