libsp: Unit testing the functions of ffa_api.h
Testing the FF-A layer by mocking the FF-A SVC layer and validating
calls and returned values.
Signed-off-by: Imre Kis <imre.kis@arm.com>
Change-Id: I544a5fa0b5eb1c72e3443ff7862dacee1b3e8097
diff --git a/components/messaging/ffa/libsp/tests.cmake b/components/messaging/ffa/libsp/tests.cmake
index 77153ff..d798621 100644
--- a/components/messaging/ffa/libsp/tests.cmake
+++ b/components/messaging/ffa/libsp/tests.cmake
@@ -30,3 +30,16 @@
-DARM64
)
+unit_test_add_suite(
+ NAME libsp_ffa
+ SOURCES
+ ${CMAKE_CURRENT_LIST_DIR}/test/test_ffa_api.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/test/mock_ffa_internal_api.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/ffa.c
+ ${CMAKE_CURRENT_LIST_DIR}/test/mock_assert.cpp
+ INCLUDE_DIRECTORIES
+ ${CMAKE_CURRENT_LIST_DIR}/include/
+ ${PROJECT_PATH}/components/common/utils/include
+ COMPILE_DEFINITIONS
+ -DARM64
+)