libsp: Unit testing sp_discovery.h

Testing the functions of sp_discovery.h using the mocked FF-A and
SP RXTX implementations.

Signed-off-by: Imre Kis <imre.kis@arm.com>
Change-Id: I16d023fd3da457030ba97a3689a10e7931563b1d
diff --git a/components/messaging/ffa/libsp/tests.cmake b/components/messaging/ffa/libsp/tests.cmake
index 200f8c0..39adc97 100644
--- a/components/messaging/ffa/libsp/tests.cmake
+++ b/components/messaging/ffa/libsp/tests.cmake
@@ -82,3 +82,17 @@
 	COMPILE_DEFINITIONS
 		-DARM64
 )
+
+unit_test_add_suite(
+	NAME libsp_sp_discovery
+	SOURCES
+		${CMAKE_CURRENT_LIST_DIR}/test/test_sp_discovery.cpp
+		${CMAKE_CURRENT_LIST_DIR}/sp_discovery.c
+		${CMAKE_CURRENT_LIST_DIR}/test/mock_ffa_api.cpp
+		${CMAKE_CURRENT_LIST_DIR}/test/mock_sp_rxtx.cpp
+	INCLUDE_DIRECTORIES
+		${CMAKE_CURRENT_LIST_DIR}/include/
+		${PROJECT_PATH}/components/common/utils/include
+	COMPILE_DEFINITIONS
+		-DARM64
+)