Tools: Support for dual-model Test Secure Partitions

A TF-M regression test Partition may support both the SFN and IPC model.
The actual model being used follows the SPM backend enabled.
This is quite useful if a Secure Partition is required in testing both
the IPC and SFN backend.

This patch adds this support by allowing Secure Partitions to set
the "model" attribute to "dual".
Then the manifest tool changes it to the corresponding values according
to the selected backend.

Change-Id: I56225b10d3f2384a99e19be3fefaa0e52685a8b0
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/tools/tfm_parse_manifest_list.py b/tools/tfm_parse_manifest_list.py
index bc8877e..fe0da57 100644
--- a/tools/tfm_parse_manifest_list.py
+++ b/tools/tfm_parse_manifest_list.py
@@ -259,7 +259,12 @@
         manifest_path = os.path.join(manifest_item['list_path'], manifest_path).replace('\\', '/')
 
         with open(manifest_path) as manifest_file:
-            manifest = manifest_validation(yaml.safe_load(manifest_file), pid)
+            manifest = yaml.safe_load(manifest_file)
+            if manifest.get('model', None) == 'dual':
+                # If a Partition supports both models, it can set the "model" to "backend".
+                # The actual model used follows the backend being used.
+                manifest['model'] = backend
+            manifest = manifest_validation(manifest, pid)
 
         if pid == None or pid >= TFM_PID_BASE:
             # Count the number of IPC/SFN partitions