Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 1 | From d2525ba0bc7b11de12c54ea1a3d1eb862537136d Mon Sep 17 00:00:00 2001 |
| 2 | From: Yi Zhao <yi.zhao@windriver.com> |
| 3 | Date: Wed, 15 Mar 2023 16:51:58 +0800 |
| 4 | Subject: [PATCH] tests/CMakeLists.txt: do not search ssh/sshd commands on host |
| 5 | |
| 6 | It will search ssh/sshd commands on host when configure. Since they are |
| 7 | not required by unittests, we can skip the search. |
| 8 | |
| 9 | Upstream-Status: Inappropriate [embedded specific] |
| 10 | |
| 11 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> |
| 12 | --- |
| 13 | tests/CMakeLists.txt | 2 ++ |
| 14 | 1 file changed, 2 insertions(+) |
| 15 | |
| 16 | diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt |
| 17 | index 22a36f37..aa32ca2e 100644 |
| 18 | --- a/tests/CMakeLists.txt |
| 19 | +++ b/tests/CMakeLists.txt |
| 20 | @@ -86,6 +86,7 @@ set(TEST_TARGET_LIBRARIES |
| 21 | |
| 22 | add_subdirectory(unittests) |
| 23 | |
| 24 | +if (CLIENT_TESTING OR SERVER_TESTING) |
| 25 | # OpenSSH Capabilities are required for all unit tests |
| 26 | find_program(SSH_EXECUTABLE NAMES ssh) |
| 27 | if (SSH_EXECUTABLE) |
| 28 | @@ -293,6 +294,7 @@ if (CLIENT_TESTING OR SERVER_TESTING) |
| 29 | |
| 30 | message(STATUS "TORTURE_ENVIRONMENT=${TORTURE_ENVIRONMENT}") |
| 31 | endif () |
| 32 | +endif () |
| 33 | |
| 34 | configure_file(tests_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/tests_config.h) |
| 35 | |
| 36 | -- |
| 37 | 2.25.1 |
| 38 | |