diff mbox

[4/5] validation: creating own dir for synchronizers

Message ID 1435767428-22409-5-git-send-email-christophe.milard@linaro.org
State Accepted
Commit 0ce799c26826c3f45dcbdb6acd1bf847872c9b68
Headers show

Commit Message

Christophe Milard July 1, 2015, 4:17 p.m. UTC
creating own dir and lib for synchronizers

Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 configure.ac                                                 |  1 +
 test/validation/.gitignore                                   |  1 -
 test/validation/Makefile.am                                  |  9 +++------
 test/validation/synchronizers/.gitignore                     |  2 ++
 test/validation/synchronizers/Makefile.am                    |  8 ++++++++
 .../{odp_synchronizers.c => synchronizers/synchronizers.c}   | 10 +++-------
 test/validation/synchronizers/synchronizers.h                |  7 +++++++
 test/validation/synchronizers/synchronizers_main.c           | 12 ++++++++++++
 8 files changed, 36 insertions(+), 14 deletions(-)
 create mode 100644 test/validation/synchronizers/.gitignore
 create mode 100644 test/validation/synchronizers/Makefile.am
 rename test/validation/{odp_synchronizers.c => synchronizers/synchronizers.c} (99%)
 create mode 100644 test/validation/synchronizers/synchronizers.h
 create mode 100644 test/validation/synchronizers/synchronizers_main.c
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index d27e899..28dad3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -315,6 +315,7 @@  AC_CONFIG_FILES([Makefile
 		 test/validation/queue/Makefile
 		 test/validation/random/Makefile
 		 test/validation/scheduler/Makefile
+		 test/validation/synchronizers/Makefile
 		 test/validation/system/Makefile
 		 test/validation/thread/Makefile
 		 test/miscellaneous/Makefile
diff --git a/test/validation/.gitignore b/test/validation/.gitignore
index 676f6f1..b208bac 100644
--- a/test/validation/.gitignore
+++ b/test/validation/.gitignore
@@ -2,5 +2,4 @@ 
 *.trs
 odp_ver_abt_log_dbg
 odp_shared_memory
-odp_synchronizers
 odp_timer
diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
index 464cdc3..09bacf1 100644
--- a/test/validation/Makefile.am
+++ b/test/validation/Makefile.am
@@ -5,12 +5,12 @@  AM_CFLAGS += -I$(srcdir)/common
 AM_LDFLAGS += -static
 
 EXECUTABLES = odp_shared_memory$(EXEEXT) \
-	      odp_synchronizers$(EXEEXT) \
 	      odp_timer$(EXEEXT) \
 	      odp_ver_abt_log_dbg$(EXEEXT)
 
 if test_vald
-TESTS = $(EXECUTABLES)
+TESTS = $(EXECUTABLES) \
+	synchronizers/synchronizers_main
 endif
 
 bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
@@ -19,10 +19,6 @@  ODP_CU_COMMON=common/odp_cunit_common.c
 
 odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
 dist_odp_shared_memory_SOURCES	= odp_shared_memory.c
-odp_synchronizers_LDADD = \
-	$(top_builddir)/test/validation/common/libcunit_common.a \
-	$(LIB)/libodp.la
-dist_odp_synchronizers_SOURCES = odp_synchronizers.c
 dist_odp_timer_SOURCES  = odp_timer.c
 odp_ver_abt_log_dbg_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/ver_abt_log_dbg
 dist_odp_ver_abt_log_dbg_SOURCES  = ver_abt_log_dbg/odp_system.c \
@@ -40,6 +36,7 @@  ODP_MODULES = buffer \
 	      pool \
 	      random \
 	      scheduler \
+	      synchronizers \
 	      system \
 	      thread
 
diff --git a/test/validation/synchronizers/.gitignore b/test/validation/synchronizers/.gitignore
new file mode 100644
index 0000000..3e0ff4a
--- /dev/null
+++ b/test/validation/synchronizers/.gitignore
@@ -0,0 +1,2 @@ 
+synchronizers_main
+libsynchronizers.a
diff --git a/test/validation/synchronizers/Makefile.am b/test/validation/synchronizers/Makefile.am
new file mode 100644
index 0000000..ca412bb
--- /dev/null
+++ b/test/validation/synchronizers/Makefile.am
@@ -0,0 +1,8 @@ 
+include ../Makefile.inc
+
+noinst_LIBRARIES = libsynchronizers.a
+libsynchronizers_a_SOURCES = synchronizers.c
+
+bin_PROGRAMS = synchronizers_main$(EXEEXT)
+dist_synchronizers_main_SOURCES = synchronizers_main.c
+synchronizers_main_LDADD = libsynchronizers.a $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/odp_synchronizers.c b/test/validation/synchronizers/synchronizers.c
similarity index 99%
rename from test/validation/odp_synchronizers.c
rename to test/validation/synchronizers/synchronizers.c
index 45348d1..61c6026 100644
--- a/test/validation/odp_synchronizers.c
+++ b/test/validation/synchronizers/synchronizers.c
@@ -9,6 +9,8 @@ 
 #include <CUnit/Basic.h>
 #include <odp_cunit_common.h>
 #include <unistd.h>
+#include "synchronizers.h"
+
 #define VERBOSE			0
 #define MAX_ITERATIONS		1000
 #define BARRIER_ITERATIONS	64
@@ -1206,13 +1208,7 @@  static CU_SuiteInfo synchronizers_suites[] = {
 	CU_SUITE_INFO_NULL
 };
 
-static int synchronizers_main(void)
+int synchronizers_main(void)
 {
 	return odp_cunit_run(synchronizers_suites);
 }
-
-/* the following main function will be separated when lib is created */
-int main(void)
-{
-	return synchronizers_main();
-}
diff --git a/test/validation/synchronizers/synchronizers.h b/test/validation/synchronizers/synchronizers.h
new file mode 100644
index 0000000..8890c3d
--- /dev/null
+++ b/test/validation/synchronizers/synchronizers.h
@@ -0,0 +1,7 @@ 
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+int synchronizers_main(void);
diff --git a/test/validation/synchronizers/synchronizers_main.c b/test/validation/synchronizers/synchronizers_main.c
new file mode 100644
index 0000000..659d315
--- /dev/null
+++ b/test/validation/synchronizers/synchronizers_main.c
@@ -0,0 +1,12 @@ 
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+#include "synchronizers.h"
+
+int main(void)
+{
+	return synchronizers_main();
+}