aboutsummaryrefslogtreecommitdiff
path: root/helper/test
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@nokia.com>2019-05-02 11:26:34 +0300
committerPetri Savolainen <petri.savolainen@nokia.com>2019-05-09 09:43:17 +0300
commit2e927d35cb368611d2684caee633dbff733cebe5 (patch)
tree0444a432702bd5d0a758421512a74b8a77cecac9 /helper/test
parent9dced3ede96b81f883172bad827054bd796c13b4 (diff)
helper: add helper version defines
Added helper library version defines, so that application can track helper version independent of ODP API version. Added also function for easy print out of the versions number. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Stanislaw Kardach <skardach@marvell.com>
Diffstat (limited to 'helper/test')
-rw-r--r--helper/test/.gitignore1
-rw-r--r--helper/test/Makefile.am4
-rw-r--r--helper/test/version.c22
3 files changed, 26 insertions, 1 deletions
diff --git a/helper/test/.gitignore b/helper/test/.gitignore
index 1a81e0047..5a6c60bcc 100644
--- a/helper/test/.gitignore
+++ b/helper/test/.gitignore
@@ -9,3 +9,4 @@ process
table
thread
pthread
+version
diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
index 662d6c758..bf3aa862c 100644
--- a/helper/test/Makefile.am
+++ b/helper/test/Makefile.am
@@ -1,6 +1,7 @@
include $(top_srcdir)/test/Makefile.inc
-EXECUTABLES = chksum \
+EXECUTABLES = version \
+ chksum \
cuckootable \
parse\
table \
@@ -36,3 +37,4 @@ odpthreads_SOURCES = odpthreads.c
parse_SOURCES = parse.c
table_SOURCES = table.c
iplookuptable_SOURCES = iplookuptable.c
+version_SOURCES = version.c
diff --git a/helper/test/version.c b/helper/test/version.c
new file mode 100644
index 000000000..bd817bb47
--- /dev/null
+++ b/helper/test/version.c
@@ -0,0 +1,22 @@
+/* Copyright (c) 2019, Nokia
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include "config.h"
+
+#include <odph_debug.h>
+
+#include <odp_api.h>
+#include <odp/helper/odph_api.h>
+
+#include <stdio.h>
+#include <string.h>
+
+int main(void)
+{
+ printf("\nHelper library versions is: %s\n\n", odph_version_str());
+
+ return 0;
+}