Support for combine tests archive
diff --git a/api-tests/dev_apis/crypto/test_c001/test_c001.h b/api-tests/dev_apis/crypto/test_c001/test_c001.h
index 028755f..e23ee76 100644
--- a/api-tests/dev_apis/crypto/test_c001/test_c001.h
+++ b/api-tests/dev_apis/crypto/test_c001/test_c001.h
@@ -17,14 +17,12 @@
 #ifndef _TEST_C001_CLIENT_TESTS_H_
 #define _TEST_C001_CLIENT_TESTS_H_
 
-#ifdef NONSECURE_TEST_BUILD
-#include "val.h"
-#else
-#include "val/common/val_client_defs.h"
-#endif
-
 #include "val_crypto.h"
 
+#define test_entry CONCAT(test_entry_,c001)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
+
 #define  GENERATE_SIZE               32
 
 extern val_api_t *val;
diff --git a/api-tests/dev_apis/crypto/test_c002/test_c002.h b/api-tests/dev_apis/crypto/test_c002/test_c002.h
index 1cc089e..5411e27 100644
--- a/api-tests/dev_apis/crypto/test_c002/test_c002.h
+++ b/api-tests/dev_apis/crypto/test_c002/test_c002.h
@@ -17,14 +17,12 @@
 #ifndef _TEST_C002_CLIENT_TESTS_H_
 #define _TEST_C002_CLIENT_TESTS_H_
 
-#ifdef NONSECURE_TEST_BUILD
-#include "val.h"
-#else
-#include "val/common/val_client_defs.h"
-#endif
-
 #include "val_crypto.h"
 
+#define test_entry CONCAT(test_entry_,c002)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
+
 extern val_api_t *val;
 extern psa_api_t *psa;
 extern client_test_t test_c002_crypto_list[];
diff --git a/api-tests/dev_apis/crypto/test_c003/test_c003.h b/api-tests/dev_apis/crypto/test_c003/test_c003.h
index 0f81b55..3ff620e 100644
--- a/api-tests/dev_apis/crypto/test_c003/test_c003.h
+++ b/api-tests/dev_apis/crypto/test_c003/test_c003.h
@@ -17,14 +17,12 @@
 #ifndef _TEST_C003_CLIENT_TESTS_H_
 #define _TEST_C003_CLIENT_TESTS_H_
 
-#ifdef NONSECURE_TEST_BUILD
-#include "val.h"
-#else
-#include "val/common/val_client_defs.h"
-#endif
-
 #include "val_crypto.h"
 
+#define test_entry CONCAT(test_entry_,c003)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
+
 extern val_api_t *val;
 extern psa_api_t *psa;
 extern client_test_t test_c003_crypto_list[];
diff --git a/api-tests/dev_apis/crypto/test_c004/test_c004.h b/api-tests/dev_apis/crypto/test_c004/test_c004.h
index b355d33..c74d436 100644
--- a/api-tests/dev_apis/crypto/test_c004/test_c004.h
+++ b/api-tests/dev_apis/crypto/test_c004/test_c004.h
@@ -17,14 +17,12 @@
 #ifndef _TEST_C004_CLIENT_TESTS_H_
 #define _TEST_C004_CLIENT_TESTS_H_
 
-#ifdef NONSECURE_TEST_BUILD
-#include "val.h"
-#else
-#include "val/common/val_client_defs.h"
-#endif
-
 #include "val_crypto.h"
 
+#define test_entry CONCAT(test_entry_,c004)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
+
 extern val_api_t *val;
 extern psa_api_t *psa;
 extern client_test_t test_c004_crypto_list[];
diff --git a/api-tests/dev_apis/crypto/test_c005/test_c005.h b/api-tests/dev_apis/crypto/test_c005/test_c005.h
index 9a18031..f5a508b 100644
--- a/api-tests/dev_apis/crypto/test_c005/test_c005.h
+++ b/api-tests/dev_apis/crypto/test_c005/test_c005.h
@@ -17,14 +17,12 @@
 #ifndef _TEST_C005_CLIENT_TESTS_H_
 #define _TEST_C005_CLIENT_TESTS_H_
 
-#ifdef NONSECURE_TEST_BUILD
-#include "val.h"
-#else
-#include "val/common/val_client_defs.h"
-#endif
-
 #include "val_crypto.h"
 
+#define test_entry CONCAT(test_entry_,c005)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
+
 extern val_api_t *val;
 extern psa_api_t *psa;
 extern client_test_t test_c005_crypto_list[];
diff --git a/api-tests/dev_apis/crypto/test_c006/test_c006.h b/api-tests/dev_apis/crypto/test_c006/test_c006.h
index ba8b2b7..0e7a1e1 100644
--- a/api-tests/dev_apis/crypto/test_c006/test_c006.h
+++ b/api-tests/dev_apis/crypto/test_c006/test_c006.h
@@ -17,14 +17,12 @@
 #ifndef _TEST_C006_CLIENT_TESTS_H_
 #define _TEST_C006_CLIENT_TESTS_H_
 
-#ifdef NONSECURE_TEST_BUILD
-#include "val.h"
-#else
-#include "val/common/val_client_defs.h"
-#endif
-
 #include "val_crypto.h"
 
+#define test_entry CONCAT(test_entry_,c006)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
+
 extern val_api_t *val;
 extern psa_api_t *psa;
 extern client_test_t test_c006_crypto_list[];
diff --git a/api-tests/dev_apis/crypto/test_c007/test_c007.h b/api-tests/dev_apis/crypto/test_c007/test_c007.h
index 93f5e39..0201852 100644
--- a/api-tests/dev_apis/crypto/test_c007/test_c007.h
+++ b/api-tests/dev_apis/crypto/test_c007/test_c007.h
@@ -17,14 +17,12 @@
 #ifndef _TEST_C007_CLIENT_TESTS_H_
 #define _TEST_C007_CLIENT_TESTS_H_
 
-#ifdef NONSECURE_TEST_BUILD
-#include "val.h"
-#else
-#include "val/common/val_client_defs.h"
-#endif
-
 #include "val_crypto.h"
 
+#define test_entry CONCAT(test_entry_,c007)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
+
 extern val_api_t *val;
 extern psa_api_t *psa;
 extern client_test_t test_c007_crypto_list[];
diff --git a/api-tests/dev_apis/crypto/test_c008/test_c008.h b/api-tests/dev_apis/crypto/test_c008/test_c008.h
index 8a6c12e..b60cdfd 100644
--- a/api-tests/dev_apis/crypto/test_c008/test_c008.h
+++ b/api-tests/dev_apis/crypto/test_c008/test_c008.h
@@ -17,14 +17,12 @@
 #ifndef _TEST_C008_CLIENT_TESTS_H_
 #define _TEST_C008_CLIENT_TESTS_H_
 
-#ifdef NONSECURE_TEST_BUILD
-#include "val.h"
-#else
-#include "val/common/val_client_defs.h"
-#endif
-
 #include "val_crypto.h"
 
+#define test_entry CONCAT(test_entry_,c008)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
+
 extern val_api_t *val;
 extern psa_api_t *psa;
 extern client_test_t test_c008_crypto_list[];
diff --git a/api-tests/dev_apis/crypto/test_c009/test_c009.h b/api-tests/dev_apis/crypto/test_c009/test_c009.h
index e0a4c25..156282c 100644
--- a/api-tests/dev_apis/crypto/test_c009/test_c009.h
+++ b/api-tests/dev_apis/crypto/test_c009/test_c009.h
@@ -17,14 +17,12 @@
 #ifndef _TEST_C009_CLIENT_TESTS_H_
 #define _TEST_C009_CLIENT_TESTS_H_
 
-#ifdef NONSECURE_TEST_BUILD
-#include "val.h"
-#else
-#include "val/common/val_client_defs.h"
-#endif
-
 #include "val_crypto.h"
 
+#define test_entry CONCAT(test_entry_,c009)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
+
 extern val_api_t *val;
 extern psa_api_t *psa;
 extern client_test_t test_c009_crypto_list[];
diff --git a/api-tests/dev_apis/crypto/test_c010/test_c010.h b/api-tests/dev_apis/crypto/test_c010/test_c010.h
index df1e4f7..370bbcc 100644
--- a/api-tests/dev_apis/crypto/test_c010/test_c010.h
+++ b/api-tests/dev_apis/crypto/test_c010/test_c010.h
@@ -17,14 +17,12 @@
 #ifndef _TEST_C010_CLIENT_TESTS_H_
 #define _TEST_C010_CLIENT_TESTS_H_
 
-#ifdef NONSECURE_TEST_BUILD
-#include "val.h"
-#else
-#include "val/common/val_client_defs.h"
-#endif
-
 #include "val_crypto.h"
 
+#define test_entry CONCAT(test_entry_,c010)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
+
 extern val_api_t *val;
 extern psa_api_t *psa;
 extern client_test_t test_c010_crypto_list[];
diff --git a/api-tests/dev_apis/crypto/test_c011/test_c011.h b/api-tests/dev_apis/crypto/test_c011/test_c011.h
index e78b46d..f14b239 100644
--- a/api-tests/dev_apis/crypto/test_c011/test_c011.h
+++ b/api-tests/dev_apis/crypto/test_c011/test_c011.h
@@ -17,14 +17,12 @@
 #ifndef _TEST_C011_CLIENT_TESTS_H_
 #define _TEST_C011_CLIENT_TESTS_H_
 
-#ifdef NONSECURE_TEST_BUILD
-#include "val.h"
-#else
-#include "val/common/val_client_defs.h"
-#endif
-
 #include "val_crypto.h"
 
+#define test_entry CONCAT(test_entry_,c011)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
+
 extern val_api_t *val;
 extern psa_api_t *psa;
 extern client_test_t test_c011_crypto_list[];
diff --git a/api-tests/dev_apis/crypto/test_c012/test_c012.h b/api-tests/dev_apis/crypto/test_c012/test_c012.h
index c4aea18..196608e 100644
--- a/api-tests/dev_apis/crypto/test_c012/test_c012.h
+++ b/api-tests/dev_apis/crypto/test_c012/test_c012.h
@@ -17,14 +17,12 @@
 #ifndef _TEST_C012_CLIENT_TESTS_H_
 #define _TEST_C012_CLIENT_TESTS_H_
 
-#ifdef NONSECURE_TEST_BUILD
-#include "val.h"
-#else
-#include "val/common/val_client_defs.h"
-#endif
-
 #include "val_crypto.h"
 
+#define test_entry CONCAT(test_entry_,c012)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
+
 extern val_api_t *val;
 extern psa_api_t *psa;
 extern client_test_t test_c012_crypto_list[];
diff --git a/api-tests/dev_apis/crypto/test_c013/test_c013.h b/api-tests/dev_apis/crypto/test_c013/test_c013.h
index 60a16ee..9708ec7 100644
--- a/api-tests/dev_apis/crypto/test_c013/test_c013.h
+++ b/api-tests/dev_apis/crypto/test_c013/test_c013.h
@@ -17,14 +17,12 @@
 #ifndef _TEST_C013_CLIENT_TESTS_H_
 #define _TEST_C013_CLIENT_TESTS_H_
 
-#ifdef NONSECURE_TEST_BUILD
-#include "val.h"
-#else
-#include "val/common/val_client_defs.h"
-#endif
-
 #include "val_crypto.h"
 
+#define test_entry CONCAT(test_entry_,c013)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
+
 extern val_api_t *val;
 extern psa_api_t *psa;
 extern client_test_t test_c013_crypto_list[];
diff --git a/api-tests/dev_apis/crypto/test_c014/test_c014.h b/api-tests/dev_apis/crypto/test_c014/test_c014.h
index 4f0d26a..d3ee93f 100644
--- a/api-tests/dev_apis/crypto/test_c014/test_c014.h
+++ b/api-tests/dev_apis/crypto/test_c014/test_c014.h
@@ -17,14 +17,12 @@
 #ifndef _TEST_C014_CLIENT_TESTS_H_
 #define _TEST_C014_CLIENT_TESTS_H_
 
-#ifdef NONSECURE_TEST_BUILD
-#include "val.h"
-#else
-#include "val/common/val_client_defs.h"
-#endif
-
 #include "val_crypto.h"
 
+#define test_entry CONCAT(test_entry_,c014)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
+
 extern val_api_t *val;
 extern psa_api_t *psa;
 extern client_test_t test_c014_crypto_list[];
diff --git a/api-tests/dev_apis/crypto/test_c015/test_c015.h b/api-tests/dev_apis/crypto/test_c015/test_c015.h
index ec3574d..32f7a1e 100644
--- a/api-tests/dev_apis/crypto/test_c015/test_c015.h
+++ b/api-tests/dev_apis/crypto/test_c015/test_c015.h
@@ -17,14 +17,12 @@
 #ifndef _TEST_C015_CLIENT_TESTS_H_
 #define _TEST_C015_CLIENT_TESTS_H_
 
-#ifdef NONSECURE_TEST_BUILD
-#include "val.h"
-#else
-#include "val/common/val_client_defs.h"
-#endif
-
 #include "val_crypto.h"
 
+#define test_entry CONCAT(test_entry_,c015)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
+
 extern val_api_t *val;
 extern psa_api_t *psa;
 extern client_test_t test_c015_crypto_list[];
diff --git a/api-tests/ff/ipc/test_i001/test_i001.h b/api-tests/ff/ipc/test_i001/test_i001.h
index 967f66e..033f194 100644
--- a/api-tests/ff/ipc/test_i001/test_i001.h
+++ b/api-tests/ff/ipc/test_i001/test_i001.h
@@ -17,10 +17,15 @@
 #ifndef _TEST001_CLIENT_TESTS_H_
 #define _TEST001_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i001)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i002/test_i002.h b/api-tests/ff/ipc/test_i002/test_i002.h
index 0b86b4f..d61fc1c 100644
--- a/api-tests/ff/ipc/test_i002/test_i002.h
+++ b/api-tests/ff/ipc/test_i002/test_i002.h
@@ -17,10 +17,15 @@
 #ifndef _TEST002_CLIENT_TESTS_H_
 #define _TEST002_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i002)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 #define CONNECT_LIMIT 20
diff --git a/api-tests/ff/ipc/test_i003/test_i003.h b/api-tests/ff/ipc/test_i003/test_i003.h
index 4c07808..88db8ec 100644
--- a/api-tests/ff/ipc/test_i003/test_i003.h
+++ b/api-tests/ff/ipc/test_i003/test_i003.h
@@ -17,10 +17,15 @@
 #ifndef _TEST003_CLIENT_TESTS_H_
 #define _TEST003_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i003)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i004/test_i004.h b/api-tests/ff/ipc/test_i004/test_i004.h
index 80d0456..02456a4 100644
--- a/api-tests/ff/ipc/test_i004/test_i004.h
+++ b/api-tests/ff/ipc/test_i004/test_i004.h
@@ -17,10 +17,15 @@
 #ifndef _TEST004_CLIENT_TESTS_H_
 #define _TEST004_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i004)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i005/test_i005.h b/api-tests/ff/ipc/test_i005/test_i005.h
index c9d1353..15128bd 100644
--- a/api-tests/ff/ipc/test_i005/test_i005.h
+++ b/api-tests/ff/ipc/test_i005/test_i005.h
@@ -17,10 +17,15 @@
 #ifndef _TEST005_CLIENT_TESTS_H_
 #define _TEST005_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i005)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i006/test_i006.h b/api-tests/ff/ipc/test_i006/test_i006.h
index 2d0ed6d..3f3878e 100644
--- a/api-tests/ff/ipc/test_i006/test_i006.h
+++ b/api-tests/ff/ipc/test_i006/test_i006.h
@@ -17,10 +17,15 @@
 #ifndef _TEST006_CLIENT_TESTS_H_
 #define _TEST006_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i006)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i007/test_i007.h b/api-tests/ff/ipc/test_i007/test_i007.h
index 0f2c691..d4b93a8 100644
--- a/api-tests/ff/ipc/test_i007/test_i007.h
+++ b/api-tests/ff/ipc/test_i007/test_i007.h
@@ -17,10 +17,15 @@
 #ifndef _TEST007_CLIENT_TESTS_H_
 #define _TEST007_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i007)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i008/test_i008.h b/api-tests/ff/ipc/test_i008/test_i008.h
index 7eb7737..147a843 100644
--- a/api-tests/ff/ipc/test_i008/test_i008.h
+++ b/api-tests/ff/ipc/test_i008/test_i008.h
@@ -17,10 +17,15 @@
 #ifndef _TEST008_CLIENT_TESTS_H_
 #define _TEST008_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i008)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i009/test_i009.h b/api-tests/ff/ipc/test_i009/test_i009.h
index 85f7396..8cc4e5c 100644
--- a/api-tests/ff/ipc/test_i009/test_i009.h
+++ b/api-tests/ff/ipc/test_i009/test_i009.h
@@ -17,10 +17,15 @@
 #ifndef _TEST009_CLIENT_TESTS_H_
 #define _TEST009_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i009)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i010/test_i010.h b/api-tests/ff/ipc/test_i010/test_i010.h
index 89aaa91..83eab5d 100644
--- a/api-tests/ff/ipc/test_i010/test_i010.h
+++ b/api-tests/ff/ipc/test_i010/test_i010.h
@@ -17,10 +17,15 @@
 #ifndef _TEST010_CLIENT_TESTS_H_
 #define _TEST010_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i010)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i011/test_i011.h b/api-tests/ff/ipc/test_i011/test_i011.h
index b3ef30f..ee36c1d 100644
--- a/api-tests/ff/ipc/test_i011/test_i011.h
+++ b/api-tests/ff/ipc/test_i011/test_i011.h
@@ -17,10 +17,15 @@
 #ifndef _TEST011_CLIENT_TESTS_H_
 #define _TEST011_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i011)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i012/test_i012.h b/api-tests/ff/ipc/test_i012/test_i012.h
index b1f93f5..79f7f11 100644
--- a/api-tests/ff/ipc/test_i012/test_i012.h
+++ b/api-tests/ff/ipc/test_i012/test_i012.h
@@ -17,10 +17,15 @@
 #ifndef _TEST012_CLIENT_TESTS_H_
 #define _TEST012_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i012)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i013/test_i013.h b/api-tests/ff/ipc/test_i013/test_i013.h
index 54ddf79..ad08224 100644
--- a/api-tests/ff/ipc/test_i013/test_i013.h
+++ b/api-tests/ff/ipc/test_i013/test_i013.h
@@ -17,10 +17,15 @@
 #ifndef _TEST013_CLIENT_TESTS_H_
 #define _TEST013_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i013)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i014/test_i014.h b/api-tests/ff/ipc/test_i014/test_i014.h
index 13faa48..3d1060d 100644
--- a/api-tests/ff/ipc/test_i014/test_i014.h
+++ b/api-tests/ff/ipc/test_i014/test_i014.h
@@ -17,10 +17,15 @@
 #ifndef _TEST014_CLIENT_TESTS_H_
 #define _TEST014_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i014)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i015/test_i015.h b/api-tests/ff/ipc/test_i015/test_i015.h
index 9512bea..1fd23b2 100644
--- a/api-tests/ff/ipc/test_i015/test_i015.h
+++ b/api-tests/ff/ipc/test_i015/test_i015.h
@@ -17,10 +17,15 @@
 #ifndef _TEST015_CLIENT_TESTS_H_
 #define _TEST015_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i015)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i016/test_i016.h b/api-tests/ff/ipc/test_i016/test_i016.h
index f5d9d2b..4266d47 100644
--- a/api-tests/ff/ipc/test_i016/test_i016.h
+++ b/api-tests/ff/ipc/test_i016/test_i016.h
@@ -17,10 +17,15 @@
 #ifndef _TEST015_CLIENT_TESTS_H_
 #define _TEST015_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i016)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i017/test_i017.h b/api-tests/ff/ipc/test_i017/test_i017.h
index 3ad60d0..f7801da 100644
--- a/api-tests/ff/ipc/test_i017/test_i017.h
+++ b/api-tests/ff/ipc/test_i017/test_i017.h
@@ -17,10 +17,15 @@
 #ifndef _TEST017_CLIENT_TESTS_H_
 #define _TEST017_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i017)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i018/test_i018.h b/api-tests/ff/ipc/test_i018/test_i018.h
index 0ad2487..7708629 100644
--- a/api-tests/ff/ipc/test_i018/test_i018.h
+++ b/api-tests/ff/ipc/test_i018/test_i018.h
@@ -17,10 +17,15 @@
 #ifndef _TEST018_CLIENT_TESTS_H_
 #define _TEST018_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i018)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i019/test_i019.h b/api-tests/ff/ipc/test_i019/test_i019.h
index ea11995..0e1ff73 100644
--- a/api-tests/ff/ipc/test_i019/test_i019.h
+++ b/api-tests/ff/ipc/test_i019/test_i019.h
@@ -17,10 +17,15 @@
 #ifndef _TEST019_CLIENT_TESTS_H_
 #define _TEST019_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i019)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i020/test_i020.h b/api-tests/ff/ipc/test_i020/test_i020.h
index 74c3085..77b4413 100644
--- a/api-tests/ff/ipc/test_i020/test_i020.h
+++ b/api-tests/ff/ipc/test_i020/test_i020.h
@@ -17,10 +17,15 @@
 #ifndef _TEST020_CLIENT_TESTS_H_
 #define _TEST020_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i020)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i021/test_i021.h b/api-tests/ff/ipc/test_i021/test_i021.h
index d94bf79..1d03367 100644
--- a/api-tests/ff/ipc/test_i021/test_i021.h
+++ b/api-tests/ff/ipc/test_i021/test_i021.h
@@ -17,10 +17,15 @@
 #ifndef _TEST021_CLIENT_TESTS_H_
 #define _TEST021_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i021)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i022/test_i022.h b/api-tests/ff/ipc/test_i022/test_i022.h
index 5506613..b5928a9 100644
--- a/api-tests/ff/ipc/test_i022/test_i022.h
+++ b/api-tests/ff/ipc/test_i022/test_i022.h
@@ -17,10 +17,15 @@
 #ifndef _TEST022_CLIENT_TESTS_H_
 #define _TEST022_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i022)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i023/test_i023.h b/api-tests/ff/ipc/test_i023/test_i023.h
index 8d065f0..812379f 100644
--- a/api-tests/ff/ipc/test_i023/test_i023.h
+++ b/api-tests/ff/ipc/test_i023/test_i023.h
@@ -17,10 +17,15 @@
 #ifndef _TEST023_CLIENT_TESTS_H_
 #define _TEST023_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i023)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i024/test_i024.h b/api-tests/ff/ipc/test_i024/test_i024.h
index 1d38d68..3181afa 100644
--- a/api-tests/ff/ipc/test_i024/test_i024.h
+++ b/api-tests/ff/ipc/test_i024/test_i024.h
@@ -17,10 +17,15 @@
 #ifndef _TEST024_CLIENT_TESTS_H_
 #define _TEST024_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i024)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i025/test_i025.h b/api-tests/ff/ipc/test_i025/test_i025.h
index 3b871e8..cd368be 100644
--- a/api-tests/ff/ipc/test_i025/test_i025.h
+++ b/api-tests/ff/ipc/test_i025/test_i025.h
@@ -17,10 +17,15 @@
 #ifndef _TEST025_CLIENT_TESTS_H_
 #define _TEST025_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i025)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i026/test_i026.h b/api-tests/ff/ipc/test_i026/test_i026.h
index 34c81c8..94e0a88 100644
--- a/api-tests/ff/ipc/test_i026/test_i026.h
+++ b/api-tests/ff/ipc/test_i026/test_i026.h
@@ -17,10 +17,15 @@
 #ifndef _TEST026_CLIENT_TESTS_H_
 #define _TEST026_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i026)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 /* Redefining PSA_MAX_IOVEC as it is undefined for client */
diff --git a/api-tests/ff/ipc/test_i027/test_i027.h b/api-tests/ff/ipc/test_i027/test_i027.h
index c32bc9f..0e87465 100644
--- a/api-tests/ff/ipc/test_i027/test_i027.h
+++ b/api-tests/ff/ipc/test_i027/test_i027.h
@@ -17,10 +17,15 @@
 #ifndef _TEST027_CLIENT_TESTS_H_
 #define _TEST027_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i027)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i028/test_i028.h b/api-tests/ff/ipc/test_i028/test_i028.h
index de8dcb5..d8adfe9 100644
--- a/api-tests/ff/ipc/test_i028/test_i028.h
+++ b/api-tests/ff/ipc/test_i028/test_i028.h
@@ -17,10 +17,15 @@
 #ifndef _TEST028_CLIENT_TESTS_H_
 #define _TEST028_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i028)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i029/test_i029.h b/api-tests/ff/ipc/test_i029/test_i029.h
index a463189..01cc7bf 100644
--- a/api-tests/ff/ipc/test_i029/test_i029.h
+++ b/api-tests/ff/ipc/test_i029/test_i029.h
@@ -17,10 +17,15 @@
 #ifndef _TEST029_CLIENT_TESTS_H_
 #define _TEST029_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i029)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i030/test_i030.h b/api-tests/ff/ipc/test_i030/test_i030.h
index b06d100..641195b 100644
--- a/api-tests/ff/ipc/test_i030/test_i030.h
+++ b/api-tests/ff/ipc/test_i030/test_i030.h
@@ -17,10 +17,15 @@
 #ifndef _TEST030_CLIENT_TESTS_H_
 #define _TEST030_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i030)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i031/test_i031.h b/api-tests/ff/ipc/test_i031/test_i031.h
index 1ba26dd..632288d 100644
--- a/api-tests/ff/ipc/test_i031/test_i031.h
+++ b/api-tests/ff/ipc/test_i031/test_i031.h
@@ -17,10 +17,15 @@
 #ifndef _TEST031_CLIENT_TESTS_H_
 #define _TEST031_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i031)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i032/test_i032.h b/api-tests/ff/ipc/test_i032/test_i032.h
index f82a29d..474ceee 100644
--- a/api-tests/ff/ipc/test_i032/test_i032.h
+++ b/api-tests/ff/ipc/test_i032/test_i032.h
@@ -17,10 +17,15 @@
 #ifndef _TEST032_CLIENT_TESTS_H_
 #define _TEST032_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i032)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i033/test_i033.h b/api-tests/ff/ipc/test_i033/test_i033.h
index 856d577..a0ea1e8 100644
--- a/api-tests/ff/ipc/test_i033/test_i033.h
+++ b/api-tests/ff/ipc/test_i033/test_i033.h
@@ -17,10 +17,15 @@
 #ifndef _TEST033_CLIENT_TESTS_H_
 #define _TEST033_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i033)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i034/test_i034.h b/api-tests/ff/ipc/test_i034/test_i034.h
index bc119be..837288d 100644
--- a/api-tests/ff/ipc/test_i034/test_i034.h
+++ b/api-tests/ff/ipc/test_i034/test_i034.h
@@ -17,10 +17,15 @@
 #ifndef _TEST034_CLIENT_TESTS_H_
 #define _TEST034_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i034)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i035/test_i035.h b/api-tests/ff/ipc/test_i035/test_i035.h
index dca0f6d..af771cf 100644
--- a/api-tests/ff/ipc/test_i035/test_i035.h
+++ b/api-tests/ff/ipc/test_i035/test_i035.h
@@ -17,10 +17,15 @@
 #ifndef _TEST035_CLIENT_TESTS_H_
 #define _TEST035_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i035)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i036/test_i036.h b/api-tests/ff/ipc/test_i036/test_i036.h
index 84fa920..9b4ef64 100644
--- a/api-tests/ff/ipc/test_i036/test_i036.h
+++ b/api-tests/ff/ipc/test_i036/test_i036.h
@@ -17,10 +17,15 @@
 #ifndef _TEST036_CLIENT_TESTS_H_
 #define _TEST036_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i036)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i037/test_i037.h b/api-tests/ff/ipc/test_i037/test_i037.h
index a9ba9ef..0ced907 100644
--- a/api-tests/ff/ipc/test_i037/test_i037.h
+++ b/api-tests/ff/ipc/test_i037/test_i037.h
@@ -17,10 +17,15 @@
 #ifndef _TEST037_CLIENT_TESTS_H_
 #define _TEST037_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i037)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i038/test_i038.h b/api-tests/ff/ipc/test_i038/test_i038.h
index 8db4d4e..a8b99e3 100644
--- a/api-tests/ff/ipc/test_i038/test_i038.h
+++ b/api-tests/ff/ipc/test_i038/test_i038.h
@@ -17,10 +17,15 @@
 #ifndef _TEST038_CLIENT_TESTS_H_
 #define _TEST038_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i038)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i039/test_i039.h b/api-tests/ff/ipc/test_i039/test_i039.h
index 3699249..5a87b2e 100644
--- a/api-tests/ff/ipc/test_i039/test_i039.h
+++ b/api-tests/ff/ipc/test_i039/test_i039.h
@@ -17,10 +17,15 @@
 #ifndef _TEST039_CLIENT_TESTS_H_
 #define _TEST039_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i039)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i040/test_i040.h b/api-tests/ff/ipc/test_i040/test_i040.h
index 610bbf4..2e472ac 100644
--- a/api-tests/ff/ipc/test_i040/test_i040.h
+++ b/api-tests/ff/ipc/test_i040/test_i040.h
@@ -17,10 +17,15 @@
 #ifndef _TEST040_CLIENT_TESTS_H_
 #define _TEST040_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i040)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i041/test_i041.h b/api-tests/ff/ipc/test_i041/test_i041.h
index 677585f..7ae2384 100644
--- a/api-tests/ff/ipc/test_i041/test_i041.h
+++ b/api-tests/ff/ipc/test_i041/test_i041.h
@@ -17,10 +17,15 @@
 #ifndef _TEST041_CLIENT_TESTS_H_
 #define _TEST041_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i041)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i042/test_i042.h b/api-tests/ff/ipc/test_i042/test_i042.h
index 86de5d5..697434a 100644
--- a/api-tests/ff/ipc/test_i042/test_i042.h
+++ b/api-tests/ff/ipc/test_i042/test_i042.h
@@ -17,10 +17,15 @@
 #ifndef _TEST042_CLIENT_TESTS_H_
 #define _TEST042_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i042)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i043/test_i043.h b/api-tests/ff/ipc/test_i043/test_i043.h
index 74d19e1..d58b906 100644
--- a/api-tests/ff/ipc/test_i043/test_i043.h
+++ b/api-tests/ff/ipc/test_i043/test_i043.h
@@ -17,10 +17,15 @@
 #ifndef _TEST043_CLIENT_TESTS_H_
 #define _TEST043_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i043)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i044/test_i044.h b/api-tests/ff/ipc/test_i044/test_i044.h
index 428350b..1facf14 100644
--- a/api-tests/ff/ipc/test_i044/test_i044.h
+++ b/api-tests/ff/ipc/test_i044/test_i044.h
@@ -17,10 +17,15 @@
 #ifndef _TEST044_CLIENT_TESTS_H_
 #define _TEST044_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i044)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i045/test_i045.h b/api-tests/ff/ipc/test_i045/test_i045.h
index 19e3599..809721c 100644
--- a/api-tests/ff/ipc/test_i045/test_i045.h
+++ b/api-tests/ff/ipc/test_i045/test_i045.h
@@ -17,10 +17,15 @@
 #ifndef _TEST045_CLIENT_TESTS_H_
 #define _TEST045_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i045)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i046/test_i046.h b/api-tests/ff/ipc/test_i046/test_i046.h
index ae77109..4646137 100644
--- a/api-tests/ff/ipc/test_i046/test_i046.h
+++ b/api-tests/ff/ipc/test_i046/test_i046.h
@@ -17,10 +17,15 @@
 #ifndef _TEST046_CLIENT_TESTS_H_
 #define _TEST046_CLIENT_TESTS_H_
 
+#include "val_client_defs.h"
+
 #ifdef NONSECURE_TEST_BUILD
-#include "val.h"
+#define test_entry CONCAT(test_entry_,i046)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
 #else
-#include "val/common/val_client_defs.h"
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
 #endif
 
 extern val_api_t *val;
diff --git a/api-tests/ff/partition/ipc/client_partition.c b/api-tests/ff/partition/ipc/client_partition.c
index c483b32..fe9c9d5 100644
--- a/api-tests/ff/partition/ipc/client_partition.c
+++ b/api-tests/ff/partition/ipc/client_partition.c
@@ -16,8 +16,8 @@
 **/
 
 #include "client_partition.h"
-val_api_t *val = &val_api;
-psa_api_t *psa = &psa_api;
+val_api_t *val_client_sp = &val_api;
+psa_api_t *psa_client_sp = &psa_api;
 
 void client_main(void)
 {
diff --git a/api-tests/tools/makefiles/Makefile b/api-tests/tools/makefiles/Makefile
index bf5a4a9..9aaa1e6 100644
--- a/api-tests/tools/makefiles/Makefile
+++ b/api-tests/tools/makefiles/Makefile
@@ -26,7 +26,7 @@
 include $(SOURCE)/tools/makefiles/toolchain.mk
 
 
-all: clean target_cfg gen_linker build
+all: clean target_cfg gen_linker process_testsuite.db build
 
 #Generate target files from User provided data base
 target_cfg:
@@ -36,9 +36,13 @@
 
 #Read target.cfg and update the addresses in linker script
 gen_linker:
-	mkdir -p $(SUITE_OUT)/;
+	mkdir -p $(SUITE_OUT)/ $(BUILD)/val/ $(BUILD)/partition/ ;
 	perl $(SOURCE)/tools/scripts/process_test_linker_file.pl $(SOURCE) $(SUITE_OUT) ${TARGET} $(TOOLCHAIN)
 
+process_testsuite.db:
+	$(eval TEST_LIST := $(shell grep "^test" $(SUITE_IN)/testsuite.db > $(SUITE_OUT)/.testlist.txt ; cat $(SUITE_OUT)/.testlist.txt))
+	perl $(SOURCE)/tools/scripts/gen_tests_list.pl $(BUILD) $(SUITE_OUT)/.testlist.txt $(SUITE)
+
 
 #Build framework archives and test_combine.elf
 build:  build_pal val_nspe.a test_combine.elf partition_build output_list
@@ -58,12 +62,11 @@
 test_combine.elf: test.elf
 	perl $(SOURCE)/tools/scripts/test_elf_combine.pl $(SUITE_OUT)/.testlist.txt
 	hexdump -v -e ' 1/4 "%08X" "\n"' $(SUITE_OUT)/test_elf_combine.bin > $(SUITE_OUT)/test_elf_combine.hex
+	$(AR) $(AR_OPTIONS) $(SUITE_OUT)/test_combine.a $(SUITE_OUT)/test*/test_*_nspe.o
 
 test.elf:
 	@echo  ""
 	@echo  "----------test build start-------------"
-	@mkdir -p $(SUITE_OUT)/
-	@$(eval TEST_LIST := $(shell grep "^test" $(SUITE_IN)/testsuite.db > $(SUITE_OUT)/.testlist.txt ; cat $(SUITE_OUT)/.testlist.txt))
 	@$(foreach TEST,$(TEST_LIST), make -f $(SOURCE)/tools/makefiles/testbuild.mk  TEST=$(TEST) ;)
 	@echo  "----------test build complete-------------"
 
@@ -83,7 +86,11 @@
 	@echo  "a) NSPE files:"
 	@echo  " $(BUILD)/val/val_nspe.a"
 	@echo  " $(BUILD)/platform/pal_nspe.a"
+ifeq (${TEST_COMBINE_ARCHIVE}, 1)
+	@echo  " $(SUITE_OUT)/test_combine.a"
+else
 	@echo  " $(SUITE_OUT)/test_elf_combine.bin"
+endif
 	@echo  ""
 ifeq (${SUITE}, ipc)
 	@echo  "b) SPE files"
diff --git a/api-tests/tools/makefiles/linker/test.linker b/api-tests/tools/makefiles/linker/test.linker
index e1688ae..cc8f552 100644
--- a/api-tests/tools/makefiles/linker/test.linker
+++ b/api-tests/tools/makefiles/linker/test.linker
@@ -14,7 +14,7 @@
  * limitations under the License.
 **/
 
-ENTRY(acs_test_info)
+ENTRY(TEST_START)
 
 TEST_START = 0x2004F000;
 
diff --git a/api-tests/tools/makefiles/spbuild.mk b/api-tests/tools/makefiles/spbuild.mk
index cffcf1d..e84fd47 100644
--- a/api-tests/tools/makefiles/spbuild.mk
+++ b/api-tests/tools/makefiles/spbuild.mk
@@ -36,7 +36,7 @@
 
 ifeq (${SUITE}, ipc)
 CC_SOURCE += client_partition.c server_partition.c
-all:  mkdir gen_secure_tests_list compile_c compile_asm driver_partition.a client_partition.a server_partition.a
+all:  mkdir compile_c compile_asm driver_partition.a client_partition.a server_partition.a
 else
 all:  mkdir compile_c compile_asm driver_partition.a
 endif
@@ -45,9 +45,6 @@
 mkdir:
 	@mkdir -p $(BUILD)/partition/
 
-gen_secure_tests_list:
-	@perl $(SOURCE)/tools/scripts/gen_secure_tests_list.pl $(BUILD) $(SUITE_OUT)/.testlist.txt
-
 compile_c: $(CC_SOURCE:%.c=$(BUILD)/partition/%.o)
 compile_asm: $(AS_SOURCE:%.s=$(BUILD)/partition/%.o)
 
diff --git a/api-tests/tools/makefiles/testbuild.mk b/api-tests/tools/makefiles/testbuild.mk
index 712695a..7b9cceb 100644
--- a/api-tests/tools/makefiles/testbuild.mk
+++ b/api-tests/tools/makefiles/testbuild.mk
@@ -24,7 +24,8 @@
          -I$(SOURCE)/platform/targets/$(TARGET)/nspe/ \
          -I$(BUILD)/platform/$(TARGET)/ \
          -I$(SUITE_IN)/$(TEST)/\
-         -I$(SUITE_IN)/include/
+         -I$(SUITE_IN)/include/ \
+         -I$(BUILD)/val/
 
 VPATH=$(SOURCE)/val/common/:\
       $(SOURCE)/val/nspe/:\
diff --git a/api-tests/tools/makefiles/toolchain.mk b/api-tests/tools/makefiles/toolchain.mk
index 2291a05..1e932eb 100644
--- a/api-tests/tools/makefiles/toolchain.mk
+++ b/api-tests/tools/makefiles/toolchain.mk
@@ -85,6 +85,10 @@
 
 COMPILER_OPTIONS += -DVERBOSE=$(VERBOSE)
 
+ifeq (${TEST_COMBINE_ARCHIVE}, 1)
+COMPILER_OPTIONS += -DTEST_COMBINE_ARCHIVE
+endif
+
 ifeq (${PSA_IPC_IMPLEMENTED}, 1)
 COMPILER_OPTIONS += -DPSA_IPC_IMPLEMENTED
 endif
diff --git a/api-tests/tools/makefiles/valbuild.mk b/api-tests/tools/makefiles/valbuild.mk
index 88938bd..79418ec 100644
--- a/api-tests/tools/makefiles/valbuild.mk
+++ b/api-tests/tools/makefiles/valbuild.mk
@@ -20,7 +20,8 @@
          -I$(SOURCE)/val/nspe/ \
          -I$(SOURCE)/val/spe/ \
          -I$(SOURCE)/platform/targets/$(TARGET)/nspe/ \
-         -I$(BUILD)/platform/$(TARGET)/
+         -I$(BUILD)/platform/$(TARGET)/ \
+         -I$(BUILD)/val/
 
 VPATH=$(SOURCE)/val/common/:\
       $(SOURCE)/val/nspe/:\
diff --git a/api-tests/tools/scripts/gen_secure_tests_list.pl b/api-tests/tools/scripts/gen_secure_tests_list.pl
deleted file mode 100644
index e8d744b..0000000
--- a/api-tests/tools/scripts/gen_secure_tests_list.pl
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env perl
-#/** @file
-# * Copyright (c) 2018, Arm Limited or its affiliates. All rights reserved.
-# * SPDX-License-Identifier : Apache-2.0
-# *
-# * Licensed under the Apache License, Version 2.0 (the "License");
-# * you may not use this file except in compliance with the License.
-# * You may obtain a copy of the License at
-# *
-# *  http://www.apache.org/licenses/LICENSE-2.0
-# *
-# * Unless required by applicable law or agreed to in writing, software
-# * distributed under the License is distributed on an "AS IS" BASIS,
-# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# * See the License for the specific language governing permissions and
-# * limitations under the License.
-#**/
-
-print "\n>>>> Generating secure tests list files by referring testsuite.db \n";
-
-$build=$ARGV[0];
-$tests_list=$ARGV[1];
-
-$client_tests_list_declare = "$build/partition/client_tests_list_declare.inc";
-$client_tests_list         = "$build/partition/client_tests_list.inc";
-$server_tests_list_declare = "$build/partition/server_tests_list_declare.inc";
-$server_tests_list         = "$build/partition/server_tests_list.inc";
-
-$test_num = 0;
-$test_num_prev = 0;
-
-open(IN, $tests_list) or die "Unable to open $tests_list $!";
-open(OUT1, '>', $client_tests_list_declare) or die "Unable to open: $!";
-open(OUT2, '>', $client_tests_list) or die "Unable to open: $!";
-open(OUT3, '>', $server_tests_list_declare) or die "Unable to open: $!";
-open(OUT4, '>', $server_tests_list) or die "Unable to open: $!";
-
-while(<IN>) {
-    if($_ !~ /^\//) {# exclude commented lines if any
-        chomp($_);
-        if($_ =~ /^test_\w(\d+)/) {
-            $test_num = $1;
-            print OUT1 " extern client_test_t $_\_client_tests_list[];\n";
-            print OUT3 " extern server_test_t $_\_server_tests_list[];\n";
-
-            if ($test_num - $test_num_prev > 1)
-            {
-                for ($i = $test_num_prev; $i < ($test_num - 1); $i++)
-                {
-                    print OUT2 "\tNULL,\n";
-                    print OUT4 "\tNULL,\n";
-                }
-            }
-            print OUT2 "\t$_\_client_tests_list,\n";
-            print OUT4 "\t$_\_server_tests_list,\n";
-        }
-    }
-    $test_num_prev = $test_num;
-}
-close IN;
-close OUT1;
-close OUT2;
-close OUT3;
-close OUT4;
-
-print "Output files are:
-$client_tests_list_declare,
-$client_tests_list,
-$server_tests_list_declare,
-$server_tests_list \n\n";
diff --git a/api-tests/tools/scripts/setup.sh b/api-tests/tools/scripts/setup.sh
index 5a0da2f..3141806 100755
--- a/api-tests/tools/scripts/setup.sh
+++ b/api-tests/tools/scripts/setup.sh
@@ -20,6 +20,7 @@
 echo ""
 
 declare -a INCLUDE_PATHS
+export TEST_COMBINE_ARCHIVE=0
 export CLIENT_FILE_FOUND=0
 export SERVICE_FILE_FOUND=0
 HELP="
@@ -92,6 +93,9 @@
        --verbose )  shift
                   export VERBOSE=$1
                   ;;
+       --archive_tests )
+                  export TEST_COMBINE_ARCHIVE=1
+                  ;;
        --include )  shift
                   export INCLUDE="$INCLUDE -I $1/"
                   INCLUDE_PATHS=("${INCLUDE_PATHS[@]}" $1)
@@ -256,6 +260,7 @@
 MAKE_OPTIONS+=" TOOLCHAIN=$TOOLCHAIN "
 MAKE_OPTIONS+=" CPU_ARCH=$CPU_ARCH "
 MAKE_OPTIONS+=" VERBOSE=$VERBOSE "
+MAKE_OPTIONS+=" TEST_COMBINE_ARCHIVE=$TEST_COMBINE_ARCHIVE "
 MAKE_OPTIONS+=" PSA_IPC_IMPLEMENTED=$PSA_IPC_IMPLEMENTED "
 MAKE_OPTIONS+=" USER_INCLUDE=\"$INCLUDE\" "
 
diff --git a/api-tests/val/common/val.h b/api-tests/val/common/val.h
index 04e67bf..de9cd8c 100644
--- a/api-tests/val/common/val.h
+++ b/api-tests/val/common/val.h
@@ -52,6 +52,9 @@
 #define FALSE 1
 #endif
 
+#define _CONCAT(A,B) A##B
+#define CONCAT(A,B) _CONCAT(A,B)
+
 /* test status defines */
 #define TEST_START                 0x01
 #define TEST_END                   0x02
@@ -87,7 +90,7 @@
 
 /* Test Defines */
 #define TEST_PUBLISH(test_id, entry) \
-   const val_test_info_t __attribute__((section(".acs_test_info"))) acs_test_info = {test_id, entry}
+   const val_test_info_t __attribute__((section(".acs_test_info"))) CONCAT(acs_test_info, entry) = {test_id, entry}
 
 #define VAL_MAX_TEST_PER_COMP           200
 #define VAL_FF_BASE                     0
diff --git a/api-tests/val/nspe/val_dispatcher.c b/api-tests/val/nspe/val_dispatcher.c
index ae222cb..bfa74bb 100644
--- a/api-tests/val/nspe/val_dispatcher.c
+++ b/api-tests/val/nspe/val_dispatcher.c
@@ -126,6 +126,7 @@
 **/
 val_status_t val_test_load(test_id_t *test_id, test_id_t test_id_prev)
 {
+#ifndef TEST_COMBINE_ARCHIVE
     test_header_t   test_header;
     addr_t          flash_addr = combine_test_binary_addr;
 
@@ -214,6 +215,41 @@
 
     *test_id = test_header.test_id;
     return VAL_STATUS_SUCCESS;
+
+#else /* TEST_COMBINE_ARCHIVE */
+
+    int             i;
+    val_test_info_t test_list[] = {
+#include "test_entry_list.inc"
+                                  {VAL_INVALID_TEST_ID, NULL}
+                                  };
+
+    for (i = 0; i < (sizeof(test_list)/sizeof(test_list[0])); i++)
+    {
+        if (test_id_prev == VAL_INVALID_TEST_ID)
+        {
+            *test_id = test_list[i].test_id;
+            g_test_info_addr = (addr_t) test_list[i].entry_addr;
+            return VAL_STATUS_SUCCESS;
+        }
+        else if (test_id_prev == test_list[i].test_id)
+        {
+            *test_id = test_list[i+1].test_id;
+            g_test_info_addr = (addr_t) test_list[i+1].entry_addr;
+            return VAL_STATUS_SUCCESS;
+        }
+        else if (test_list[i].test_id == VAL_INVALID_TEST_ID)
+        {
+            val_print(PRINT_DEBUG, "\n\nNo more valid tests found. Exiting.", 0);
+            *test_id = VAL_INVALID_TEST_ID;
+            return VAL_STATUS_SUCCESS;
+        }
+    }
+
+    *test_id = VAL_INVALID_TEST_ID;
+    val_print(PRINT_ERROR, "\n\nError: No more valid tests found. Exiting.", 0);
+    return VAL_STATUS_LOAD_ERROR;
+#endif /* TEST_COMBINE_ARCHIVE */
 }
 
 /**
@@ -224,7 +260,11 @@
 **/
 val_status_t val_get_test_entry_addr(addr_t *paddr)
 {
+#ifndef TEST_COMBINE_ARCHIVE
     *paddr = (addr_t)(((val_test_info_t *)g_test_info_addr)->entry_addr);
+#else
+    *paddr = g_test_info_addr;
+#endif
     return VAL_STATUS_SUCCESS;
 }
 
diff --git a/api-tests/val/nspe/val_interfaces.h b/api-tests/val/nspe/val_interfaces.h
index 9d653f4..ce9b3a1 100644
--- a/api-tests/val/nspe/val_interfaces.h
+++ b/api-tests/val/nspe/val_interfaces.h
@@ -76,6 +76,7 @@
     test_fptr_t   entry_addr;
 } val_test_info_t;
 
+#include "test_entry_fn_declare_list.inc"
 void test_entry(val_api_t *val, psa_api_t *psa);
 void test_payload(val_api_t *val, psa_api_t *psa);