diff --git a/common/tests/CMakeLists.txt b/common/tests/CMakeLists.txt index b99d8d578..f0d87cd50 100644 --- a/common/tests/CMakeLists.txt +++ b/common/tests/CMakeLists.txt @@ -1,54 +1,3 @@ -## CMakeLists.txt -# -# @author Daniel Krebs -# @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 . -############################################################################## -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 $ ${CRITERION_OPTS} - USES_TERMINAL -) +# We only have unit tests for now +add_subdirectory(unit) \ No newline at end of file diff --git a/common/tests/unit/CMakeLists.txt b/common/tests/unit/CMakeLists.txt new file mode 100644 index 000000000..b99d8d578 --- /dev/null +++ b/common/tests/unit/CMakeLists.txt @@ -0,0 +1,54 @@ +## CMakeLists.txt +# +# @author Daniel Krebs +# @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 . +############################################################################## + +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 $ ${CRITERION_OPTS} + USES_TERMINAL +) diff --git a/common/tests/advio.cpp b/common/tests/unit/advio.cpp similarity index 100% rename from common/tests/advio.cpp rename to common/tests/unit/advio.cpp diff --git a/common/tests/bitset.cpp b/common/tests/unit/bitset.cpp similarity index 100% rename from common/tests/bitset.cpp rename to common/tests/unit/bitset.cpp diff --git a/common/tests/graph.cpp b/common/tests/unit/graph.cpp similarity index 100% rename from common/tests/graph.cpp rename to common/tests/unit/graph.cpp diff --git a/common/tests/hash_table.cpp b/common/tests/unit/hash_table.cpp similarity index 100% rename from common/tests/hash_table.cpp rename to common/tests/unit/hash_table.cpp diff --git a/common/tests/hist.cpp b/common/tests/unit/hist.cpp similarity index 100% rename from common/tests/hist.cpp rename to common/tests/unit/hist.cpp diff --git a/common/tests/json_buffer.cpp b/common/tests/unit/json_buffer.cpp similarity index 100% rename from common/tests/json_buffer.cpp rename to common/tests/unit/json_buffer.cpp diff --git a/common/tests/kernel.cpp b/common/tests/unit/kernel.cpp similarity index 100% rename from common/tests/kernel.cpp rename to common/tests/unit/kernel.cpp diff --git a/common/tests/list.cpp b/common/tests/unit/list.cpp similarity index 100% rename from common/tests/list.cpp rename to common/tests/unit/list.cpp diff --git a/common/tests/task.cpp b/common/tests/unit/task.cpp similarity index 100% rename from common/tests/task.cpp rename to common/tests/unit/task.cpp diff --git a/common/tests/timing.cpp b/common/tests/unit/timing.cpp similarity index 100% rename from common/tests/timing.cpp rename to common/tests/unit/timing.cpp diff --git a/common/tests/tsc.cpp b/common/tests/unit/tsc.cpp similarity index 100% rename from common/tests/tsc.cpp rename to common/tests/unit/tsc.cpp diff --git a/common/tests/utils.cpp b/common/tests/unit/utils.cpp similarity index 100% rename from common/tests/utils.cpp rename to common/tests/unit/utils.cpp