diff options
author | makise-homura <akemi_homura@kurisa.ch> | 2022-06-23 20:09:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-06-28 15:12:04 (GMT) |
commit | b05d297964b4352b81f7ed4aab247609b6a4b0b7 (patch) | |
tree | 35a4dff1240ed28571907a159b7bf619d3dc4acd /Tests/CMakeLists.txt | |
parent | 2faabab644571b84b485f6fe101d09af0759d3a2 (diff) | |
download | CMake-b05d297964b4352b81f7ed4aab247609b6a4b0b7.zip CMake-b05d297964b4352b81f7ed4aab247609b6a4b0b7.tar.gz CMake-b05d297964b4352b81f7ed4aab247609b6a4b0b7.tar.bz2 |
Tests: handle a case when hg executable is broken
OS Elbrus 6.0-rc1 to rc3 have hg executable broken
because of python2 and python3 module directories conflict.
Here, we avoid hg related tests if such case is detected.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index ce22363..c25b6e2 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -2673,7 +2673,10 @@ if(BUILD_TESTING) endif() if(NOT DEFINED CMake_TEST_CTestUpdate_HG AND HG_EXECUTABLE AND (UNIX OR NOT "${HG_EXECUTABLE}" MATCHES "cygwin")) - set(CMake_TEST_CTestUpdate_HG 1) + execute_process(COMMAND "${HG_EXECUTABLE}" --version OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE HG_RV) + if(HG_RV EQUAL 0) + set(CMake_TEST_CTestUpdate_HG 1) + endif() endif() if(CMake_TEST_CTestUpdate_HG) if(NOT HG_EXECUTABLE) |