From 5a52c66b1f3c2dadbe6361ef05ec21d898286f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Kapu=C5=9Bci=C5=84ski?= Date: Tue, 22 Aug 2023 21:39:55 +0200 Subject: [PATCH] Renamed target colobot_ut to Colobot-UnitTests --- .github/workflows/build.yml | 6 +++--- README-dev.md | 2 +- test/unit/CMakeLists.txt | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5e6bd383..0daab2ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,7 +69,7 @@ jobs: - name: Run tests # TODO: Maybe run Windows tests using wine as well? working-directory: build - run: ./colobot_ut --gtest_output=xml:gtestresults.xml + run: ./Colobot-UnitTests --gtest_output=xml:gtestresults.xml if: matrix.target_os == 'linux' - name: Upload test results uses: actions/upload-artifact@v2 @@ -105,7 +105,7 @@ jobs: - name: Run tests # TODO: Maybe run Windows tests using wine as well? working-directory: build - run: ./colobot_ut --gtest_output=xml:gtestresults.xml + run: ./Colobot-UnitTests --gtest_output=xml:gtestresults.xml if: matrix.target_os == 'macos' - name: Upload test results uses: actions/upload-artifact@v2 @@ -185,7 +185,7 @@ jobs: path: install - name: Run tests working-directory: build - run: ./colobot_ut --gtest_output=xml:gtestresults.xml + run: ./Colobot-UnitTests --gtest_output=xml:gtestresults.xml - name: Upload test results uses: actions/upload-artifact@v2 with: diff --git a/README-dev.md b/README-dev.md index deb3d8a6..6b89bf91 100644 --- a/README-dev.md +++ b/README-dev.md @@ -77,7 +77,7 @@ Each test directory contains own `CMakeLists.txt` specifying targets. Note howev Tests can be enabled or disabled using CMake option TESTS (OFF by default). To run the automated tests (you must be in the build directory): ``` - ./colobot_ut + ./Colobot-UnitTests # or: make test # or: diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index 26139554..80f32ab2 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -8,7 +8,7 @@ file(COPY ${TEST_FILES} DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) add_definitions(-DGTEST_HAS_TR1_TUPLE=0) -add_executable(colobot_ut +add_executable(Colobot-UnitTests main.cpp app/app_test.cpp CBot/CBot_test.cpp @@ -23,7 +23,7 @@ add_executable(colobot_ut math/matrix_test.cpp math/vector_test.cpp) -target_include_directories(colobot_ut PRIVATE +target_include_directories(Colobot-UnitTests PRIVATE common math ${CMAKE_CURRENT_SOURCE_DIR} @@ -32,12 +32,12 @@ target_include_directories(colobot_ut PRIVATE ) if(MSVC) - target_compile_options(colobot_ut PRIVATE /utf-8) + target_compile_options(Colobot-UnitTests PRIVATE /utf-8) endif() -target_link_libraries(colobot_ut PRIVATE GTest::GTest hippomocks Colobot-Base) +target_link_libraries(Colobot-UnitTests PRIVATE GTest::GTest hippomocks Colobot-Base) -gtest_discover_tests(colobot_ut +gtest_discover_tests(Colobot-UnitTests WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DISCOVERY_MODE PRE_TEST ) @@ -45,9 +45,9 @@ gtest_discover_tests(colobot_ut # GoogleTest isn't compatible with -Wsuggest-override -Werror: # see https://github.com/google/googletest/issues/1063 if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) - target_compile_options(colobot_ut PRIVATE "-Wno-suggest-override") + target_compile_options(Colobot-UnitTests PRIVATE "-Wno-suggest-override") endif() if(COLOBOT_LINT_BUILD) - add_fake_header_sources("test/unit" colobot_ut) + add_fake_header_sources("test/unit" Colobot-UnitTests) endif()