1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

tests: move unit tests into subdir

This commit is contained in:
Steffen Vogel 2019-02-17 21:27:02 +01:00
parent 45b4dec42d
commit 612ed81c07
14 changed files with 56 additions and 53 deletions

View file

@ -1,54 +1,3 @@
## CMakeLists.txt
#
# @author Daniel Krebs <github@daniel-krebs.net>
# @copyright 2014-2019, RWTH Institute for Automation of Complex Power Systems (ACS)
# @license GNU General Public License (version 3)
#
# VILLAScommon
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##############################################################################
add_executable(unit-tests-common
advio.cpp
json_buffer.cpp
bitset.cpp
graph.cpp
hash_table.cpp
hist.cpp
kernel.cpp
list.cpp
task.cpp
timing.cpp
utils.cpp
)
if(ARCH STREQUAL "x86_64")
list(APPEND TEST_SRC tsc.cpp)
endif()
target_include_directories(unit-tests-common PUBLIC
${PROJECT_SOURCE_DIR}/include
${CRITERION_INCLUDE_DIRS}
)
target_link_libraries(unit-tests-common PUBLIC
villas-common
${CRITERION_LIBRARIES}
)
add_custom_target(run-unit-tests-common
COMMAND $<TARGET_FILE:unit-tests-common> ${CRITERION_OPTS}
USES_TERMINAL
)
# We only have unit tests for now
add_subdirectory(unit)

View file

@ -0,0 +1,54 @@
## CMakeLists.txt
#
# @author Daniel Krebs <github@daniel-krebs.net>
# @copyright 2014-2019, RWTH Institute for Automation of Complex Power Systems (ACS)
# @license GNU General Public License (version 3)
#
# VILLAScommon
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##############################################################################
add_executable(unit-tests-common
advio.cpp
json_buffer.cpp
bitset.cpp
graph.cpp
hash_table.cpp
hist.cpp
kernel.cpp
list.cpp
task.cpp
timing.cpp
utils.cpp
)
if(ARCH STREQUAL "x86_64")
list(APPEND TEST_SRC tsc.cpp)
endif()
target_include_directories(unit-tests-common PUBLIC
${PROJECT_SOURCE_DIR}/include
${CRITERION_INCLUDE_DIRS}
)
target_link_libraries(unit-tests-common PUBLIC
villas-common
${CRITERION_LIBRARIES}
)
add_custom_target(run-unit-tests-common
COMMAND $<TARGET_FILE:unit-tests-common> ${CRITERION_OPTS}
USES_TERMINAL
)