Split source and build test directories

This commit is contained in:
Rodrigo Arias 2022-05-30 19:39:09 +02:00
parent 1de6c53247
commit 69af0f721f

View File

@ -14,24 +14,25 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
set(OVNI_TEST_DIR "${CMAKE_SOURCE_DIR}/test") set(OVNI_TEST_SOURCE_DIR "${CMAKE_SOURCE_DIR}/test")
set(OVNI_TEST_BUILD_DIR "${CMAKE_BINARY_DIR}/test")
add_executable(flush flush.c) add_executable(flush flush.c)
target_link_libraries(flush ovni) target_link_libraries(flush ovni)
add_test(NAME flush COMMAND "${OVNI_TEST_DIR}/driver.sh" flush) add_test(NAME flush COMMAND "${OVNI_TEST_SOURCE_DIR}/driver.sh" flush)
set_tests_properties(flush PROPERTIES RUN_SERIAL TRUE) set_tests_properties(flush PROPERTIES RUN_SERIAL TRUE)
add_executable(flush-overhead flush-overhead.c) add_executable(flush-overhead flush-overhead.c)
target_link_libraries(flush-overhead ovni) target_link_libraries(flush-overhead ovni)
add_test(NAME flush-overhead COMMAND "${OVNI_TEST_DIR}/driver.sh" flush-overhead) add_test(NAME flush-overhead COMMAND "${OVNI_TEST_SOURCE_DIR}/driver.sh" flush-overhead)
set_tests_properties(flush-overhead PROPERTIES RUN_SERIAL TRUE) set_tests_properties(flush-overhead PROPERTIES RUN_SERIAL TRUE)
add_executable(mp-simple mp-simple.c) add_executable(mp-simple mp-simple.c)
target_link_libraries(mp-simple ovni) target_link_libraries(mp-simple ovni)
add_test(NAME mp-simple COMMAND "${OVNI_TEST_DIR}/mp-driver.sh" mp-simple) add_test(NAME mp-simple COMMAND "${OVNI_TEST_SOURCE_DIR}/mp-driver.sh" mp-simple)
set_tests_properties(mp-simple PROPERTIES RUN_SERIAL TRUE) set_tests_properties(mp-simple PROPERTIES RUN_SERIAL TRUE)
add_executable(mp-rank mp-rank.c) add_executable(mp-rank mp-rank.c)
target_link_libraries(mp-rank ovni) target_link_libraries(mp-rank ovni)
add_test(NAME mp-rank COMMAND "${OVNI_TEST_DIR}/mp-driver.sh" mp-rank) add_test(NAME mp-rank COMMAND "${OVNI_TEST_SOURCE_DIR}/mp-driver.sh" mp-rank)
set_tests_properties(mp-rank PROPERTIES RUN_SERIAL TRUE) set_tests_properties(mp-rank PROPERTIES RUN_SERIAL TRUE)