Skip to content
Snippets Groups Projects
Commit ad2082db authored by kongr45gpen's avatar kongr45gpen
Browse files

Show CI tests in Gitlab

parent 89f55945
No related branches found
No related tags found
No related merge requests found
......@@ -20,8 +20,13 @@ tests:
stage: test
script:
- cmake .
- make tests -j4
- ./tests
- make test -j4
- ./test
after_script:
- ./test -r junit -o junit.xml
artifacts:
reports:
junit: junit.xml
cppcheck:
stage: build
......
......@@ -16,8 +16,8 @@ add_custom_target(check
# Specify the .cpp files for the executables
add_executable(ecss_services src/main.cpp src/Message.cpp src/Service.cpp src/Services/TestService.cpp)
IF(EXISTS lib/Catch2/CMakeLists.txt)
IF(EXISTS "${PROJECT_SOURCE_DIR}/lib/Catch2/CMakeLists.txt")
add_subdirectory(lib/Catch2)
add_executable(tests src/Message.cpp src/Service.cpp src/Services/TestService.cpp tests/tests.cpp tests/Message.cpp)
target_link_libraries(tests Catch2::Catch2)
add_executable(test src/Message.cpp src/Service.cpp src/Services/TestService.cpp tests/tests.cpp tests/Message.cpp)
target_link_libraries(test Catch2::Catch2)
ENDIF()
......@@ -11,4 +11,4 @@ echo -e "\033[0;34mRunning clang-tidy...\033[0m"
cd "$(dirname "$0")"
clang-tidy-4.0 `find ../src/ -type f -regextype posix-egrep -regex '.*\.(cpp|hpp|c|h)'` \
-- -std=c++14 -I../inc -fcolor-diagnostics
-extra-arg=-fcolor-diagnostics -- -std=c++14 -I../inc
......@@ -75,7 +75,7 @@ TEST_CASE("Requirement 7.3.2 (Boolean)", "[message][ecss]") {
TEST_CASE("Requirement 7.3.3 (Enumerated)", "[message][ecss]") {
Message message(0, 0, Message::TC, 0);
message.appendEnum8(230);
message.appendEnum8(231);
message.appendEnum16(15933);
message.appendEnum32(2000001);
message.appendEnumerated(12, 2052);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment