change the utests to haltests 15/177815/1
authorSooChan Lim <sc1.lim@samsung.com>
Fri, 4 May 2018 02:42:28 +0000 (11:42 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Fri, 4 May 2018 02:42:28 +0000 (11:42 +0900)
change all symbol and file name.

Change-Id: Ia4cfcbbcb41ead714f8fa7a0a00d42a54a1cb528

15 files changed:
Makefile.am
configure.ac
haltests/Makefile.am [new file with mode: 0644]
haltests/tc_main.cpp [moved from utests/ut_main.cpp with 100% similarity]
haltests/tc_tbm.h [moved from utests/ut_tbm.h with 100% similarity]
haltests/tc_tbm_backend.cpp [moved from utests/ut_tbm_backend.cpp with 99% similarity]
haltests/tc_tbm_bo.cpp [moved from utests/ut_tbm_bo.cpp with 99% similarity]
haltests/tc_tbm_bufmgr.cpp [moved from utests/ut_tbm_bufmgr.cpp with 99% similarity]
haltests/tc_tbm_env.cpp [moved from utests/ut_tbm_env.cpp with 98% similarity]
haltests/tc_tbm_log.cpp [moved from utests/ut_tbm_log.cpp with 70% similarity]
haltests/tc_tbm_surface.cpp [moved from utests/ut_tbm_surface.cpp with 99% similarity]
haltests/tc_tbm_surface_internal.cpp [moved from utests/ut_tbm_surface_internal.cpp with 99% similarity]
haltests/tc_tbm_surface_queue.cpp [moved from utests/ut_tbm_surface_queue.cpp with 99% similarity]
packaging/libtbm.spec
utests/Makefile.am [deleted file]

index f058365..d8b525d 100644 (file)
@@ -1,5 +1,5 @@
-if HAVE_UTEST
-SUBDIRS = src utests
+if HAVE_HALTESTS
+SUBDIRS = src haltests
 else
 SUBDIRS = src
 endif
index 88a4960..fc14ad5 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(utests, AS_HELP_STRING([--with-utests=yes/no], [whether build/run unit tests or not]),
-                               [ utests="$withval" ],
-                               [ utests="no" ])
+AC_ARG_WITH(haltests, AS_HELP_STRING([--with-haltests=yes/no], [whether build/run unit tests or not]),
+                               [ haltests="$withval" ],
+                               [ haltests="no" ])
 
-AM_CONDITIONAL(HAVE_UTEST, test "x$utests" = "xyes")
+AM_CONDITIONAL(HAVE_HALTESTS, test "x$haltests" = "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
-       utests/Makefile])
+       haltests/Makefile])
 
 echo ""
 echo "CFLAGS            : $CFLAGS"
diff --git a/haltests/Makefile.am b/haltests/Makefile.am
new file mode 100644 (file)
index 0000000..08f21a8
--- /dev/null
@@ -0,0 +1,28 @@
+bin_PROGRAMS = tbm-haltests
+
+tbm_haltests_SOURCES = \
+       tc_main.cpp \
+       tc_tbm_env.cpp \
+       tc_tbm_bufmgr.cpp \
+       tc_tbm_bo.cpp \
+       tc_tbm_surface.cpp \
+       tc_tbm_surface_internal.cpp \
+       tc_tbm_surface_queue.cpp \
+       tc_tbm_backend.cpp \
+       tc_tbm_log.cpp
+
+tbm_haltests_CXXFLAGS = \
+       @DLOG_CFLAGS@ \
+       ${CXXFLAGS} \
+       -I$(top_builddir)/src \
+       -I$(includedir)/gtest
+
+tbm_haltests_LDFLAGS = \
+       @DLOG_LIBS@ \
+       ${LDFLAGS} \
+       $(top_builddir)/src/libtbm.la \
+       -lgtest \
+       -pthread
+
+check:
+       ./tbm-haltests
similarity index 100%
rename from utests/ut_main.cpp
rename to haltests/tc_main.cpp
similarity index 100%
rename from utests/ut_tbm.h
rename to haltests/tc_tbm.h
similarity index 99%
rename from utests/ut_tbm_backend.cpp
rename to haltests/tc_tbm_backend.cpp
index 2bb6fd7..8e7340f 100644 (file)
@@ -26,7 +26,7 @@
  *
 **************************************************************************/
 
-#include "ut_tbm.h"
+#include "tc_tbm.h"
 
 #define UT_TBM_ITER_COUNT 100
 
similarity index 99%
rename from utests/ut_tbm_bo.cpp
rename to haltests/tc_tbm_bo.cpp
index 5cdf951..2e938da 100644 (file)
@@ -29,7 +29,7 @@
  *
 **************************************************************************/
 
-#include "ut_tbm.h"
+#include "tc_tbm.h"
 
 class TBMBo : public TBMBufmgr
 {
@@ -1031,7 +1031,7 @@ TEST_F(TBMBo, BoDeleteUserDataWithKeyParam)
 /* tbm_bo_set_user_data() */
 
 static void
-_ut_tbm_bo_user_data_free(void *user_data)
+_tc_tbm_bo_user_data_free(void *user_data)
 {
        int *i = (int *)user_data;
        *i = 1;
@@ -1048,7 +1048,7 @@ TEST_F(TBMBo, BoSetUserData)
        EXPECT_NE(bo, nullptr);
        EXPECT_STREQ(tbm_error_str(tbm_get_last_error()), tbm_error_str(TBM_ERROR_NONE));
 
-       ret = tbm_bo_add_user_data(bo, key, _ut_tbm_bo_user_data_free);
+       ret = tbm_bo_add_user_data(bo, key, _tc_tbm_bo_user_data_free);
        EXPECT_EQ(ret, 1);
        EXPECT_STREQ(tbm_error_str(tbm_get_last_error()), tbm_error_str(TBM_ERROR_NONE));
 
@@ -1103,7 +1103,7 @@ TEST_F(TBMBo, BoSetUserDataWithKeyParamTest)
        EXPECT_EQ(ret, 0);
        EXPECT_STREQ(tbm_error_str(tbm_get_last_error()), tbm_error_str(TBM_ERROR_INVALID_PARAMETER));
 
-       ret = tbm_bo_add_user_data(bo, key, _ut_tbm_bo_user_data_free);
+       ret = tbm_bo_add_user_data(bo, key, _tc_tbm_bo_user_data_free);
        EXPECT_EQ(ret, 1);
        EXPECT_STREQ(tbm_error_str(tbm_get_last_error()), tbm_error_str(TBM_ERROR_NONE));
 
@@ -1190,7 +1190,7 @@ TEST_F(TBMBo, BoGetUserDataWithKeyParamTest)
        EXPECT_EQ(ret, 0);
        EXPECT_STREQ(tbm_error_str(tbm_get_last_error()), tbm_error_str(TBM_ERROR_INVALID_PARAMETER));
 
-       ret = tbm_bo_add_user_data(bo, key, _ut_tbm_bo_user_data_free);
+       ret = tbm_bo_add_user_data(bo, key, _tc_tbm_bo_user_data_free);
        EXPECT_EQ(ret, 1);
        EXPECT_STREQ(tbm_error_str(tbm_get_last_error()), tbm_error_str(TBM_ERROR_NONE));
 
similarity index 99%
rename from utests/ut_tbm_bufmgr.cpp
rename to haltests/tc_tbm_bufmgr.cpp
index c065415..19ea7b5 100644 (file)
@@ -28,7 +28,7 @@
  *
 **************************************************************************/
 
-#include "ut_tbm.h"
+#include "tc_tbm.h"
 
 /* TODO::
  * 1. Test When there is no bufmgr.
similarity index 98%
rename from utests/ut_tbm_env.cpp
rename to haltests/tc_tbm_env.cpp
index 4d41cb8..024ae72 100644 (file)
@@ -28,7 +28,7 @@
  *
 **************************************************************************/
 
-#include "ut_tbm.h"
+#include "tc_tbm.h"
 
 void TBMEnv::SetUp(void)
 {
similarity index 70%
rename from utests/ut_tbm_log.cpp
rename to haltests/tc_tbm_log.cpp
index 3bc2227..684fda2 100644 (file)
@@ -29,7 +29,7 @@
  *
 **************************************************************************/
 
-#include "ut_tbm.h"
+#include "tc_tbm.h"
 
 TEST(TBMLog, logPrintf)
 {
@@ -37,10 +37,10 @@ TEST(TBMLog, logPrintf)
        tbm_log_enable_dlog(0);
        tbm_log_set_debug_level(2);
        tbm_log_set_path("/tmp/tbm.log");
-       tbm_log_print(TBM_LOG_LEVEL_ERR, "utest\n");
-       tbm_log_print(TBM_LOG_LEVEL_WRN, "utest\n");
-       tbm_log_print(TBM_LOG_LEVEL_INFO, "utest\n");
-       tbm_log_print(TBM_LOG_LEVEL_DBG, "utest\n");
+       tbm_log_print(TBM_LOG_LEVEL_ERR, "haltest\n");
+       tbm_log_print(TBM_LOG_LEVEL_WRN, "haltest\n");
+       tbm_log_print(TBM_LOG_LEVEL_INFO, "haltest\n");
+       tbm_log_print(TBM_LOG_LEVEL_DBG, "haltest\n");
        tbm_log_set_path(NULL);
 }
 
@@ -57,34 +57,34 @@ TEST(TBMLog, logDlogNone)
        tbm_log_enable_color(0);
        tbm_log_enable_dlog(1);
        tbm_log_set_debug_level(0);
-       tbm_log_print(TBM_LOG_LEVEL_ERR, "utest");
-       tbm_log_print(TBM_LOG_LEVEL_WRN, "utest");
-       tbm_log_print(TBM_LOG_LEVEL_INFO, "utest");
-       tbm_log_print(TBM_LOG_LEVEL_DBG, "utest");
+       tbm_log_print(TBM_LOG_LEVEL_ERR, "haltest");
+       tbm_log_print(TBM_LOG_LEVEL_WRN, "haltest");
+       tbm_log_print(TBM_LOG_LEVEL_INFO, "haltest");
+       tbm_log_print(TBM_LOG_LEVEL_DBG, "haltest");
 }
 
 TEST(TBMLog, logDlog)
 {
        tbm_log_enable_dlog(1);
-       tbm_log_print(TBM_LOG_LEVEL_ERR, "utest");
-       tbm_log_print(TBM_LOG_LEVEL_WRN, "utest");
-       tbm_log_print(TBM_LOG_LEVEL_INFO, "utest");
-       tbm_log_print(TBM_LOG_LEVEL_DBG, "utest");
+       tbm_log_print(TBM_LOG_LEVEL_ERR, "haltest");
+       tbm_log_print(TBM_LOG_LEVEL_WRN, "haltest");
+       tbm_log_print(TBM_LOG_LEVEL_INFO, "haltest");
+       tbm_log_print(TBM_LOG_LEVEL_DBG, "haltest");
 }
 
 TEST(TBMLog, logDlogNormal)
 {
        tbm_log_enable_dlog(1);
-       tbm_log_print(TBM_LOG_LEVEL_ERR, "utest");
-       tbm_log_print(TBM_LOG_LEVEL_WRN, "utest");
-       tbm_log_print(TBM_LOG_LEVEL_INFO, "utest");
-       tbm_log_print(TBM_LOG_LEVEL_DBG, "utest");
+       tbm_log_print(TBM_LOG_LEVEL_ERR, "haltest");
+       tbm_log_print(TBM_LOG_LEVEL_WRN, "haltest");
+       tbm_log_print(TBM_LOG_LEVEL_INFO, "haltest");
+       tbm_log_print(TBM_LOG_LEVEL_DBG, "haltest");
 }
 
 TEST(TBMLog, logDlogUnknownLevel)
 {
        tbm_log_enable_dlog(1);
-       tbm_log_print(UT_TBM_INVALID_VALUE, "utest");
+       tbm_log_print(UT_TBM_INVALID_VALUE, "haltest");
 }
 
 TEST(TBMLog, logSetAssertLevel)
@@ -98,8 +98,8 @@ TEST(TBMLog, logSetAssertLevel)
 
 TEST(TBMLog, logPrintStdout)
 {
-       tbm_log_print_stdout(TBM_LOG_LEVEL_ERR, "utest");
-       tbm_log_print_stdout(TBM_LOG_LEVEL_WRN, "utest");
-       tbm_log_print_stdout(TBM_LOG_LEVEL_INFO, "utest");
-       tbm_log_print_stdout(TBM_LOG_LEVEL_DBG, "utest");
+       tbm_log_print_stdout(TBM_LOG_LEVEL_ERR, "haltest");
+       tbm_log_print_stdout(TBM_LOG_LEVEL_WRN, "haltest");
+       tbm_log_print_stdout(TBM_LOG_LEVEL_INFO, "haltest");
+       tbm_log_print_stdout(TBM_LOG_LEVEL_DBG, "haltest");
 }
\ No newline at end of file
similarity index 99%
rename from utests/ut_tbm_surface.cpp
rename to haltests/tc_tbm_surface.cpp
index 9ea2a31..6c75858 100644 (file)
@@ -28,7 +28,7 @@
  *
 **************************************************************************/
 
-#include "ut_tbm.h"
+#include "tc_tbm.h"
 
 /* The tbm_surface.h contains the public APIs. Therefore, the error values has TBM_SURFACE_ prefix,
  * but the values of the TBM_SURFACE_ prefix error types has the same vaules as TBM_ERROR_ prefix types.
similarity index 99%
rename from utests/ut_tbm_surface_internal.cpp
rename to haltests/tc_tbm_surface_internal.cpp
index da12fe5..a3a27ec 100644 (file)
@@ -28,7 +28,7 @@
  *
 **************************************************************************/
 
-#include "ut_tbm.h"
+#include "tc_tbm.h"
 
 class TBMSurfaceInternal : public TBMBufmgr
 {
similarity index 99%
rename from utests/ut_tbm_surface_queue.cpp
rename to haltests/tc_tbm_surface_queue.cpp
index 0a664cd..782f15a 100644 (file)
@@ -29,7 +29,7 @@
  *
 **************************************************************************/
 
-#include "ut_tbm.h"
+#include "tc_tbm.h"
 class TBMSurfaceQueue : public TBMBufmgr
 {
 protected:
index 5be680c..2a09e1b 100644 (file)
@@ -1,7 +1,7 @@
 %bcond_with x
 %bcond_with wayland
-%define UTEST_PACKAGE 1
-%define UTEST_GCOV    0
+%define HALTESTS_PACKAGE 1
+%define HALTESTS_GCOV    0
 
 Name:           libtbm
 Version:        2.13.1
@@ -19,7 +19,7 @@ BuildRequires:  pkgconfig(capi-base-common)
 BuildRequires:  pkgconfig(libpng)
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(pixman-1)
-BuildRequires:  gtest-devel 
+BuildRequires:  gtest-devel
 
 %description
 Description: %{summary}
@@ -35,7 +35,7 @@ The library for Tizen Buffer Manager.
 
 Development Files.
 
-%if "%{UTEST_PACKAGE}" == "1"
+%if "%{HALTESTS_PACKAGE}" == "1"
 %package haltests
 Summary: Tizen Buffer Manager unit tests package
 Group: System/Libraries
@@ -51,23 +51,23 @@ Test module for testing libtbm APIs
 cp %{SOURCE1001} .
 
 %build
-UTEST="no"
+HALTESTS="no"
 
-%if "%{UTEST_PACKAGE}" == "1"
-UTEST="yes"
+%if "%{HALTESTS_PACKAGE}" == "1"
+HALTESTS="yes"
 %endif
 
-%if "%{UTEST_GCOV}" == "1"
+%if "%{HALTESTS_GCOV}" == "1"
 CFLAGS+=" -fprofile-arcs -ftest-coverage -DTIZEN_TEST_GCOV"
 CXXFLAGS+=" -fprofile-arcs -ftest-coverage -DTIZEN_TEST_GCOV"
 LDFLAGS+=" -lgcov"
 %endif
 
 %if %{with wayland}
-%reconfigure --prefix=%{_prefix} --with-tbm-platform=WAYLAND  --with-utests=${UTEST} \
+%reconfigure --prefix=%{_prefix} --with-tbm-platform=WAYLAND  --with-haltests=${HALTESTS} \
             CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
 %else
-%reconfigure --prefix=%{_prefix} --with-tbm-platform=X11  --with-utests=${UTEST} \
+%reconfigure --prefix=%{_prefix} --with-tbm-platform=X11  --with-haltests=${HALTESTS} \
             CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
 %endif
 
@@ -120,8 +120,8 @@ rm -f %{_unitdir_user}/basic.target.wants/tbm-drm-auth-user.path
 %{_libdir}/libtbm.so
 %{_libdir}/pkgconfig/libtbm.pc
 
-%if "%{UTEST_PACKAGE}" == "1"
+%if "%{HALTESTS_PACKAGE}" == "1"
 %files haltests
 %defattr(-,root,root,-)
-%{_bindir}/tbm-utests
+%{_bindir}/tbm-haltests
 %endif
diff --git a/utests/Makefile.am b/utests/Makefile.am
deleted file mode 100644 (file)
index 8da2182..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-bin_PROGRAMS = tbm-utests
-
-tbm_utests_SOURCES = \
-       ut_main.cpp \
-       ut_tbm_env.cpp \
-       ut_tbm_bufmgr.cpp \
-       ut_tbm_bo.cpp \
-       ut_tbm_surface.cpp \
-       ut_tbm_surface_internal.cpp \
-       ut_tbm_surface_queue.cpp \
-       ut_tbm_backend.cpp \
-       ut_tbm_log.cpp
-
-tbm_utests_CXXFLAGS = \
-       @DLOG_CFLAGS@ \
-       ${CXXFLAGS} \
-       -I$(top_builddir)/src \
-       -I$(includedir)/gtest
-
-tbm_utests_LDFLAGS = \
-       @DLOG_LIBS@ \
-       ${LDFLAGS} \
-       $(top_builddir)/src/libtbm.la \
-       -lgtest \
-       -pthread
-
-check:
-       ./tbm-utests