aboutsummaryrefslogtreecommitdiff
path: root/test/validation/packet/packet.c
diff options
context:
space:
mode:
authorStuart Haslam <stuart.haslam@linaro.org>2015-10-14 10:28:16 +0100
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-10-15 12:50:55 +0300
commit13559ac79511cfb0544e49852f3ae874ebec6816 (patch)
tree1bb8ad11b83b14996951db3d50b0dbd7488a1569 /test/validation/packet/packet.c
parent064af297d4614368769c204acf610ea185588c7a (diff)
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/<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 <stuart.haslam@linaro.org> Reviewed-by: Christophe Milard <christophe.milard@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test/validation/packet/packet.c')
-rw-r--r--test/validation/packet/packet.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/test/validation/packet/packet.c b/test/validation/packet/packet.c
index 31ac4d3..8a4f0a6 100644
--- a/test/validation/packet/packet.c
+++ b/test/validation/packet/packet.c
@@ -7,7 +7,7 @@
#include <stdlib.h>
#include <odp.h>
-#include "odp_cunit_common.h"
+#include <odp_cunit_common.h>
#include "packet.h"
#define PACKET_BUF_LEN ODP_CONFIG_PACKET_SEG_LEN_MIN
@@ -772,35 +772,35 @@ void packet_test_offset(void)
CU_ASSERT_PTR_NOT_NULL(ptr);
}
-CU_TestInfo packet_suite[] = {
- _CU_TEST_INFO(packet_test_alloc_free),
- _CU_TEST_INFO(packet_test_alloc_segmented),
- _CU_TEST_INFO(packet_test_basic_metadata),
- _CU_TEST_INFO(packet_test_debug),
- _CU_TEST_INFO(packet_test_length),
- _CU_TEST_INFO(packet_test_headroom),
- _CU_TEST_INFO(packet_test_tailroom),
- _CU_TEST_INFO(packet_test_context),
- _CU_TEST_INFO(packet_test_event_conversion),
- _CU_TEST_INFO(packet_test_layer_offsets),
- _CU_TEST_INFO(packet_test_segments),
- _CU_TEST_INFO(packet_test_segment_last),
- _CU_TEST_INFO(packet_test_in_flags),
- _CU_TEST_INFO(packet_test_error_flags),
- _CU_TEST_INFO(packet_test_add_rem_data),
- _CU_TEST_INFO(packet_test_copy),
- _CU_TEST_INFO(packet_test_copydata),
- _CU_TEST_INFO(packet_test_offset),
- CU_TEST_INFO_NULL,
+odp_testinfo_t packet_suite[] = {
+ ODP_TEST_INFO(packet_test_alloc_free),
+ ODP_TEST_INFO(packet_test_alloc_segmented),
+ ODP_TEST_INFO(packet_test_basic_metadata),
+ ODP_TEST_INFO(packet_test_debug),
+ ODP_TEST_INFO(packet_test_length),
+ ODP_TEST_INFO(packet_test_headroom),
+ ODP_TEST_INFO(packet_test_tailroom),
+ ODP_TEST_INFO(packet_test_context),
+ ODP_TEST_INFO(packet_test_event_conversion),
+ ODP_TEST_INFO(packet_test_layer_offsets),
+ ODP_TEST_INFO(packet_test_segments),
+ ODP_TEST_INFO(packet_test_segment_last),
+ ODP_TEST_INFO(packet_test_in_flags),
+ ODP_TEST_INFO(packet_test_error_flags),
+ ODP_TEST_INFO(packet_test_add_rem_data),
+ ODP_TEST_INFO(packet_test_copy),
+ ODP_TEST_INFO(packet_test_copydata),
+ ODP_TEST_INFO(packet_test_offset),
+ ODP_TEST_INFO_NULL,
};
-CU_SuiteInfo packet_suites[] = {
+odp_suiteinfo_t packet_suites[] = {
{ .pName = "packet tests",
.pTests = packet_suite,
.pInitFunc = packet_suite_init,
.pCleanupFunc = packet_suite_term,
},
- CU_SUITE_INFO_NULL,
+ ODP_SUITE_INFO_NULL,
};
int packet_main(void)