utest: rename the ut to the utests 90/158290/1
authorSooChan Lim <sc1.lim@samsung.com>
Tue, 31 Oct 2017 00:44:48 +0000 (09:44 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Tue, 31 Oct 2017 00:47:12 +0000 (09:47 +0900)
Change-Id: I23f1191421ad9897870ab15781e779ed5719cd00

16 files changed:
Makefile.am
configure.ac
packaging/libtbm.spec
utests/Makefile.am [moved from ut/Makefile.am with 94% similarity]
utests/src/main_tests.cpp [moved from ut/src/main_tests.cpp with 100% similarity]
utests/src/ut_tbm_bufmgr.cpp [moved from ut/src/ut_tbm_bufmgr.cpp with 100% similarity]
utests/src/ut_tbm_bufmgr.h [moved from ut/src/ut_tbm_bufmgr.h with 100% similarity]
utests/src/ut_tbm_bufmgr_backend.cpp [moved from ut/src/ut_tbm_bufmgr_backend.cpp with 100% similarity]
utests/src/ut_tbm_surface.cpp [moved from ut/src/ut_tbm_surface.cpp with 100% similarity]
utests/src/ut_tbm_surface_internal.cpp [moved from ut/src/ut_tbm_surface_internal.cpp with 100% similarity]
utests/src/ut_tbm_surface_queue.cpp [moved from ut/src/ut_tbm_surface_queue.cpp with 100% similarity]
utests/stubs/pthread_stubs.cpp [moved from ut/stubs/pthread_stubs.cpp with 100% similarity]
utests/stubs/pthread_stubs.h [moved from ut/stubs/pthread_stubs.h with 100% similarity]
utests/stubs/stdlib_stubs.cpp [moved from ut/stubs/stdlib_stubs.cpp with 100% similarity]
utests/stubs/stdlib_stubs.h [moved from ut/stubs/stdlib_stubs.h with 100% similarity]
utests/stubs/tbm_bufmgr_stubs.h [moved from ut/stubs/tbm_bufmgr_stubs.h with 100% similarity]

index feda427..ff28ee4 100644 (file)
@@ -1,6 +1,6 @@
 
 if HAVE_UTEST
-SUBDIRS = src ut
+SUBDIRS = src utests
 else
 SUBDIRS = src
 endif
index 7d6de1a..88a4960 100644 (file)
@@ -51,11 +51,11 @@ AC_ARG_WITH(bufmgr-module-path, AS_HELP_STRING([--with-bufmgr-module-path=PATH],
                                [ BUFMGR_MODULE_PATH="$withval" ],
                                [ BUFMGR_MODULE_PATH="${DEFAULT_BUFMGR_MODULE_PATH}" ])
 
-AC_ARG_WITH(utest, AS_HELP_STRING([--with-utest=yes/no], [whether build/run unit tests or not]),
-                               [ utest="$withval" ],
-                               [ utest="no" ])
+AC_ARG_WITH(utests, AS_HELP_STRING([--with-utests=yes/no], [whether build/run unit tests or not]),
+                               [ utests="$withval" ],
+                               [ utests="no" ])
 
-AM_CONDITIONAL(HAVE_UTEST, test "x$utest" = "xyes")
+AM_CONDITIONAL(HAVE_UTEST, test "x$utests" = "xyes")
 
 #AC_DEFINE(BUFMGR_MODULE_DIR, "${BUFMGR_MODULE_PATH}", [Directory for the modules of tbm_bufmgr])
 AC_DEFINE_UNQUOTED(BUFMGR_MODULE_DIR, "${BUFMGR_MODULE_PATH}", [Directory for the modules of tbm_bufmgr])
@@ -112,7 +112,7 @@ AC_OUTPUT([
    src/Makefile
        Makefile
        libtbm.pc
-       ut/Makefile])
+       utests/Makefile])
 
 echo ""
 echo "CFLAGS            : $CFLAGS"
index 715a562..70b478a 100644 (file)
@@ -1,6 +1,6 @@
 %bcond_with x
 %bcond_with wayland
-%bcond_with utest
+%define UTEST_PACKAGE 0
 
 Name:           libtbm
 Version:        2.1.7
@@ -34,7 +34,7 @@ The library for Tizen Buffer Manager.
 
 Development Files.
 
-%if %{with utest}
+%if "%{UTEST_PACKAGE}" == "1"
 %package utests
 Summary: Tizen Buffer Manager unit tests package
 Group: System/Libraries
@@ -52,15 +52,15 @@ cp %{SOURCE1001} .
 %build
 UTEST="no"
 
-%if %{with utest}
+%if "%{UTEST_PACKAGE}" == "1"
 UTEST="yes"
 %endif
 
 %if %{with wayland}
-%reconfigure --prefix=%{_prefix} --with-tbm-platform=WAYLAND  --with-utest=${UTEST} \
+%reconfigure --prefix=%{_prefix} --with-tbm-platform=WAYLAND  --with-utests=${UTEST} \
             CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
 %else
-%reconfigure --prefix=%{_prefix} --with-tbm-platform=X11  --with-utest=${UTEST} \
+%reconfigure --prefix=%{_prefix} --with-tbm-platform=X11  --with-utests=${UTEST} \
             CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
 %endif
 
@@ -108,8 +108,8 @@ rm -f %{_unitdir_user}/basic.target.wants/tbm-drm-auth-user.path
 %{_libdir}/libtbm.so
 %{_libdir}/pkgconfig/libtbm.pc
 
-%if %{with utest}
+%if "%{UTEST_PACKAGE}" == "1"
 %files utests
 %defattr(-,root,root,-)
-%{_bindir}/tbm_utests
+%{_bindir}/tbm-utests
 %endif
similarity index 94%
rename from ut/Makefile.am
rename to utests/Makefile.am
index 86bee9c..3eb74a2 100644 (file)
@@ -1,4 +1,4 @@
-bin_PROGRAMS = tbm_utests
+bin_PROGRAMS = tbm-utests
 
 tbm_utests_SOURCES = \
        src/main_tests.cpp \
@@ -33,4 +33,4 @@ tbm_utests_LDFLAGS = \
        --coverage
 
 check:
-       ./tbm_utests
+       ./tbm-utests