Build: Support relative path of toolchain file in command line

The absolute paths of NS toolchain files specified in command line can
be quite long, as they are usually installed under CONFIG_SPE_PATH.

Support relative paths of NS toolchain file in command line.
The relative paths can be converted into absolute ones based on
CONFIG_SPE_PATH.

Signed-off-by: David Hu <david.hu@arm.com>
Change-Id: Ic3f97872e3619eb8d5a82c5ed6aff0dd77945e2e
diff --git a/tests_reg/CMakeLists.txt b/tests_reg/CMakeLists.txt
index f09f951..b34067d 100644
--- a/tests_reg/CMakeLists.txt
+++ b/tests_reg/CMakeLists.txt
@@ -19,9 +19,10 @@
     message(FATAL_ERROR "CONFIG_SPE_PATH = ${CONFIG_SPE_PATH} is not defined or incorrect. Please provide full path to TF-M build artifacts using -DCONFIG_SPE_PATH=")
 endif()
 
-if (NOT DEFINED TFM_TOOLCHAIN_FILE)
-    set(TFM_TOOLCHAIN_FILE    ${CONFIG_SPE_PATH}/cmake/toolchain_ns_GNUARM.cmake)
-endif()
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/../cmake)
+list(APPEND CMAKE_MODULE_PATH ${CONFIG_SPE_PATH}/cmake)
+include(remote_library)
+include(toolchain_selection)
 
 # A platform sprecific MCPU and architecture flags for NS side
 include(${CONFIG_SPE_PATH}/platform/cpuarch.cmake)
@@ -37,10 +38,6 @@
 # Test configurations
 include(${CMAKE_CURRENT_LIST_DIR}/test/config/default_test_config.cmake)
 
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/../cmake)
-list(APPEND CMAKE_MODULE_PATH ${CONFIG_SPE_PATH}/cmake)
-include(remote_library)
-
 add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../lib/ext ${CMAKE_BINARY_DIR}/lib/ext)
 
 include(${TFM_TOOLCHAIN_FILE})