@@ -15,7 +15,7 @@ static odp_pool_t raw_pool;
static odp_buffer_t raw_buffer = ODP_BUFFER_INVALID;
static const size_t raw_buffer_size = 1500;
-static int buffer_suite_init(void)
+int buffer_suite_init(void)
{
odp_pool_param_t params = {
.buf = {
@@ -35,7 +35,7 @@ static int buffer_suite_init(void)
return 0;
}
-static int buffer_suite_term(void)
+int buffer_suite_term(void)
{
odp_buffer_free(raw_buffer);
if (odp_pool_destroy(raw_pool) != 0)
@@ -43,7 +43,7 @@ static int buffer_suite_term(void)
return 0;
}
-static void buffer_test_pool_alloc(void)
+void buffer_test_pool_alloc(void)
{
odp_pool_t pool;
const int num = 3;
@@ -95,7 +95,7 @@ static void buffer_test_pool_alloc(void)
CU_ASSERT(odp_pool_destroy(pool) == 0);
}
-static void buffer_test_pool_free(void)
+void buffer_test_pool_free(void)
{
odp_pool_t pool;
odp_buffer_t buffer;
@@ -127,7 +127,7 @@ static void buffer_test_pool_free(void)
CU_ASSERT(odp_pool_destroy(pool) == 0);
}
-static void buffer_test_management_basic(void)
+void buffer_test_management_basic(void)
{
odp_event_t ev = odp_buffer_to_event(raw_buffer);
@@ -142,14 +142,14 @@ static void buffer_test_management_basic(void)
CU_ASSERT(odp_event_to_u64(ev) != odp_event_to_u64(ODP_EVENT_INVALID));
}
-static CU_TestInfo buffer_suite[] = {
+CU_TestInfo buffer_suite[] = {
_CU_TEST_INFO(buffer_test_pool_alloc),
_CU_TEST_INFO(buffer_test_pool_free),
_CU_TEST_INFO(buffer_test_management_basic),
CU_TEST_INFO_NULL,
};
-static CU_SuiteInfo buffer_suites[] = {
+CU_SuiteInfo buffer_suites[] = {
{ .pName = "buffer tests",
.pTests = buffer_suite,
.pInitFunc = buffer_suite_init,
@@ -7,6 +7,24 @@
#ifndef _ODP_TEST_BUFFER_H_
#define _ODP_TEST_BUFFER_H_
+#include <CUnit/Basic.h>
+
+/* test functions: */
+void buffer_test_pool_alloc(void);
+void buffer_test_pool_free(void);
+void buffer_test_management_basic(void);
+
+/* test arrays: */
+extern CU_TestInfo buffer_suite[];
+
+/* test array init/term functions: */
+int buffer_suite_init(void);
+int buffer_suite_term(void);
+
+/* test registery: */
+extern CU_SuiteInfo buffer_suites[];
+
+/* main test program: */
int buffer_main(void);
#endif
test symbols are now exported in the module lib. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> --- test/validation/buffer/buffer.c | 14 +++++++------- test/validation/buffer/buffer.h | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+), 7 deletions(-)