Thanks Bill. Just need Petri or Robbies confirmation that 1.1 forward will use the implementation version as a number and not a long string, essentially as it was before but we failed to take advantage of it.
Mike On 11 May 2015 at 12:40, Bill Fischofer <[email protected]> wrote: > > > On Fri, May 8, 2015 at 10:47 AM, Mike Holmes <[email protected]> > wrote: > >> Signed-off-by: Mike Holmes <[email protected]> >> > > Reviewed-by: Bill Fischofer <[email protected]> > > >> --- >> include/odp/api/version.h | 17 +++++++++++++++++ >> platform/linux-generic/odp_impl.c | 16 ++++++++++++++++ >> test/miscellaneous/odp_api_from_cpp.cpp | 1 + >> test/validation/common/odp_cunit_common.c | 1 + >> test/validation/odp_init.c | 1 + >> test/validation/odp_init_abort.c | 1 + >> test/validation/odp_init_log.c | 1 + >> 7 files changed, 38 insertions(+) >> >> diff --git a/include/odp/api/version.h b/include/odp/api/version.h >> index 027095d..f64e4ef 100644 >> --- a/include/odp/api/version.h >> +++ b/include/odp/api/version.h >> @@ -50,6 +50,8 @@ extern "C" { >> >> /** >> * Returns ODP API version string >> + * @sa odp_version_impl_str() >> + * @sa odp_version_str() >> */ >> const char *odp_version_api_str(void); >> >> @@ -61,10 +63,25 @@ const char *odp_version_api_str(void); >> * of the API changing, this function returns that indication string. >> * @note This string is implementation specific. >> * @sa odp_version_api_str() >> + * @sa odp_version_str() >> * >> * @return null terminated implementation specific version identifier >> string >> */ >> const char *odp_version_impl_str(void); >> + >> +/** >> + * Returns ODP version string >> + * >> + * Verbosely describe the build in use, typicaly for use in log file. >> + * @note This string is implementation specific. >> + * @sa odp_version_api_str() >> + * @sa odp_version_impl_str() >> + * >> + * @return null terminated implementation specific version string >> + */ >> +const char *odp_version_str(void); >> + >> + >> /** >> * @} >> */ >> diff --git a/platform/linux-generic/odp_impl.c >> b/platform/linux-generic/odp_impl.c >> index 46d0e40..26ee3f9 100644 >> --- a/platform/linux-generic/odp_impl.c >> +++ b/platform/linux-generic/odp_impl.c >> @@ -38,6 +38,22 @@ const char *odp_version_impl_str(void) >> return ODP_VERSION_IMPL_STR; >> } >> >> +#define ODP_VERSION_STR \ >> + ODP_VERSION_TO_STR(PLATFORM) " " \ >> + ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ >> + ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ >> + ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) "-" \ >> + ODP_VERSION_TO_STR(ODP_VERSION_IMPL) " (v" \ >> + ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ >> + ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ >> + ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) ") " \ >> + __DATE__ " " __TIME__ " " \ >> + ODP_VERSION_TO_STR(GIT_HASH) >> + >> +const char *odp_version_str(void) >> +{ >> + return ODP_VERSION_STR; >> +} >> #ifdef __cplusplus >> } >> #endif >> diff --git a/test/miscellaneous/odp_api_from_cpp.cpp >> b/test/miscellaneous/odp_api_from_cpp.cpp >> index e62ef8d..f044f92 100644 >> --- a/test/miscellaneous/odp_api_from_cpp.cpp >> +++ b/test/miscellaneous/odp_api_from_cpp.cpp >> @@ -7,6 +7,7 @@ int main(int argc, const char *argv[]) >> >> printf("\tODP API version: %s\n", odp_version_api_str()); >> printf("\tODP implementation version: %s\n", >> odp_version_impl_str()); >> + printf("\tODP version: %s\n", odp_version_str()); >> >> return 0; >> } >> diff --git a/test/validation/common/odp_cunit_common.c >> b/test/validation/common/odp_cunit_common.c >> index 2af4410..315a902 100644 >> --- a/test/validation/common/odp_cunit_common.c >> +++ b/test/validation/common/odp_cunit_common.c >> @@ -55,6 +55,7 @@ int main(void) >> >> printf("\tODP API version: %s\n", odp_version_api_str()); >> printf("\tODP implementation version: %s\n", >> odp_version_impl_str()); >> + printf("\tODP version: %s\n", odp_version_str()); >> >> if (0 != odp_init_global(NULL, NULL)) { >> fprintf(stderr, "error: odp_init_global() failed.\n"); >> diff --git a/test/validation/odp_init.c b/test/validation/odp_init.c >> index 82f8849..08e0b08 100644 >> --- a/test/validation/odp_init.c >> +++ b/test/validation/odp_init.c >> @@ -37,6 +37,7 @@ int main(void) >> >> printf("\tODP API version: %s\n", odp_version_api_str()); >> printf("\tODP implementation version: %s\n", >> odp_version_impl_str()); >> + printf("\tODP version: %s\n", odp_version_str()); >> >> CU_set_error_action(CUEA_ABORT); >> >> diff --git a/test/validation/odp_init_abort.c >> b/test/validation/odp_init_abort.c >> index ceb82b5..7844066 100644 >> --- a/test/validation/odp_init_abort.c >> +++ b/test/validation/odp_init_abort.c >> @@ -42,6 +42,7 @@ int main(void) >> >> printf("\tODP API version: %s\n", odp_version_api_str()); >> printf("\tODP implementation version: %s\n", >> odp_version_impl_str()); >> + printf("\tODP version: %s\n", odp_version_str()); >> >> CU_set_error_action(CUEA_ABORT); >> >> diff --git a/test/validation/odp_init_log.c >> b/test/validation/odp_init_log.c >> index 275d343..f905850 100644 >> --- a/test/validation/odp_init_log.c >> +++ b/test/validation/odp_init_log.c >> @@ -48,6 +48,7 @@ int main(void) >> >> printf("\tODP API version: %s\n", odp_version_api_str()); >> printf("\tODP implementation version: %s\n", >> odp_version_impl_str()); >> + printf("\tODP version: %s\n", odp_version_str()); >> >> CU_set_error_action(CUEA_ABORT); >> >> -- >> 2.1.4 >> >> _______________________________________________ >> lng-odp mailing list >> [email protected] >> https://lists.linaro.org/mailman/listinfo/lng-odp >> > > -- Mike Holmes Technical Manager - Linaro Networking Group Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
_______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
