Move GlobalPlatform tests to their own test suite
Introduce a new test suite, selected by "-t gp", and move all the
GlobalPlatform tests there. In order to maintain some backward
compatibility, xtest will run both the "regression" and "gp" suites by
default. To implement this behavior, accept a "+" as a separator for
test suite names, and set the default to "regression+gp". Concatenate
test suites before running the tests to obtain a single, consolidated
report at the end of execution.
Rename C source files according to the test suite they belong to:
implement "regression" tests in regression_*.c, the "gp" tests in
gp_*.c (generated), and the "benchmark" tests in benchmark_*.c.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (qemu_virt)
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
diff --git a/Makefile b/Makefile
index 86177ae..ae58c4f 100644
--- a/Makefile
+++ b/Makefile
@@ -131,17 +131,17 @@
$(q) mkdir -p ${GP_XTEST_IN_DIR} ${GP_XTEST_IN_DIR}
$(q)find ${CFG_GP_PACKAGE_PATH}/packages -type f -name "*.xml" -exec cp -p {} ${GP_XTEST_IN_DIR} \;
$(q)find ${CFG_GP_XSL_PACKAGE_PATH}/packages -type f -name "*.xsl" -exec cp -p {} ${GP_XTEST_IN_DIR} \;
- $(call patch-xalan,TEE.xml,TEE.xsl,xtest_7000_gp.c)
- $(call patch-xalan,TEE_DataStorage_API.xml,TEE_DataStorage_API.xsl,xtest_7500.c)
- $(call patch-xalan,TEE_Internal_API.xml,TEE_Internal_API.xsl,xtest_8000.c)
- $(call patch-xalan,TEE_TimeArithm_API.xml,TEE_TimeArithm_API.xsl,xtest_8500.c)
- $(call patch-xalan,TEE_Crypto_API.xml,TEE_Crypto_API.xsl,xtest_9000.c)
+ $(call patch-xalan,TEE.xml,TEE.xsl,gp_7000.c)
+ $(call patch-xalan,TEE_DataStorage_API.xml,TEE_DataStorage_API.xsl,gp_7500.c)
+ $(call patch-xalan,TEE_Internal_API.xml,TEE_Internal_API.xsl,gp_8000.c)
+ $(call patch-xalan,TEE_TimeArithm_API.xml,TEE_TimeArithm_API.xsl,gp_8500.c)
+ $(call patch-xalan,TEE_Crypto_API.xml,TEE_Crypto_API.xsl,gp_9000.c)
@echo "INFO: Patch host tests"
# $(q)sed -i '752 c\ xtest_tee_deinit();\n' ${GP_XTEST_OUT_DIR}/xtest_7000.c
# $(q)sed -i '1076 c\ xtest_tee_deinit();\n' ${GP_XTEST_OUT_DIR}/xtest_8000.c
# $(q)sed -i '2549 c\ xtest_tee_deinit();\n' ${GP_XTEST_OUT_DIR}/xtest_8500.c
# $(q)sed -i '246 c\ xtest_tee_deinit();\n' ${GP_XTEST_OUT_DIR}/xtest_9000.c
- $(call patch-file,host/xtest/xtest_9000.c,${CFG_GP_XSL_PACKAGE_PATH}/host/xtest/xtest_9000.c.patch)
+ $(call patch-file,host/xtest/gp_9000.c,${CFG_GP_XSL_PACKAGE_PATH}/host/xtest/gp_9000.c.patch)
.PHONY: patch-generate-ta
patch-generate-ta: patch-package
@@ -199,60 +199,20 @@
$(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_Time/TTA_Time/code_files/TTA_Time.c,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_Time/code_patches/v1_1_0_4-2014_11_07/TTA_Time.c.patch)
define patch-filter-one
- $(q)sed -i 's|^\(ADBG_CASE_DEFINE(regression,\) $1,\(.*\)$$|/\*\1 $1,\2\*/|g' ${GP_XTEST_OUT_DIR}/$2
+ $(q)sed -i 's|^\(ADBG_CASE_DEFINE(gp,\) $1,\(.*\)$$|/\*\1 $1,\2\*/|g' ${GP_XTEST_OUT_DIR}/$2
+
endef
.PHONY: patch-filter
patch-filter:
- @echo "INFO: Filter some tests"
- $(call patch-filter-one,7038,xtest_7000_gp.c)
- $(call patch-filter-one,7522,xtest_7500.c)
- $(call patch-filter-one,7538,xtest_7500.c)
- $(call patch-filter-one,7540,xtest_7500.c)
- $(call patch-filter-one,7546,xtest_7500.c)
- $(call patch-filter-one,7557,xtest_7500.c)
- $(call patch-filter-one,7559,xtest_7500.c)
- $(call patch-filter-one,7577,xtest_7500.c)
- $(call patch-filter-one,7641,xtest_7500.c)
- $(call patch-filter-one,7642,xtest_7500.c)
- $(call patch-filter-one,7643,xtest_7500.c)
- $(call patch-filter-one,7644,xtest_7500.c)
- $(call patch-filter-one,7686,xtest_7500.c)
- $(call patch-filter-one,8025,xtest_8000.c)
- $(call patch-filter-one,8030,xtest_8000.c)
- $(call patch-filter-one,8058,xtest_8000.c)
- $(call patch-filter-one,8059,xtest_8000.c)
- $(call patch-filter-one,8066,xtest_8000.c)
- $(call patch-filter-one,8614,xtest_8500.c)
- $(call patch-filter-one,8643,xtest_8500.c)
- $(call patch-filter-one,8644,xtest_8500.c)
- $(call patch-filter-one,8673,xtest_8500.c)
- $(call patch-filter-one,8674,xtest_8500.c)
- $(call patch-filter-one,9001,xtest_9000.c)
- $(call patch-filter-one,9072,xtest_9000.c)
- $(call patch-filter-one,9073,xtest_9000.c)
- $(call patch-filter-one,9075,xtest_9000.c)
- $(call patch-filter-one,9079,xtest_9000.c)
- $(call patch-filter-one,9080,xtest_9000.c)
- $(call patch-filter-one,9082,xtest_9000.c)
- $(call patch-filter-one,9085,xtest_9000.c)
- $(call patch-filter-one,9086,xtest_9000.c)
- $(call patch-filter-one,9088,xtest_9000.c)
- $(call patch-filter-one,9090,xtest_9000.c)
- $(call patch-filter-one,9091,xtest_9000.c)
- $(call patch-filter-one,9093,xtest_9000.c)
- $(call patch-filter-one,9095,xtest_9000.c)
- $(call patch-filter-one,9096,xtest_9000.c)
- $(call patch-filter-one,9098,xtest_9000.c)
- $(call patch-filter-one,9099,xtest_9000.c)
- $(call patch-filter-one,9109,xtest_9000.c)
- $(call patch-filter-one,9110,xtest_9000.c)
- $(call patch-filter-one,9160,xtest_9000.c)
- $(call patch-filter-one,9174,xtest_9000.c)
- $(call patch-filter-one,9195,xtest_9000.c)
- $(call patch-filter-one,9196,xtest_9000.c)
- $(call patch-filter-one,9204,xtest_9000.c)
- $(call patch-filter-one,9239,xtest_9000.c)
+ @echo "INFO: Filter out some tests"
+ @# 7001-7010, 7013, 7016-7019 are in regression_7000.c already
+ $(foreach n,7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7013 7016 7017 7018 7019,$(call patch-filter-one,$(n),gp_7000.c))
+ $(call patch-filter-one,7038,gp_7000.c)
+ $(foreach n,7522 7538 7540 7546 7557 7559 7577 7641 7642 7643 7644 7686,$(call patch-filter-one,$(n),gp_7500.c))
+ $(foreach n,8025 8030 8058 8059 8066,$(call patch-filter-one,$(n),gp_8000.c))
+ $(foreach n,8614 8643 8644 8673 8674,$(call patch-filter-one,$(n),gp_8500.c))
+ $(foreach n,9001 9072 9073 9075 9079 9080 9082 9085 9086 9088 9090 9091 9093 9095 9096 9098 9099 9109 9110 9160 9174 9195 9196 9204 9239,$(call patch-filter-one,$(n),gp_9000.c))
.PHONY: patch
patch: patch-openssl patch-generate-host patch-generate-ta