From 13559ac79511cfb0544e49852f3ae874ebec6816 Mon Sep 17 00:00:00 2001 From: Stuart Haslam Date: Wed, 14 Oct 2015 10:28:16 +0100 Subject: validation: add ability to mark tests inactive Add the ability for individual test cases to be marked as inactive, either unconditionally or based on the result of a check function which is called at test init time. Inactive tests are registered with CUnit and are reported as inactive in test reports without being executed. All uses of CU_TestInfo have been replaced with odp_testinfo_t in order to carry the conditional function pointer in addition to the CU_TestInfo struct, and some new macros added to make things a bit easier; _CU_TEST_INFO() is renamed to ODP_TEST_INFO() but remains functionally the same, these tests will be run unconditionally. ODP_TEST_INFO_INACTIVE() can be used to define an inactive test case. There's no good reason to do this in any of the modules under test/validation/ but the intention is to allow this to be done on a per-platform basis from within the platform//test/ tree. ODP_TEST_INFO_CONDITIONAL() takes an additional parameter which is a pointer to a function to call at test suite initialisation time to determine whether that test should be marked as inactive. Signed-off-by: Stuart Haslam Reviewed-by: Christophe Milard Signed-off-by: Maxim Uvarov --- test/validation/classification/classification.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/validation/classification/classification.h') diff --git a/test/validation/classification/classification.h b/test/validation/classification/classification.h index d2847e52a..ddb1164a8 100644 --- a/test/validation/classification/classification.h +++ b/test/validation/classification/classification.h @@ -7,7 +7,7 @@ #ifndef _ODP_TEST_CLASSIFICATION_H_ #define _ODP_TEST_CLASSIFICATION_H_ -#include +#include /* test functions: */ void classification_test_create_cos(void); @@ -27,15 +27,15 @@ void classification_test_pktio_configure(void); void classification_test_pktio_test(void); /* test arrays: */ -extern CU_TestInfo classification_suite_basic[]; -extern CU_TestInfo classification_suite[]; +extern odp_testinfo_t classification_suite_basic[]; +extern odp_testinfo_t classification_suite[]; /* test array init/term functions: */ int classification_suite_init(void); int classification_suite_term(void); /* test registry: */ -extern CU_SuiteInfo classification_suites[]; +extern odp_suiteinfo_t classification_suites[]; /* main test program: */ int classification_main(void); -- cgit v1.2.3