Tests: Fix RunCMake.ExternalProject when git is not available
Move Git-dependent test cases added by !9296 (merged) into the block of cases that run only when Git is found.
Fixes: #26104 (closed)
Backport: release
Move Git-dependent test cases added by !9296 (merged) into the block of cases that run only when Git is found.
Fixes: #26104 (closed)
Backport: release