diff mbox

[3/4] validation: new module errno

Message ID 1435848021-9830-4-git-send-email-christophe.milard@linaro.org
State Accepted
Commit 18f7a7e3d6a5933b0f156aa3d13204ec8acd90ad
Headers show

Commit Message

Christophe Milard July 2, 2015, 2:40 p.m. UTC
Errno (earlyer part of the odp_ver_abt_log_dbg module)
now gets its own module. Test contents remains unchanged.

Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 configure.ac                                                 |  1 +
 platform/linux-generic/test/Makefile.am                      |  1 +
 test/validation/Makefile.am                                  |  1 +
 test/validation/errno/.gitignore                             |  2 ++
 test/validation/errno/Makefile.am                            |  8 ++++++++
 .../{ver_abt_log_dbg/odp_errno.c => errno/errno.c}           | 10 ++++++++++
 test/validation/errno/errno.h                                |  7 +++++++
 test/validation/errno/errno_main.c                           | 12 ++++++++++++
 8 files changed, 42 insertions(+)
 create mode 100644 test/validation/errno/.gitignore
 create mode 100644 test/validation/errno/Makefile.am
 rename test/validation/{ver_abt_log_dbg/odp_errno.c => errno/errno.c} (73%)
 create mode 100644 test/validation/errno/errno.h
 create mode 100644 test/validation/errno/errno_main.c
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index 28dad3b..d77b909 100644
--- a/configure.ac
+++ b/configure.ac
@@ -308,6 +308,7 @@  AC_CONFIG_FILES([Makefile
 		 test/validation/cpumask/Makefile
 		 test/validation/common/Makefile
 		 test/validation/crypto/Makefile
+		 test/validation/errno/Makefile
 		 test/validation/init/Makefile
 		 test/validation/packet/Makefile
 		 test/validation/pktio/Makefile
diff --git a/platform/linux-generic/test/Makefile.am b/platform/linux-generic/test/Makefile.am
index 4f63dd0..4a112e9 100644
--- a/platform/linux-generic/test/Makefile.am
+++ b/platform/linux-generic/test/Makefile.am
@@ -8,6 +8,7 @@  TESTS = pktio/pktio_run \
 	${top_builddir}/test/validation/classification/classification_main$(EXEEXT) \
 	${top_builddir}/test/validation/cpumask/cpumask_main$(EXEEXT) \
 	${top_builddir}/test/validation/crypto/crypto_main \
+	${top_builddir}/test/validation/errno/errno_main$(EXEEXT) \
 	${top_builddir}/test/validation/init/init_main_ok$(EXEEXT) \
 	${top_builddir}/test/validation/init/init_main_abort$(EXEEXT) \
 	${top_builddir}/test/validation/init/init_main_log$(EXEEXT) \
diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
index cfb5dc5..9b151ba 100644
--- a/test/validation/Makefile.am
+++ b/test/validation/Makefile.am
@@ -27,6 +27,7 @@  ODP_MODULES = buffer \
 	      classification \
 	      cpumask \
 	      crypto \
+	      errno \
 	      init \
 	      queue \
 	      packet \
diff --git a/test/validation/errno/.gitignore b/test/validation/errno/.gitignore
new file mode 100644
index 0000000..b2aafc4
--- /dev/null
+++ b/test/validation/errno/.gitignore
@@ -0,0 +1,2 @@ 
+errno_main
+liberrno.a
diff --git a/test/validation/errno/Makefile.am b/test/validation/errno/Makefile.am
new file mode 100644
index 0000000..0ac5d65
--- /dev/null
+++ b/test/validation/errno/Makefile.am
@@ -0,0 +1,8 @@ 
+include ../Makefile.inc
+
+noinst_LIBRARIES = liberrno.a
+liberrno_a_SOURCES = errno.c
+
+bin_PROGRAMS = errno_main$(EXEEXT)
+dist_errno_main_SOURCES = errno_main.c
+errno_main_LDADD = liberrno.a $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/ver_abt_log_dbg/odp_errno.c b/test/validation/errno/errno.c
similarity index 73%
rename from test/validation/ver_abt_log_dbg/odp_errno.c
rename to test/validation/errno/errno.c
index 32f5363..70a6613 100644
--- a/test/validation/ver_abt_log_dbg/odp_errno.c
+++ b/test/validation/errno/errno.c
@@ -22,3 +22,13 @@  CU_TestInfo test_odp_errno[] = {
 	{"sunny day", test_odp_errno_sunny_day},
 	CU_TEST_INFO_NULL,
 };
+
+CU_SuiteInfo errno_suites[] = {
+	{"Errno",	NULL, NULL, NULL, NULL, test_odp_errno},
+	CU_SUITE_INFO_NULL,
+};
+
+int errno_main(void)
+{
+	return odp_cunit_run(errno_suites);
+}
diff --git a/test/validation/errno/errno.h b/test/validation/errno/errno.h
new file mode 100644
index 0000000..f05d2c6
--- /dev/null
+++ b/test/validation/errno/errno.h
@@ -0,0 +1,7 @@ 
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+int errno_main(void);
diff --git a/test/validation/errno/errno_main.c b/test/validation/errno/errno_main.c
new file mode 100644
index 0000000..0e82422
--- /dev/null
+++ b/test/validation/errno/errno_main.c
@@ -0,0 +1,12 @@ 
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+#include "errno.h"
+
+int main(void)
+{
+	return errno_main();
+}