summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2017-03-03 15:55:10 +0000
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2017-03-03 15:55:10 +0000
commita260b7f36f50c2a2eaabddcb6014df092e074046 (patch)
tree89d941b00096fdfe68c2ba06ef9a2870925876e0 /include
parente61267114875aea57e2614a1c2b9f6f30ab40b71 (diff)
Move helper macros to common header
Modify tests that use them so that they include the new header and they don't have copies of the helpers. Change-Id: I6874138ba984c66948dbf484871e03bf1d7c8154 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'include')
-rw-r--r--include/common/test_helpers.h24
-rw-r--r--include/lib/tftf_lib.h24
2 files changed, 24 insertions, 24 deletions
diff --git a/include/common/test_helpers.h b/include/common/test_helpers.h
index 6f35482..23f3af0 100644
--- a/include/common/test_helpers.h
+++ b/include/common/test_helpers.h
@@ -34,6 +34,30 @@
#include <psci.h>
#include <tftf_lib.h>
+#define SKIP_TEST_IF_LESS_THAN_N_CLUSTERS(n) \
+ do { \
+ unsigned int clusters_cnt; \
+ clusters_cnt = tftf_get_total_clusters_count(); \
+ if (clusters_cnt < (n)) { \
+ tftf_testcase_printf( \
+ "Need at least %u clusters, only found %u\n", \
+ (n), clusters_cnt); \
+ return TEST_RESULT_SKIPPED; \
+ } \
+ } while (0)
+
+#define SKIP_TEST_IF_LESS_THAN_N_CPUS(n) \
+ do { \
+ unsigned int cpus_cnt; \
+ cpus_cnt = tftf_get_total_cpus_count(); \
+ if (cpus_cnt < (n)) { \
+ tftf_testcase_printf( \
+ "Need at least %u CPUs, only found %u\n", \
+ (n), cpus_cnt); \
+ return TEST_RESULT_SKIPPED; \
+ } \
+ } while (0)
+
/* Helper macro to verify if system suspend API is supported */
#define is_psci_sys_susp_supported() \
(tftf_get_psci_feature_info(SMC_PSCI_SYSTEM_SUSPEND) \
diff --git a/include/lib/tftf_lib.h b/include/lib/tftf_lib.h
index 377e98b..caa92f1 100644
--- a/include/lib/tftf_lib.h
+++ b/include/lib/tftf_lib.h
@@ -194,30 +194,6 @@ int tftf_testcase_printf(const char *format, ...);
typedef unsigned long long UINTN;
-#define SKIP_TEST_IF_LESS_THAN_N_CLUSTERS(n) \
- do { \
- unsigned int clusters_cnt; \
- clusters_cnt = tftf_get_total_clusters_count(); \
- if (clusters_cnt < (n)) { \
- tftf_testcase_printf( \
- "Need at least %u clusters, only found %u\n", \
- (n), clusters_cnt); \
- return TEST_RESULT_SKIPPED; \
- } \
- } while (0)
-
-#define SKIP_TEST_IF_LESS_THAN_N_CPUS(n) \
- do { \
- unsigned int cpus_cnt; \
- cpus_cnt = tftf_get_total_cpus_count(); \
- if (cpus_cnt < (n)) { \
- tftf_testcase_printf( \
- "Need at least %u CPUs, only found %u\n", \
- (n), cpus_cnt); \
- return TEST_RESULT_SKIPPED; \
- } \
- } while (0)
-
/*
* This function is meant to be used by tests.
* It tells the framework that the test is going to reset the platform.