Build: Align change tf-m-tests config pass

tf-m-tests might pass in empty config file path or directory. Update the
parse of those config value to align with tf-m-tests change.

Change-Id: I8bf0c0a62002ac806f4e9cb9f19766ffeebe0d9b
Signed-off-by: David Hu <david.hu@arm.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 249f34a..8061c92 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,7 +70,7 @@
     add_subdirectory(platform/ext/accelerator)
 endif()
 
-if(DEFINED CONFIG_TFM_TEST_DIR)
+if(IS_DIRECTORY ${CONFIG_TFM_TEST_DIR})
     add_subdirectory(${CONFIG_TFM_TEST_DIR} ${CMAKE_CURRENT_BINARY_DIR}/tf-m-tests)
 endif()