From d2525ba0bc7b11de12c54ea1a3d1eb862537136d Mon Sep 17 00:00:00 2001
From: Yi Zhao <yi.zhao@windriver.com>
Date: Wed, 15 Mar 2023 16:51:58 +0800
Subject: [PATCH] tests/CMakeLists.txt: do not search ssh/sshd commands on host

It will search ssh/sshd commands on host when configure. Since they are
not required by unittests, we can skip the search.

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Virendra Thakur <virendrak@kpit.com>
---
 tests/CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 22a36f37..aa32ca2e 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -48,6 +48,7 @@ set(TEST_TARGET_LIBRARIES

 add_subdirectory(unittests)

+if (CLIENT_TESTING OR SERVER_TESTING)
 if (CLIENT_TESTING)
     find_package(socket_wrapper 1.1.5 REQUIRED)
     find_package(nss_wrapper 1.1.2 REQUIRED)
@@ -152,6 +153,7 @@ if (WITH_SERVER AND SERVER_TESTING)
     add_subdirectory(pkd)
 endif (WITH_SERVER AND SERVER_TESTING)

+endif ()
 if (FUZZ_TESTING)
     add_subdirectory(fuzz)
 endif()
-- 
2.25.1
