Skip to content

Commit

Permalink
iox-#1099 Execute mock tests on CI
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Hoinkis <simon.hoinkis@apex.ai>
  • Loading branch information
mossmaurice committed Apr 7, 2022
1 parent 1d2d796 commit 5355a2e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
17 changes: 14 additions & 3 deletions iceoryx_meta/tests.cmake
Expand Up @@ -30,6 +30,10 @@ if (BUILD_TEST)
endif()

### create test targets without Timing tests

### Only hoofs has mock tests
list(APPEND MOCKTEST_CMD COMMAND ./hoofs/test/hoofs_mocktests --gtest_filter=-*.TimingTest_* --gtest_output=xml:${CMAKE_BINARY_DIR}/testresults/hoofs_MockTestResults.xml)

foreach(cmp IN ITEMS ${COMPONENTS})
list(APPEND MODULETEST_CMD COMMAND ./${cmp}/test/${cmp}_moduletests --gtest_filter=-*.TimingTest_* --gtest_output=xml:${CMAKE_BINARY_DIR}/testresults/${cmp}_ModuleTestResults.xml)
endforeach()
Expand All @@ -39,14 +43,21 @@ if (BUILD_TEST)
list(APPEND INTEGRATIONTEST_CMD COMMAND ./${cmp}/test/${cmp}_integrationtests --gtest_filter=-*.TimingTest_* --gtest_output=xml:${CMAKE_BINARY_DIR}/testresults/${cmp}_IntegrationTestResults.xml)
endif()
endforeach()

add_custom_target( all_tests
${MODULETEST_CMD}
${MOCKTEST_CMD}
${INTEGRATIONTEST_CMD}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
VERBATIM
)

add_custom_target( mock_tests
${MOCKTEST_CMD}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
VERBATIM
)

### we need to create separate test targets for coverage scan
add_custom_target( module_tests
${MODULETEST_CMD}
Expand All @@ -57,15 +68,15 @@ if (BUILD_TEST)
add_custom_target( integration_tests
${INTEGRATIONTEST_CMD}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
VERBATIM
VERBATIM
)

### create test target with Timing tests
foreach(cmp IN ITEMS ${COMPONENTS})
list(APPEND TIMING_MODULETEST_CMD COMMAND ./${cmp}/test/${cmp}_moduletests --gtest_filter=*.TimingTest_* --gtest_output=xml:${CMAKE_BINARY_DIR}/testresults/${cmp}_TimingModuleTestResults.xml)
if(NOT (cmp STREQUAL "dds_gateway" OR cmp STREQUAL "binding_c"))
list(APPEND TIMING_INTEGRATIONTEST_CMD COMMAND ./${cmp}/test/${cmp}_integrationtests --gtest_filter=*.TimingTest_* --gtest_output=xml:${CMAKE_BINARY_DIR}/testresults/${cmp}_TimingIntegrationTestResults.xml)
endif()
endif()
endforeach()

add_custom_target( timing_module_tests
Expand Down
1 change: 1 addition & 0 deletions tools/ci/build-test-windows.ps1
Expand Up @@ -28,6 +28,7 @@ if ($?) { Write-Host "running tests (excluding timing_tests)" }
# we have to exclude the tests explicitly until everyone is running

if ($?) { build\hoofs\test\Debug\hoofs_moduletests.exe --gtest_filter="-*TimingTest*" }
if ($?) { build\hoofs\test\Debug\hoofs_mocktests.exe }
if ($?) { build\hoofs\test\Debug\hoofs_integrationtests.exe }
if ($?) { build\binding_c\test\Debug\binding_c_moduletests.exe --gtest_filter="-BindingC_Runtime_test.RuntimeNameLengthIsOutOfLimit:BindingC_Runtime_test.RuntimeNameIsNullptr:*TimingTest*" }
if ($?) { build\posh\test\Debug\posh_moduletests.exe --gtest_filter="-ChunkHeader_test.ChunkHeaderBinaryCompatibilityCheck:TomlGatewayConfigParserSuiteTest*:IceoryxRoudiApp_test.ConstructorCalledWithArgUniqueIdTwoTimesReturnError:IceoryxRoudiApp_test.ConstructorCalledWithArgVersionSetRunVariableToFalse:ValidTest*:ParseAllMalformedInput*:*TimingTest*" }
Expand Down

0 comments on commit 5355a2e

Please sign in to comment.