Skip to content

Commit 026dbb3

Browse files
committedJun 6, 2022
Define SOURCETREE fixture for checking if source tree is changed
Use SKIP_RETURN_CODE=2 on them, so it is still possible to run without a working git
1 parent 290b374 commit 026dbb3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,15 @@ if (ENABLE_TESTS)
575575
# For server side testing we have no X, we can use xvfb as a fake x
576576
# sudo apt-get install xvfb
577577
add_custom_target(check COMMAND xvfb-run --server-args=-screen\ 0\ 1024x768x24 ctest --output-on-failure)
578+
579+
# Define SOURCETREE fixture
580+
add_test(NAME logGitStatus COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/chkgitstatus.sh log)
581+
add_test(NAME checkGitStatus COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/chkgitstatus.sh check)
582+
set_tests_properties(logGitStatus PROPERTIES FIXTURES_SETUP SOURCETREE)
583+
set_property(TEST logGitStatus PROPERTY SKIP_RETURN_CODE 2)
584+
set_tests_properties(checkGitStatus PROPERTIES FIXTURES_CLEANUP SOURCETREE)
585+
set_property(TEST checkGitStatus PROPERTY SKIP_RETURN_CODE 2)
586+
578587
endif()
579588

580589
if (WITH_CORE)

0 commit comments

Comments
 (0)
Please sign in to comment.