From dd5b99c3965da24c116fb3c777e78705f056c6f8 Mon Sep 17 00:00:00 2001
From: kongr45gpen <electrovesta@gmail.com>
Date: Sun, 18 Nov 2018 18:43:18 +0200
Subject: [PATCH] Don't use a `test` target for Makefiles, since cmake
 complains

---
 .gitlab-ci.yml                            | 6 +++---
 CMakeLists.txt                            | 4 ++--
 {tests => test}/Message.cpp               | 0
 {tests => test}/Services/ServiceTests.hpp | 0
 {tests => test}/Services/TestService.cpp  | 0
 {tests => test}/TestPlatform.cpp          | 0
 {tests => test}/tests.cpp                 | 0
 7 files changed, 5 insertions(+), 5 deletions(-)
 rename {tests => test}/Message.cpp (100%)
 rename {tests => test}/Services/ServiceTests.hpp (100%)
 rename {tests => test}/Services/TestService.cpp (100%)
 rename {tests => test}/TestPlatform.cpp (100%)
 rename {tests => test}/tests.cpp (100%)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fedb527c..6f35ada2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,10 +22,10 @@ tests:
     GIT_SUBMODULE_STRATEGY: normal
   script:
     - cmake .
-    - make test -j4
-    - ./test --use-colour yes
+    - make tests -j4
+    - ./tests --use-colour yes
   after_script:
-    - ./test -r junit -o junit.xml
+    - ./tests -r junit -o junit.xml
   artifacts:
     reports:
       junit: junit.xml
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a20f53f8..672ed19f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,6 +18,6 @@ add_executable(ecss_services src/main.cpp src/Message.cpp src/Service.cpp src/Se
 
 IF(EXISTS "${PROJECT_SOURCE_DIR}/lib/Catch2/CMakeLists.txt")
 add_subdirectory(lib/Catch2)
-add_executable(test src/Message.cpp src/Services/TestService.cpp tests/tests.cpp tests/Message.cpp tests/TestPlatform.cpp tests/Services/TestService.cpp)
-target_link_libraries(test Catch2::Catch2)
+add_executable(tests src/Message.cpp src/Services/TestService.cpp test/tests.cpp test/Message.cpp test/TestPlatform.cpp test/Services/TestService.cpp)
+target_link_libraries(tests Catch2::Catch2)
 ENDIF()
diff --git a/tests/Message.cpp b/test/Message.cpp
similarity index 100%
rename from tests/Message.cpp
rename to test/Message.cpp
diff --git a/tests/Services/ServiceTests.hpp b/test/Services/ServiceTests.hpp
similarity index 100%
rename from tests/Services/ServiceTests.hpp
rename to test/Services/ServiceTests.hpp
diff --git a/tests/Services/TestService.cpp b/test/Services/TestService.cpp
similarity index 100%
rename from tests/Services/TestService.cpp
rename to test/Services/TestService.cpp
diff --git a/tests/TestPlatform.cpp b/test/TestPlatform.cpp
similarity index 100%
rename from tests/TestPlatform.cpp
rename to test/TestPlatform.cpp
diff --git a/tests/tests.cpp b/test/tests.cpp
similarity index 100%
rename from tests/tests.cpp
rename to test/tests.cpp
-- 
GitLab