On 11/21/2014 11:16 PM, Mike Holmes wrote:
Ensure that when run each test suite displays the ODP API and
implementation strings immediately after the CUnit version string

Signed-off-by: Mike Holmes <mike.hol...@linaro.org>
---
  test/validation/odp_crypto.c | 11 +++++++++--
  test/validation/odp_init.c   |  5 +++--
  test/validation/odp_queue.c  |  7 +++++--
  3 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/test/validation/odp_crypto.c b/test/validation/odp_crypto.c
index 985302a..dd3784f 100644
--- a/test/validation/odp_crypto.c
+++ b/test/validation/odp_crypto.c
@@ -16,9 +16,16 @@
  #define SHM_COMPL_POOL_SIZE   (128*1024)
  #define SHM_COMPL_POOL_BUF_SIZE       128
+static int init_suite(void)
+{
+       printf("\tODP version: %s\n", odp_version_api_str());
+       printf("\tODP implementation: %s\n", odp_version_impl_str());
Current output:

    ODP version: 0.3.0
    ODP implementation: 0

I think we need specify more clear. Like:
"ODP API version: 0.3.0"
"ODP Platform: linux-generic"
"ODP Implementation version: 0"
test date (optional).

I.e.
1) add platform name.
2) add words "version" and "API"  to printed message.

Maxim.


+       return 0;
+}
+
  CU_SuiteInfo suites[] = {
-       { ODP_CRYPTO_SYNC_INP , NULL, NULL, NULL, NULL, test_array_sync },
-       { ODP_CRYPTO_ASYNC_INP , NULL, NULL, NULL, NULL, test_array_async },
+       {ODP_CRYPTO_SYNC_INP, init_suite, NULL, NULL, NULL, test_array_sync },
+       {ODP_CRYPTO_ASYNC_INP, init_suite, NULL, NULL, NULL, test_array_async },
        CU_SUITE_INFO_NULL,
  };
diff --git a/test/validation/odp_init.c b/test/validation/odp_init.c
index 88e6235..538f30e 100644
--- a/test/validation/odp_init.c
+++ b/test/validation/odp_init.c
@@ -20,9 +20,10 @@ static void test_odp_init_global(void)
        CU_ASSERT(status == 0);
  }
-static int init(void)
+static int init_suite(void)
  {
        printf("\tODP version: %s\n", odp_version_api_str());
+       printf("\tODP implementation: %s\n", odp_version_impl_str());
        return 0;
  }
@@ -38,7 +39,7 @@ int main(void)
        if (CUE_SUCCESS != CU_initialize_registry())
                return CU_get_error();
        /* add a suite to the registry */
-       ptr_suite = CU_add_suite(__FILE__, init, finalise);
+       ptr_suite = CU_add_suite(__FILE__, init_suite, finalise);
        if (NULL == ptr_suite) {
                CU_cleanup_registry();
                return CU_get_error();
diff --git a/test/validation/odp_queue.c b/test/validation/odp_queue.c
index 4d233e0..bced19e 100644
--- a/test/validation/odp_queue.c
+++ b/test/validation/odp_queue.c
@@ -105,8 +105,11 @@ static void test_odp_queue_sunnyday(void)
        return;
  }
-static int init(void)
+static int init_suite(void)
  {
+       printf("\tODP version: %s\n", odp_version_api_str());
+       printf("\tODP implementation: %s\n", odp_version_impl_str());
+
        if (0 != odp_init_global(NULL, NULL)) {
                printf("odp_init_global fail.\n");
                return -1;
@@ -138,7 +141,7 @@ int main(void)
                return CU_get_error();
/* add the tests to the queue suite */
-       ptr_suite = CU_add_suite(__FILE__, init, finalize);
+       ptr_suite = CU_add_suite(__FILE__, init_suite, finalize);
        if (NULL == ptr_suite) {
                CU_cleanup_registry();
                return CU_get_error();


_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to