change all symbol and file name.
Change-Id: Ia4cfcbbcb41ead714f8fa7a0a00d42a54a1cb528
-if HAVE_UTEST
-SUBDIRS = src utests
+if HAVE_HALTESTS
+SUBDIRS = src haltests
else
SUBDIRS = src
endif
[ 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])
src/Makefile
Makefile
libtbm.pc
- utests/Makefile])
+ haltests/Makefile])
echo ""
echo "CFLAGS : $CFLAGS"
--- /dev/null
+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
*
**************************************************************************/
-#include "ut_tbm.h"
+#include "tc_tbm.h"
#define UT_TBM_ITER_COUNT 100
*
**************************************************************************/
-#include "ut_tbm.h"
+#include "tc_tbm.h"
class TBMBo : public TBMBufmgr
{
/* 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;
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));
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));
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));
*
**************************************************************************/
-#include "ut_tbm.h"
+#include "tc_tbm.h"
/* TODO::
* 1. Test When there is no bufmgr.
*
**************************************************************************/
-#include "ut_tbm.h"
+#include "tc_tbm.h"
void TBMEnv::SetUp(void)
{
*
**************************************************************************/
-#include "ut_tbm.h"
+#include "tc_tbm.h"
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);
}
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)
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
*
**************************************************************************/
-#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.
*
**************************************************************************/
-#include "ut_tbm.h"
+#include "tc_tbm.h"
class TBMSurfaceInternal : public TBMBufmgr
{
*
**************************************************************************/
-#include "ut_tbm.h"
+#include "tc_tbm.h"
class TBMSurfaceQueue : public TBMBufmgr
{
protected:
%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
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(pixman-1)
-BuildRequires: gtest-devel
+BuildRequires: gtest-devel
%description
Description: %{summary}
Development Files.
-%if "%{UTEST_PACKAGE}" == "1"
+%if "%{HALTESTS_PACKAGE}" == "1"
%package haltests
Summary: Tizen Buffer Manager unit tests package
Group: System/Libraries
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
%{_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
+++ /dev/null
-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