@@ -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
@@ -2,5 +2,4 @@
*.trs
odp_ver_abt_log_dbg
odp_shared_memory
-odp_synchronizers
odp_timer
@@ -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
new file mode 100644
@@ -0,0 +1,2 @@
+synchronizers_main
+libsynchronizers.a
new file mode 100644
@@ -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)
similarity index 99%
rename from test/validation/odp_synchronizers.c
rename to 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();
-}
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+int synchronizers_main(void);
new file mode 100644
@@ -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();
+}
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