From 59f2fccc9f4f251af62dbaa731ce224e5aafb103 Mon Sep 17 00:00:00 2001 From: elsid Date: Fri, 10 Mar 2023 01:08:49 +0100 Subject: [PATCH 1/4] Split openmw-cs into binary and library --- apps/opencs/CMakeLists.txt | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/apps/opencs/CMakeLists.txt b/apps/opencs/CMakeLists.txt index a55ba56330..2104d80750 100644 --- a/apps/opencs/CMakeLists.txt +++ b/apps/opencs/CMakeLists.txt @@ -1,4 +1,4 @@ -set (OPENCS_SRC main.cpp +set (OPENCS_SRC ${CMAKE_SOURCE_DIR}/files/windows/opencs.rc ) @@ -143,7 +143,7 @@ set (OPENCS_UI ${CMAKE_SOURCE_DIR}/files/ui/filedialog.ui ) -source_group (openmw-cs FILES ${OPENCS_SRC} ${OPENCS_HDR}) +source_group (openmw-cs FILES main.cpp ${OPENCS_SRC} ${OPENCS_HDR}) if(WIN32) set(QT_USE_QTMAIN TRUE) @@ -167,18 +167,26 @@ else() set (OPENCS_OPENMW_CFG "") endif(APPLE) -openmw_add_executable(openmw-cs - MACOSX_BUNDLE +add_library(openmw-cs-lib ${OPENCS_SRC} ${OPENCS_UI_HDR} ${OPENCS_MOC_SRC} ${OPENCS_RES_SRC} +) + +set_target_properties(openmw-cs-lib PROPERTIES OUTPUT_NAME openmw-cs) + +openmw_add_executable(openmw-cs + MACOSX_BUNDLE ${OPENCS_MAC_ICON} ${OPENCS_CFG} ${OPENCS_DEFAULT_FILTERS_FILE} ${OPENCS_OPENMW_CFG} + main.cpp ) +target_link_libraries(openmw-cs openmw-cs-lib) + if(APPLE) set(OPENCS_BUNDLE_NAME "OpenMW-CS") set(OPENCS_BUNDLE_RESOURCES_DIR "${OpenMW_BINARY_DIR}/${OPENCS_BUNDLE_NAME}.app/Contents/Resources") @@ -212,7 +220,7 @@ if(APPLE) COMMAND cp "${OpenMW_BINARY_DIR}/resources/version" "${OPENCS_BUNDLE_RESOURCES_DIR}/resources") endif(APPLE) -target_link_libraries(openmw-cs +target_link_libraries(openmw-cs-lib # CMake's built-in OSG finder does not use pkgconfig, so we have to # manually ensure the order is correct for inter-library dependencies. # This only makes a difference with `-DOPENMW_USE_SYSTEM_OSG=ON -DOSG_STATIC=ON`. @@ -228,10 +236,10 @@ target_link_libraries(openmw-cs components_qt ) -target_link_libraries(openmw-cs Qt::Widgets Qt::Core Qt::Network Qt::OpenGL) +target_link_libraries(openmw-cs-lib Qt::Widgets Qt::Core Qt::Network Qt::OpenGL) if (WIN32) - target_link_libraries(openmw-cs ${Boost_LOCALE_LIBRARY}) + target_link_libraries(openmw-cs-lib ${Boost_LOCALE_LIBRARY}) INSTALL(TARGETS openmw-cs RUNTIME DESTINATION ".") get_generator_is_multi_config(multi_config) @@ -257,16 +265,18 @@ if(APPLE) endif() if(USE_QT) - set_property(TARGET openmw-cs PROPERTY AUTOMOC ON) + set_property(TARGET openmw-cs-lib PROPERTY AUTOMOC ON) endif(USE_QT) if (BUILD_WITH_CODE_COVERAGE) + target_compile_options(openmw-cs-lib PRIVATE --coverage) + target_link_libraries(openmw-cs-lib gcov) target_compile_options(openmw-cs PRIVATE --coverage) target_link_libraries(openmw-cs gcov) endif() if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16 AND MSVC) - target_precompile_headers(openmw-cs PRIVATE + target_precompile_headers(openmw-cs-lib PRIVATE From 6f6e452dfafc7eb80f38f514a6d3ac95ecd19497 Mon Sep 17 00:00:00 2001 From: elsid Date: Fri, 10 Mar 2023 01:19:15 +0100 Subject: [PATCH 2/4] Add executable to run CS tests --- CI/before_script.msvc.sh | 1 + CMakeLists.txt | 20 +++++++++++---- apps/opencs/CMakeLists.txt | 37 ++++++++++++++++----------- apps/opencs_tests/CMakeLists.txt | 31 ++++++++++++++++++++++ apps/opencs_tests/main.cpp | 7 +++++ apps/openmw_test_suite/CMakeLists.txt | 5 ---- extern/CMakeLists.txt | 2 +- 7 files changed, 77 insertions(+), 26 deletions(-) create mode 100644 apps/opencs_tests/CMakeLists.txt create mode 100644 apps/opencs_tests/main.cpp diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index d4930dce9c..59fc8b8c0a 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -1117,6 +1117,7 @@ fi if [ -n "${TEST_FRAMEWORK}" ]; then add_cmake_opts -DBUILD_UNITTESTS=ON + add_cmake_opts -DBUILD_OPENCS_TESTS=ON fi if [ -n "$ACTIVATE_MSVC" ]; then diff --git a/CMakeLists.txt b/CMakeLists.txt index 4954722843..bc964f60d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,13 +54,14 @@ option(BUILD_UNITTESTS "Enable Unittests with Google C++ Unittest" OFF) option(BUILD_BENCHMARKS "Build benchmarks with Google Benchmark" OFF) option(BUILD_NAVMESHTOOL "Build navmesh tool" ON) option(BUILD_BULLETOBJECTTOOL "Build Bullet object tool" ON) +option(BUILD_OPENCS_TESTS "Build OpenMW Construction Set tests" OFF) set(OpenGL_GL_PREFERENCE LEGACY) # Use LEGACY as we use GL2; GLNVD is for GL3 and up. -if (NOT BUILD_LAUNCHER AND NOT BUILD_OPENCS AND NOT BUILD_WIZARD) - set(USE_QT FALSE) -else() +if (BUILD_LAUNCHER OR BUILD_OPENCS OR BUILD_WIZARD OR BUILD_OPENCS_TESTS) set(USE_QT TRUE) +else() + set(USE_QT FALSE) endif() # If the user doesn't supply a CMAKE_BUILD_TYPE via command line, choose one for them. @@ -294,6 +295,11 @@ if (OPENMW_USE_SYSTEM_YAML_CPP) find_package(yaml-cpp REQUIRED) endif() +if ((BUILD_UNITTESTS OR BUILD_OPENCS_TESTS) AND OPENMW_USE_SYSTEM_GOOGLETEST) + find_package(GTest 1.10 REQUIRED) + find_package(GMock 1.10 REQUIRED) +endif() + add_subdirectory(extern) # Sound setup @@ -621,7 +627,7 @@ endif (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clan add_subdirectory (extern/osg-ffmpeg-videoplayer) add_subdirectory (extern/oics) add_subdirectory (extern/Base64) -if (BUILD_OPENCS AND Qt5_FOUND) +if ((BUILD_OPENCS OR BUILD_OPENCS_TESTS) AND Qt5_FOUND) add_subdirectory (extern/osgQt) endif() @@ -657,7 +663,7 @@ if (BUILD_ESSIMPORTER) add_subdirectory (apps/essimporter ) endif() -if (BUILD_OPENCS) +if (BUILD_OPENCS OR BUILD_OPENCS_TESTS) add_subdirectory (apps/opencs) endif() @@ -686,6 +692,10 @@ if (BUILD_BULLETOBJECTTOOL) add_subdirectory( apps/bulletobjecttool ) endif() +if (BUILD_OPENCS_TESTS) + add_subdirectory(apps/opencs_tests) +endif() + if (WIN32) if (MSVC) foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} ) diff --git a/apps/opencs/CMakeLists.txt b/apps/opencs/CMakeLists.txt index 2104d80750..2247d71717 100644 --- a/apps/opencs/CMakeLists.txt +++ b/apps/opencs/CMakeLists.txt @@ -176,18 +176,25 @@ add_library(openmw-cs-lib set_target_properties(openmw-cs-lib PROPERTIES OUTPUT_NAME openmw-cs) -openmw_add_executable(openmw-cs - MACOSX_BUNDLE - ${OPENCS_MAC_ICON} - ${OPENCS_CFG} - ${OPENCS_DEFAULT_FILTERS_FILE} - ${OPENCS_OPENMW_CFG} - main.cpp -) +if(BUILD_OPENCS) + openmw_add_executable(openmw-cs + MACOSX_BUNDLE + ${OPENCS_MAC_ICON} + ${OPENCS_CFG} + ${OPENCS_DEFAULT_FILTERS_FILE} + ${OPENCS_OPENMW_CFG} + main.cpp + ) -target_link_libraries(openmw-cs openmw-cs-lib) + target_link_libraries(openmw-cs openmw-cs-lib) -if(APPLE) + if (BUILD_WITH_CODE_COVERAGE) + target_compile_options(openmw-cs-lib PRIVATE --coverage) + target_link_libraries(openmw-cs-lib gcov) + endif() +endif() + +if(APPLE AND BUILD_OPENCS) set(OPENCS_BUNDLE_NAME "OpenMW-CS") set(OPENCS_BUNDLE_RESOURCES_DIR "${OpenMW_BINARY_DIR}/${OPENCS_BUNDLE_NAME}.app/Contents/Resources") @@ -218,7 +225,7 @@ if(APPLE) add_custom_command(TARGET openmw-cs POST_BUILD COMMAND cp "${OpenMW_BINARY_DIR}/resources/version" "${OPENCS_BUNDLE_RESOURCES_DIR}/resources") -endif(APPLE) +endif() target_link_libraries(openmw-cs-lib # CMake's built-in OSG finder does not use pkgconfig, so we have to @@ -240,6 +247,9 @@ target_link_libraries(openmw-cs-lib Qt::Widgets Qt::Core Qt::Network Qt::OpenGL) if (WIN32) target_link_libraries(openmw-cs-lib ${Boost_LOCALE_LIBRARY}) +endif() + +if (WIN32 AND BUILD_OPENCS) INSTALL(TARGETS openmw-cs RUNTIME DESTINATION ".") get_generator_is_multi_config(multi_config) @@ -259,8 +269,7 @@ if (MSVC) endif (CMAKE_CL_64) endif (MSVC) - -if(APPLE) +if(APPLE AND BUILD_OPENCS) INSTALL(TARGETS openmw-cs BUNDLE DESTINATION "." COMPONENT Bundle) endif() @@ -271,8 +280,6 @@ endif(USE_QT) if (BUILD_WITH_CODE_COVERAGE) target_compile_options(openmw-cs-lib PRIVATE --coverage) target_link_libraries(openmw-cs-lib gcov) - target_compile_options(openmw-cs PRIVATE --coverage) - target_link_libraries(openmw-cs gcov) endif() if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16 AND MSVC) diff --git a/apps/opencs_tests/CMakeLists.txt b/apps/opencs_tests/CMakeLists.txt new file mode 100644 index 0000000000..00d8d0177c --- /dev/null +++ b/apps/opencs_tests/CMakeLists.txt @@ -0,0 +1,31 @@ +file(GLOB OPENCS_TESTS_SRC_FILES + main.cpp +) + +source_group(apps\\openmw-cs-tests FILES ${OPENCS_TESTS_SRC_FILES}) + +openmw_add_executable(openmw-cs-tests ${OPENCS_TESTS_SRC_FILES}) + +target_include_directories(openmw-cs-tests SYSTEM PRIVATE ${GTEST_INCLUDE_DIRS}) +target_include_directories(openmw-cs-tests SYSTEM PRIVATE ${GMOCK_INCLUDE_DIRS}) + +target_link_libraries(openmw-cs-tests PRIVATE + openmw-cs-lib + GTest::GTest + GMock::GMock +) + +if (UNIX AND NOT APPLE) + target_link_libraries(openmw-cs-tests PRIVATE ${CMAKE_THREAD_LIBS_INIT}) +endif() + +if (BUILD_WITH_CODE_COVERAGE) + target_compile_options(openmw-cs-tests PRIVATE --coverage) + target_link_libraries(openmw-cs-tests PRIVATE gcov) +endif() + +if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16 AND MSVC) + target_precompile_headers(openmw-cs-tests PRIVATE + + ) +endif() diff --git a/apps/opencs_tests/main.cpp b/apps/opencs_tests/main.cpp new file mode 100644 index 0000000000..e1a8e67397 --- /dev/null +++ b/apps/opencs_tests/main.cpp @@ -0,0 +1,7 @@ +#include + +int main(int argc, char* argv[]) +{ + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/apps/openmw_test_suite/CMakeLists.txt b/apps/openmw_test_suite/CMakeLists.txt index 6e7f191eae..34892905c1 100644 --- a/apps/openmw_test_suite/CMakeLists.txt +++ b/apps/openmw_test_suite/CMakeLists.txt @@ -1,8 +1,3 @@ -if (OPENMW_USE_SYSTEM_GOOGLETEST) - find_package(GTest 1.10 REQUIRED) - find_package(GMock 1.10 REQUIRED) -endif() - include_directories(SYSTEM ${GTEST_INCLUDE_DIRS}) include_directories(SYSTEM ${GMOCK_INCLUDE_DIRS}) diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 20b62dbd84..36b56b2611 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -303,7 +303,7 @@ if (NOT OPENMW_USE_SYSTEM_ICU) set(ICU_LIBRARIES ICU::i18n ICU::uc ICU::data PARENT_SCOPE) endif() -if (BUILD_UNITTESTS AND NOT OPENMW_USE_SYSTEM_GOOGLETEST) +if ((BUILD_UNITTESTS OR BUILD_OPENCS_TESTS) AND NOT OPENMW_USE_SYSTEM_GOOGLETEST) cmake_minimum_required(VERSION 3.11) include(FetchContent) From 403bc927fb9bc9be12d485ed3632e8856dae8d51 Mon Sep 17 00:00:00 2001 From: elsid Date: Fri, 10 Mar 2023 01:31:57 +0100 Subject: [PATCH 3/4] Add test for CSMWorld::InfoCollection::load --- apps/opencs_tests/CMakeLists.txt | 1 + .../model/world/testinfocollection.cpp | 122 ++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 apps/opencs_tests/model/world/testinfocollection.cpp diff --git a/apps/opencs_tests/CMakeLists.txt b/apps/opencs_tests/CMakeLists.txt index 00d8d0177c..92b14b797f 100644 --- a/apps/opencs_tests/CMakeLists.txt +++ b/apps/opencs_tests/CMakeLists.txt @@ -1,5 +1,6 @@ file(GLOB OPENCS_TESTS_SRC_FILES main.cpp + model/world/testinfocollection.cpp ) source_group(apps\\openmw-cs-tests FILES ${OPENCS_TESTS_SRC_FILES}) diff --git a/apps/opencs_tests/model/world/testinfocollection.cpp b/apps/opencs_tests/model/world/testinfocollection.cpp new file mode 100644 index 0000000000..9901266647 --- /dev/null +++ b/apps/opencs_tests/model/world/testinfocollection.cpp @@ -0,0 +1,122 @@ +#include "apps/opencs/model/world/infocollection.hpp" + +#include "components/esm3/esmreader.hpp" +#include "components/esm3/esmwriter.hpp" +#include "components/esm3/formatversion.hpp" +#include "components/esm3/loaddial.hpp" +#include "components/esm3/loadinfo.hpp" + +#include +#include + +#include +#include +#include + +namespace CSMWorld +{ + namespace + { + using namespace ::testing; + + std::unique_ptr saveDialogueWithInfos( + const ESM::Dialogue& dialogue, std::span infos) + { + auto stream = std::make_unique(); + + ESM::ESMWriter writer; + writer.setFormatVersion(ESM::CurrentSaveGameFormatVersion); + writer.save(*stream); + + writer.startRecord(ESM::REC_DIAL); + dialogue.save(writer); + writer.endRecord(ESM::REC_DIAL); + + for (const ESM::DialInfo& info : infos) + { + writer.startRecord(ESM::REC_INFO); + info.save(writer); + writer.endRecord(ESM::REC_INFO); + } + + return stream; + } + + void loadDialogueWithInfos(bool base, std::unique_ptr stream, InfoCollection& infoCollection, + InfosByTopic& infosByTopic) + { + ESM::ESMReader reader; + reader.open(std::move(stream), "test"); + + ASSERT_TRUE(reader.hasMoreRecs()); + ASSERT_EQ(reader.getRecName().toInt(), ESM::REC_DIAL); + reader.getRecHeader(); + bool isDeleted; + ESM::Dialogue dialogue; + dialogue.load(reader, isDeleted); + + while (reader.hasMoreRecs()) + { + ASSERT_EQ(reader.getRecName().toInt(), ESM::REC_INFO); + reader.getRecHeader(); + infoCollection.load(reader, base, dialogue, infosByTopic); + } + } + + void saveAndLoadDialogueWithInfos(const ESM::Dialogue& dialogue, std::span infos, + bool base, InfoCollection& infoCollection, InfosByTopic& infosByTopic) + { + loadDialogueWithInfos(base, saveDialogueWithInfos(dialogue, infos), infoCollection, infosByTopic); + } + + TEST(CSMWorldInfoCollectionTest, loadShouldAddRecord) + { + ESM::Dialogue dialogue; + dialogue.blank(); + dialogue.mId = ESM::RefId::stringRefId("dialogue1"); + + ESM::DialInfo info; + info.blank(); + info.mId = ESM::RefId::stringRefId("info1"); + + const bool base = true; + InfosByTopic infosByTopic; + InfoCollection collection; + saveAndLoadDialogueWithInfos(dialogue, std::array{ info }, base, collection, infosByTopic); + + EXPECT_EQ(collection.getSize(), 1); + ASSERT_EQ(collection.searchId(ESM::RefId::stringRefId("dialogue1#info1")), 0); + const Record& record = collection.getRecord(0); + ASSERT_EQ(record.mState, RecordBase::State_BaseOnly); + EXPECT_EQ(record.mBase.mTopicId, dialogue.mId); + EXPECT_EQ(record.mBase.mOriginalId, info.mId); + EXPECT_EQ(record.mBase.mId, ESM::RefId::stringRefId("dialogue1#info1")); + } + + TEST(CSMWorldInfoCollectionTest, loadShouldUpdateRecord) + { + ESM::Dialogue dialogue; + dialogue.blank(); + dialogue.mId = ESM::RefId::stringRefId("dialogue1"); + + ESM::DialInfo info; + info.blank(); + info.mId = ESM::RefId::stringRefId("info1"); + + const bool base = true; + InfosByTopic infosByTopic; + InfoCollection collection; + saveAndLoadDialogueWithInfos(dialogue, std::array{ info }, base, collection, infosByTopic); + + ESM::DialInfo updatedInfo = info; + updatedInfo.mActor = ESM::RefId::stringRefId("newActor"); + + saveAndLoadDialogueWithInfos(dialogue, std::array{ updatedInfo }, base, collection, infosByTopic); + + ASSERT_EQ(collection.searchId(ESM::RefId::stringRefId("dialogue1#info1")), 0); + const Record& record = collection.getRecord(0); + ASSERT_EQ(record.mState, RecordBase::State_BaseOnly); + EXPECT_EQ(record.mBase.mActor, ESM::RefId::stringRefId("newActor")); + } + } +} From 712feb0d921d52a2758f7f74053b460ec773ac5d Mon Sep 17 00:00:00 2001 From: elsid Date: Fri, 10 Mar 2023 02:11:29 +0100 Subject: [PATCH 4/4] Run CS tests in CI --- .gitlab-ci.yml | 23 ++++++++++++----------- CI/before_script.linux.sh | 1 + 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7246db7e54..c285cf0837 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,12 +47,13 @@ variables: - df -h - du -sh . - cmake --install . - - if [[ "${BUILD_TESTS_ONLY}" ]]; then ./openmw_test_suite --gtest_output="xml:tests.xml"; fi + - if [[ "${BUILD_TESTS_ONLY}" ]]; then ./openmw_test_suite --gtest_output="xml:openmw_tests.xml"; fi + - if [[ "${BUILD_TESTS_ONLY}" ]]; then ./openmw-cs-tests --gtest_output="xml:openmw_cs_tests.xml"; fi - if [[ "${BUILD_TESTS_ONLY}" && ! "${BUILD_WITH_CODE_COVERAGE}" ]]; then ./openmw_detournavigator_navmeshtilescache_benchmark; fi - ccache -s - df -h - if [[ "${BUILD_WITH_CODE_COVERAGE}" ]]; then gcovr --xml-pretty --exclude-unreachable-branches --print-summary --root "${CI_PROJECT_DIR}" -j $(nproc) -o ../coverage.xml; fi - - ls | grep -v -e '^extern$' -e '^install$' -e '^tests.xml$' | xargs -I '{}' rm -rf './{}' + - ls | grep -v -e '^extern$' -e '^install$' -e '^openmw_tests.xml$' -e '^openmw_cs_tests.xml$' | xargs -I '{}' rm -rf './{}' - cd .. - df -h - du -sh build/ @@ -175,7 +176,7 @@ Ubuntu_GCC_tests: name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA} when: always reports: - junit: build/tests.xml + junit: build/*_tests.xml .Ubuntu_GCC_tests_Debug: extends: Ubuntu_GCC @@ -191,7 +192,7 @@ Ubuntu_GCC_tests: name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA} when: always reports: - junit: build/tests.xml + junit: build/*_tests.xml Ubuntu_GCC_tests_asan: extends: Ubuntu_GCC @@ -209,7 +210,7 @@ Ubuntu_GCC_tests_asan: name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA} when: always reports: - junit: build/tests.xml + junit: build/*_tests.xml Ubuntu_GCC_tests_ubsan: extends: Ubuntu_GCC @@ -226,7 +227,7 @@ Ubuntu_GCC_tests_ubsan: name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA} when: always reports: - junit: build/tests.xml + junit: build/*_tests.xml .Ubuntu_GCC_tests_tsan: extends: Ubuntu_GCC @@ -244,7 +245,7 @@ Ubuntu_GCC_tests_ubsan: name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA} when: always reports: - junit: build/tests.xml + junit: build/*_tests.xml Ubuntu_GCC_tests_coverage: extends: .Ubuntu_GCC_tests_Debug @@ -263,7 +264,7 @@ Ubuntu_GCC_tests_coverage: coverage_report: coverage_format: cobertura path: coverage.xml - junit: build/tests.xml + junit: build/*_tests.xml .Ubuntu_Static_Deps: extends: Ubuntu_Clang @@ -304,7 +305,7 @@ Ubuntu_GCC_tests_coverage: name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA} when: always reports: - junit: build/tests.xml + junit: build/*_tests.xml Ubuntu_Clang: extends: .Ubuntu @@ -344,7 +345,7 @@ Ubuntu_Clang_Tidy: name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA} when: always reports: - junit: build/tests.xml + junit: build/*_tests.xml Ubuntu_Clang_tests_Debug: extends: Ubuntu_Clang @@ -359,7 +360,7 @@ Ubuntu_Clang_tests_Debug: name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA} when: always reports: - junit: build/tests.xml + junit: build/*_tests.xml Ubuntu_Clang_integration_tests: extends: .Ubuntu_Image diff --git a/CI/before_script.linux.sh b/CI/before_script.linux.sh index e8a786d7c6..c6525a6d04 100755 --- a/CI/before_script.linux.sh +++ b/CI/before_script.linux.sh @@ -101,6 +101,7 @@ if [[ "${BUILD_TESTS_ONLY}" ]]; then -DBUILD_BULLETOBJECTTOOL=OFF \ -DBUILD_NIFTEST=OFF \ -DBUILD_UNITTESTS=${BUILD_UNITTESTS} \ + -DBUILD_OPENCS_TESTS=${BUILD_UNITTESTS} \ -DBUILD_BENCHMARKS=${BUILD_BENCHMARKS} \ .. else