@@ -319,6 +319,7 @@ AC_CONFIG_FILES([Makefile
test/validation/synchronizers/Makefile
test/validation/thread/Makefile
test/validation/time/Makefile
+ test/validation/timer/Makefile
test/validation/shmem/Makefile
test/validation/system/Makefile
test/miscellaneous/Makefile
@@ -1,3 +1,2 @@
*.log
*.trs
-odp_timer
@@ -4,20 +4,14 @@ include $(top_srcdir)/test/Makefile.inc
AM_CFLAGS += -I$(srcdir)/common
AM_LDFLAGS += -static
-EXECUTABLES = odp_timer$(EXEEXT)
-
if test_vald
-TESTS = $(EXECUTABLES)
+TESTS = timer/timer_main
endif
-bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
ODP_CU_COMMON=common/odp_cunit_common.c
odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
-odp_timer_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \
- $(LIB)/libodp.la
-dist_odp_timer_SOURCES = odp_timer.c
ODP_MODULES = buffer \
classification \
@@ -34,6 +28,7 @@ ODP_MODULES = buffer \
synchronizers \
thread \
time \
+ timer \
shmem \
system
new file mode 100644
@@ -0,0 +1,2 @@
+timer_main
+libtimer.a
new file mode 100644
@@ -0,0 +1,8 @@
+include ../Makefile.inc
+
+noinst_LIBRARIES = libtimer.a
+libtimer_a_SOURCES = timer.c
+
+bin_PROGRAMS = timer_main$(EXEEXT)
+dist_timer_main_SOURCES = timer_main.c
+timer_main_LDADD = libtimer.a $(LIBCUNIT_COMMON) $(LIBODP)
similarity index 99%
rename from test/validation/odp_timer.c
rename to test/validation/timer/timer.c
@@ -14,6 +14,7 @@
#include <odp.h>
#include "odp_cunit_common.h"
#include "test_debug.h"
+#include "timer.h"
/** @private Timeout range in milliseconds (ms) */
#define RANGE_MS 2000
@@ -543,13 +544,7 @@ static CU_SuiteInfo timer_suites[] = {
CU_SUITE_INFO_NULL,
};
-static int timer_main(void)
+int timer_main(void)
{
return odp_cunit_run(timer_suites);
}
-
-/* the following main function will be separated when lib is created */
-int main(void)
-{
- return timer_main();
-}
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+int timer_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 "timer.h"
+
+int main(void)
+{
+ return timer_main();
+}
Signed-off-by: Christophe Milard <christophe.milard@linaro.org> --- configure.ac | 1 + test/validation/.gitignore | 1 - test/validation/Makefile.am | 9 ++------- test/validation/timer/.gitignore | 2 ++ test/validation/timer/Makefile.am | 8 ++++++++ test/validation/{odp_timer.c => timer/timer.c} | 9 ++------- test/validation/timer/timer.h | 7 +++++++ test/validation/timer/timer_main.c | 12 ++++++++++++ 8 files changed, 34 insertions(+), 15 deletions(-) create mode 100644 test/validation/timer/.gitignore create mode 100644 test/validation/timer/Makefile.am rename test/validation/{odp_timer.c => timer/timer.c} (99%) create mode 100644 test/validation/timer/timer.h create mode 100644 test/validation/timer/timer_main.c