From d130edf25d890a3fd6585f5c7649f1be34413740 Mon Sep 17 00:00:00 2001 From: Seunghun Lee Date: Tue, 21 Aug 2012 21:18:29 +0900 Subject: Migrating the source code to RSA from private. --- TC/_export_env.sh | 8 + TC/_export_target_env.sh | 7 + TC/build.sh | 16 + TC/clean.sh | 11 + TC/config | 2 + TC/execute.sh | 15 + TC/testcase/Makefile | 26 ++ TC/testcase/tslist | 1 + .../utc_efl_util_set_notification_window_level.c | 367 +++++++++++++++++++++ TC/tet_scen | 7 + TC/tetbuild.cfg | 5 + TC/tetclean.cfg | 5 + TC/tetexec.cfg | 5 + debian/README | 0 debian/changelog | 41 ++- debian/compat | 0 packaging/capi-ui-efl-util.spec | 11 +- 17 files changed, 519 insertions(+), 8 deletions(-) create mode 100755 TC/_export_env.sh create mode 100755 TC/_export_target_env.sh create mode 100755 TC/build.sh create mode 100755 TC/clean.sh create mode 100755 TC/config create mode 100755 TC/execute.sh create mode 100755 TC/testcase/Makefile create mode 100755 TC/testcase/tslist create mode 100755 TC/testcase/utc_efl_util_set_notification_window_level.c create mode 100755 TC/tet_scen create mode 100755 TC/tetbuild.cfg create mode 100755 TC/tetclean.cfg create mode 100755 TC/tetexec.cfg mode change 100755 => 100644 debian/README mode change 100755 => 100644 debian/compat mode change 100755 => 100644 packaging/capi-ui-efl-util.spec diff --git a/TC/_export_env.sh b/TC/_export_env.sh new file mode 100755 index 0000000..72a11ec --- /dev/null +++ b/TC/_export_env.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +. ./config +export TET_INSTALL_PATH=$TET_INSTALL_HOST_PATH # tetware root path +export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target # tetware target path +export PATH=$TET_TARGET_PATH/bin:$PATH +export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH +export TET_ROOT=$TET_TARGET_PATH diff --git a/TC/_export_target_env.sh b/TC/_export_target_env.sh new file mode 100755 index 0000000..5ddaa53 --- /dev/null +++ b/TC/_export_target_env.sh @@ -0,0 +1,7 @@ +#!/bin/sh +. ./config +export TET_INSTALL_PATH=$TET_INSTALL_TARGET_PATH # path to path +export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target +export PATH=$TET_TARGET_PATH/bin:$PATH +export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH +export TET_ROOT=$TET_TARGET_PATH diff --git a/TC/build.sh b/TC/build.sh new file mode 100755 index 0000000..72aad6c --- /dev/null +++ b/TC/build.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +. ./_export_env.sh # setting environment variables + +export TET_SUITE_ROOT=`pwd` +FILE_NAME_EXTENSION=`date +%s` + +RESULT_DIR=results +HTML_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.html +JOURNAL_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.journal + +mkdir -p $RESULT_DIR + +tcc -c -p ./ +tcc -b -j $JOURNAL_RESULT -p ./ +grw -c 7 -f chtml -o $HTML_RESULT $JOURNAL_RESULT diff --git a/TC/clean.sh b/TC/clean.sh new file mode 100755 index 0000000..29743e0 --- /dev/null +++ b/TC/clean.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +. ./_export_env.sh # setting environment variables + +export TET_SUITE_ROOT=`pwd` +RESULT_DIR=results + +tcc -c -p ./ # executing tcc, with clean option (-c) +rm -r $RESULT_DIR +rm -r tet_tmp_dir +rm testcase/tet_captured diff --git a/TC/config b/TC/config new file mode 100755 index 0000000..1a8d731 --- /dev/null +++ b/TC/config @@ -0,0 +1,2 @@ +TET_INSTALL_HOST_PATH=/home/ilovefilm/TETware +TET_INSTALL_TARGET_PATH=/mnt/nfs/TETware diff --git a/TC/execute.sh b/TC/execute.sh new file mode 100755 index 0000000..a4f6095 --- /dev/null +++ b/TC/execute.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +. ./_export_target_env.sh # setting environment variables + +export TET_SUITE_ROOT=`pwd` +FILE_NAME_EXTENSION=`date +%s` + +RESULT_DIR=results +HTML_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.html +JOURNAL_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.journal + +mkdir -p $RESULT_DIR + +tcc -e -j $JOURNAL_RESULT -p ./ +grw -c 3 -f chtml -o $HTML_RESULT $JOURNAL_RESULT diff --git a/TC/testcase/Makefile b/TC/testcase/Makefile new file mode 100755 index 0000000..0d15f65 --- /dev/null +++ b/TC/testcase/Makefile @@ -0,0 +1,26 @@ +CC = gcc + +C_FILES = $(shell ls *.c) + +PKGS = capi-ui-efl-util elementary ecore-x ecore evas x11 dlog glib-2.0 + +LDFLAGS += $(TET_ROOT)/lib/tet3/tcm_s.o +LDFLAGS += -L$(TET_ROOT)/lib/tet3 -ltcm_s +LDFLAGS += -L$(TET_ROOT)/lib/tet3 -lapi_s +LDFLAGS += `pkg-config --libs $(PKGS)` + +CFLAGS += `pkg-config --cflags $(PKGS)` +CFLAGS += -I. +CFLAGS += -I$(TET_ROOT)/inc/tet3 +CFLAGS += -Wall + +#TARGETS = $(C_FILES:%.c=tc-%) +TCS := $(shell ls -1 *.c | cut -d. -f1) + +all: $(TCS) + +%: %.c + $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) + +clean: + rm -f $(TCS) diff --git a/TC/testcase/tslist b/TC/testcase/tslist new file mode 100755 index 0000000..48142ea --- /dev/null +++ b/TC/testcase/tslist @@ -0,0 +1 @@ +/testcase/utc_efl_util_set_notification_window_level diff --git a/TC/testcase/utc_efl_util_set_notification_window_level.c b/TC/testcase/utc_efl_util_set_notification_window_level.c new file mode 100755 index 0000000..0c9ab66 --- /dev/null +++ b/TC/testcase/utc_efl_util_set_notification_window_level.c @@ -0,0 +1,367 @@ +/* + * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include + +#define API_SET_NOTIFICATION_WINDOW_LEVEL "efl_util_set_notification_window_level" +#define API_GET_NOTIFICATION_WINDOW_LEVEL "efl_util_get_notification_window_level" + + +static void startup(void); +static void cleanup(void); + +void (*tet_startup)(void) = startup; +void (*tet_cleanup)(void) = cleanup; + +static void utc_efl_util_set_notification_window_level_negative_1(void); +static void utc_efl_util_set_notification_window_level_negative_2(void); +static void utc_efl_util_set_notification_window_level_negative_3(void); + +static void utc_efl_util_get_notification_window_level_negative_1(void); +static void utc_efl_util_get_notification_window_level_negative_2(void); + +static void utc_efl_util_set_notification_window_level_positive_1(void); +static void utc_efl_util_set_notification_window_level_positive_2(void); + +static void utc_efl_util_get_notification_window_level_positive_1(void); +static void utc_efl_util_get_notification_window_level_positive_2(void); + + +struct tet_testlist tet_testlist[] = { + { utc_efl_util_set_notification_window_level_negative_1, 1 }, + { utc_efl_util_set_notification_window_level_negative_2, 1 }, + { utc_efl_util_set_notification_window_level_negative_3, 1 }, + { utc_efl_util_get_notification_window_level_negative_1, 1 }, + { utc_efl_util_get_notification_window_level_negative_2, 1 }, + { utc_efl_util_set_notification_window_level_positive_1, 1 }, + { utc_efl_util_set_notification_window_level_positive_2, 1 }, + { utc_efl_util_get_notification_window_level_positive_1, 1 }, + { utc_efl_util_get_notification_window_level_positive_2, 1 }, + { NULL, 0 }, +}; + + +static void startup(void) +{ + /* start of TC */ + elm_init(0, NULL); +} + + +static void cleanup(void) +{ + /* end of TC */ + elm_shutdown(); +} + + +static void win_del(void *data, Evas_Object *obj, void *event) +{ + elm_exit(); +} + + +static Evas_Object* create_normal_win(const char *name) +{ + Evas_Object *eo; + + eo = elm_win_add(NULL, name, ELM_WIN_BASIC); + if (eo) + { + elm_win_title_set(eo, name); + elm_win_borderless_set(eo, EINA_TRUE); + evas_object_smart_callback_add(eo, "delete,request", + win_del, NULL); + elm_win_indicator_state_set(eo, EINA_TRUE); + } + + return eo; +} + + +static Evas_Object* create_notification_win(const char *name) +{ + Evas_Object *eo; + + eo = elm_win_add(NULL, name, ELM_WIN_NOTIFICATION); + if (eo) + { + elm_win_title_set(eo, name); + elm_win_borderless_set(eo, EINA_TRUE); + evas_object_smart_callback_add(eo, "delete,request", + win_del, NULL); + elm_win_indicator_state_set(eo, EINA_TRUE); + } + + return eo; +} + + +/** + * @brief Negative test case of efl_util_set_notification_window_level() + */ +static void utc_efl_util_set_notification_window_level_negative_1(void) +{ + int ret; + + ret = efl_util_set_notification_window_level(NULL, EFL_UTIL_NOTIFICATION_LEVEL_2); + + if (ret == EFL_UTIL_ERROR_INVALID_PARAMETER) + { + dts_pass(API_SET_NOTIFICATION_WINDOW_LEVEL, "passed"); + } + else + { + dts_fail(API_SET_NOTIFICATION_WINDOW_LEVEL, "failed"); + } +} + + +/** + * @brief Negative test case of efl_util_set_notification_window_level() + */ +static void utc_efl_util_set_notification_window_level_negative_2(void) +{ + Evas_Object *win; + int ret; + + win = create_normal_win("Normal window"); + if (!win) + { + dts_fail(API_SET_NOTIFICATION_WINDOW_LEVEL, "failed to create window"); + } + + ret = efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_2); + + if (ret == EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE) + { + dts_pass(API_SET_NOTIFICATION_WINDOW_LEVEL, "passed"); + } + else + { + dts_fail(API_SET_NOTIFICATION_WINDOW_LEVEL, "failed"); + } +} + + +/** + * @brief Negative test case of efl_util_set_notification_window_level() + */ +static void utc_efl_util_set_notification_window_level_negative_3(void) +{ + Evas_Object *win; + int ret; + + win = create_notification_win("Notification Type Window"); + if (!win) + { + dts_fail(API_SET_NOTIFICATION_WINDOW_LEVEL, "failed to create window"); + } + + ret = efl_util_set_notification_window_level(win, 100); + + if (ret == EFL_UTIL_ERROR_INVALID_PARAMETER) + { + dts_pass(API_SET_NOTIFICATION_WINDOW_LEVEL, "passed"); + } + else + { + dts_fail(API_SET_NOTIFICATION_WINDOW_LEVEL, "failed"); + } +} + + +/** + * @brief Negative test case of efl_util_set_notification_window_level() + */ +static void utc_efl_util_get_notification_window_level_negative_1(void) +{ + int ret; + int level; + + ret = efl_util_get_notification_window_level(NULL, &level); + + if (ret == EFL_UTIL_ERROR_INVALID_PARAMETER) + { + dts_pass(API_GET_NOTIFICATION_WINDOW_LEVEL, "passed"); + } + else + { + dts_fail(API_GET_NOTIFICATION_WINDOW_LEVEL, "failed"); + } +} + + +/** + * @brief Negative test case of efl_util_set_notification_window_level() + */ +static void utc_efl_util_get_notification_window_level_negative_2(void) +{ + Evas_Object *win; + int ret; + int level; + + win = create_normal_win("Normal Type Window"); + if (!win) + { + dts_fail(API_GET_NOTIFICATION_WINDOW_LEVEL, "failed to create window"); + } + + ret = efl_util_get_notification_window_level(win, &level); + + if (ret == EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE) + { + dts_pass(API_GET_NOTIFICATION_WINDOW_LEVEL, "passed"); + } + else + { + dts_fail(API_GET_NOTIFICATION_WINDOW_LEVEL, "failed"); + } +} + + +/** + * @brief Positive test case of efl_util_set_notification_window_level() + */ +static void utc_efl_util_set_notification_window_level_positive_1(void) +{ + Evas_Object *win; + int ret; + + win = create_notification_win("Notification Type Window"); + if (!win) + { + dts_fail(API_SET_NOTIFICATION_WINDOW_LEVEL, "failed to create window"); + } + + ret = efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_1); + + if (ret == EFL_UTIL_ERROR_NONE) + { + dts_pass(API_SET_NOTIFICATION_WINDOW_LEVEL, "passed"); + } + else + { + dts_fail(API_SET_NOTIFICATION_WINDOW_LEVEL, "failed"); + } +} + + +/** + * @brief Positive test case of efl_util_set_notification_window_level() + */ +static void utc_efl_util_set_notification_window_level_positive_2(void) +{ + Evas_Object *win; + int ret1, ret2; + + win = create_notification_win("Notification Type Window"); + if (!win) + { + dts_fail(API_SET_NOTIFICATION_WINDOW_LEVEL, "failed to create window"); + } + + ret1 = efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_1); + ret2 = efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_2); + + if (ret2 == EFL_UTIL_ERROR_NONE) + { + dts_pass(API_SET_NOTIFICATION_WINDOW_LEVEL, "passed"); + } + else + { + dts_fail(API_SET_NOTIFICATION_WINDOW_LEVEL, "failed"); + } +} + + +/** + * @brief Positive test case of efl_util_set_notification_window_level() + */ +static void utc_efl_util_get_notification_window_level_positive_1(void) +{ + Evas_Object *win; + int ret; + int level; + + win = create_notification_win("Notification Type Window"); + if (!win) + { + dts_fail(API_GET_NOTIFICATION_WINDOW_LEVEL, "failed to create window"); + } + efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_1); + + level = -1; + ret = efl_util_get_notification_window_level(win, &level); + + if (ret == EFL_UTIL_ERROR_NONE) + { + if (level == EFL_UTIL_NOTIFICATION_LEVEL_1) + { + dts_pass(API_GET_NOTIFICATION_WINDOW_LEVEL, "passed"); + } + else + { + dts_fail(API_GET_NOTIFICATION_WINDOW_LEVEL, "failed - level is wrong"); + } + } + else + { + dts_fail(API_GET_NOTIFICATION_WINDOW_LEVEL, "failed - return value is wrong"); + } +} + + +/** + * @brief Positive test case of efl_util_set_notification_window_level() + */ +static void utc_efl_util_get_notification_window_level_positive_2(void) +{ + Evas_Object *win; + int ret; + int level; + + win = create_notification_win("Notification Type Window"); + if (!win) + { + dts_fail(API_GET_NOTIFICATION_WINDOW_LEVEL, "failed to create window"); + } + efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_1); + efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_2); + + level = -1; + ret = efl_util_get_notification_window_level(win, &level); + + if (ret == EFL_UTIL_ERROR_NONE) + { + if (level == EFL_UTIL_NOTIFICATION_LEVEL_2) + { + dts_pass(API_GET_NOTIFICATION_WINDOW_LEVEL, "passed"); + } + else + { + dts_fail(API_GET_NOTIFICATION_WINDOW_LEVEL, "failed - level is wrong"); + } + } + else + { + dts_fail(API_GET_NOTIFICATION_WINDOW_LEVEL, "failed - return value is wrong"); + } +} + diff --git a/TC/tet_scen b/TC/tet_scen new file mode 100755 index 0000000..03f029a --- /dev/null +++ b/TC/tet_scen @@ -0,0 +1,7 @@ +all + ^TEST +##### Scenarios for TEST ##### + +# Test scenario +TEST + :include:/testcase/tslist diff --git a/TC/tetbuild.cfg b/TC/tetbuild.cfg new file mode 100755 index 0000000..f7eda55 --- /dev/null +++ b/TC/tetbuild.cfg @@ -0,0 +1,5 @@ +TET_OUTPUT_CAPTURE=True # capture option for build operation checking +TET_BUILD_TOOL=make # build with using make command +TET_BUILD_FILE=-f Makefile # execution file (Makefile) for build +TET_API_COMPLIANT=True # use TET API in Test Case ? +TET_PASS_TC_NAME=True # report passed TC name in Journal file? diff --git a/TC/tetclean.cfg b/TC/tetclean.cfg new file mode 100755 index 0000000..02d7030 --- /dev/null +++ b/TC/tetclean.cfg @@ -0,0 +1,5 @@ +TET_OUTPUT_CAPTURE=True # capture option +TET_CLEAN_TOOL= make clean # clean tool +TET_CLEAN_FILE= Makefile # file for clean +TET_API_COMPLIANT=True # TET API useage +TET_PASS_TC_NAME=True # showing name , passed TC diff --git a/TC/tetexec.cfg b/TC/tetexec.cfg new file mode 100755 index 0000000..ef3e452 --- /dev/null +++ b/TC/tetexec.cfg @@ -0,0 +1,5 @@ +TET_OUTPUT_CAPTURE=True # capturing execution or not +TET_EXEC_TOOL= # ex) exec : execution tool set up/ Optional +TET_EXEC_FILE= # ex) exectool : execution file/ Optional +TET_API_COMPLIANT=True # Test case or Tool usesTET API? +TET_PASS_TC_NAME=True # showing Passed TC name ? diff --git a/debian/README b/debian/README old mode 100755 new mode 100644 diff --git a/debian/changelog b/debian/changelog index cde9501..e64298c 100755 --- a/debian/changelog +++ b/debian/changelog @@ -1,13 +1,48 @@ capi-ui-efl-util (0.1.0-5) unstable; urgency=low * Added version numbering - * Git: api/efl-util + * Git: slp/api/efl-util * Tag: capi-ui-efl-util_0.1.0-5 -- Kyuhun Jung Wed, 15 Feb 2012 10:50:29 +0900 capi-ui-efl-util (0.1.0-4) unstable; urgency=low - * Initial release. + * Update boilerplate + * Git: slp/api/efl-util + * Tag: capi-ui-efl-util_0.1.0-4 + + -- Kyuhun Jung Tue, 06 Dec 2011 12:57:25 +0300 + +capi-ui-efl-util (0.1.0-3) unstable; urgency=low + + * Using Tizen namespace + * Git: slp-source.sec.samsung.net:slp/api/efl-util + * Tag: capi-ui-efl-util_0.1.0-3 + + -- Kyuhun Jung Wed, 23 Nov 2011 06:59:55 +0300 + +capi-ui-efl-util (0.1.0-2) unstable; urgency=low + + * Implement getter API + * Git: slp-source.sec.samsung.net:slp/api/efl-util + * Tag: capi-ui-efl-util_0.1.0-2 + + -- Kyuhun Jung Mon, 10 Oct 2011 12:42:46 +0300 + +capi-ui-efl-util (0.1.0-1) unstable; urgency=low + + * Alpha release + * Git: slp-source.sec.samsung.net:slp/api/efl-util + * Tag: capi-ui-efl-util_0.1.0-1 + + -- Kyuhun Jung Tue, 27 Sep 2011 21:11:54 +0900 + +capi-ui-efl-util (0.0.1-1) unstable; urgency=low + + * Initial upload + * Git: slp-source.sec.samsung.net:slp/api/efl-util + * Tag: capi-ui-efl-util_0.0.1-1 + + -- Kyuhun Jung Mon, 26 Sep 2011 19:14:07 +0900 - -- Kyuhun Jung Wed, 07 Dec 2011 05:37:04 +0300 diff --git a/debian/compat b/debian/compat old mode 100755 new mode 100644 diff --git a/packaging/capi-ui-efl-util.spec b/packaging/capi-ui-efl-util.spec old mode 100755 new mode 100644 index 290e7b3..e559fef --- a/packaging/capi-ui-efl-util.spec +++ b/packaging/capi-ui-efl-util.spec @@ -1,9 +1,10 @@ +#sbs-git:slp/api/efl-util capi-ui-efl-util 0.1.0 4d35c6180088e0d005081bf798ab6a20b05e9f14 Name: capi-ui-efl-util -Summary: An EFL utility library in Tizen Native API -Version: 0.1.0 -Release: 5 +Summary: An EFL utility library in SLP C API +Version: 0.1.0 +Release: 1 Group: TO_BE/FILLED_IN -License: Apache-2.0 +License: TO BE FILLED IN Source0: %{name}-%{version}.tar.gz BuildRequires: cmake BuildRequires: pkgconfig(dlog) @@ -18,7 +19,7 @@ Requires(postun): /sbin/ldconfig %package devel -Summary: An EFL utility library in Tizen Native API (Development) +Summary: An EFL utility library in SLP C API (Development) Group: TO_BE/FILLED_IN Requires: %{name} = %{version}-%{release} -- cgit v1.2.3