From: YoungHun Kim Date: Tue, 21 Aug 2012 11:58:44 +0000 (+0900) Subject: update latest X-Git-Tag: 2.0_alpha^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;p=platform%2Fcore%2Fapi%2Ftone-player.git update latest --- 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.default b/TC/config.default new file mode 100644 index 0000000..12ac1e2 --- /dev/null +++ b/TC/config.default @@ -0,0 +1,3 @@ +CAPI_PROJECT_ROOT=/home/abyss/capi +TET_INSTALL_HOST_PATH=/home/abyss/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..b8d0f74 --- /dev/null +++ b/TC/testcase/Makefile @@ -0,0 +1,25 @@ +CC ?= gcc + +C_FILES = $(shell ls *.c) + +PKGS = capi-media-tone-player dlog glib-2.0 + +LDFLAGS = `pkg-config --libs $(PKGS)` +LDFLAGS += $(TET_ROOT)/lib/tet3/tcm_s.o +LDFLAGS += -L$(TET_ROOT)/lib/tet3 -ltcm_s +LDFLAGS += -L$(TET_ROOT)/lib/tet3 -lapi_s + +CFLAGS = -I. `pkg-config --cflags $(PKGS)` +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 100644 index 0000000..0c3e41b --- /dev/null +++ b/TC/testcase/tslist @@ -0,0 +1 @@ +/testcase/utc_tone_player diff --git a/TC/testcase/utc_tone_player.c b/TC/testcase/utc_tone_player.c new file mode 100755 index 0000000..4f74251 --- /dev/null +++ b/TC/testcase/utc_tone_player.c @@ -0,0 +1,89 @@ +/* +* 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 + +#define MY_ASSERT( fun , test , msg ) \ +{\ + if( !test ) \ + dts_fail(fun , msg ); \ +} + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +static void startup(void); +static void cleanup(void); + +void (*tet_startup)(void) = startup; +void (*tet_cleanup)(void) = cleanup; + +static void utc_tone_player_start_p(void); +static void utc_tone_player_start_n(void); +static void utc_tone_player_stop_p(void); +static void utc_tone_player_stop_n(void); + +struct tet_testlist tet_testlist[] = { + { utc_tone_player_start_p , 1 }, + { utc_tone_player_start_n , 2 }, + { utc_tone_player_stop_p, 3 }, + { utc_tone_player_stop_n, 4 }, + { NULL, 0 }, +}; + +static void startup(void) +{ + /* start of TC */ +} + +static void cleanup(void) +{ + /* end of TC */ +} + +static void utc_tone_player_start_p(void){ + int ret; + ret = tone_player_start(TONE_TYPE_DEFAULT, SOUND_TYPE_MEDIA,1000, NULL); + MY_ASSERT(__func__, ret== TONE_PLAYER_ERROR_NONE , "tone_player_start fail"); + dts_pass(__func__, "PASS"); +} +static void utc_tone_player_start_n(void){ + int ret; + ret = tone_player_start(-1, SOUND_TYPE_MEDIA ,1000, NULL); + MY_ASSERT(__func__, ret != TONE_PLAYER_ERROR_NONE , " not allow null"); + dts_pass(__func__, "PASS"); +} +static void utc_tone_player_stop_p(void){ + int ret; + int id; + ret = tone_player_start(TONE_TYPE_DEFAULT, SOUND_TYPE_MEDIA,1000, &id); + ret = tone_player_stop(id); + MY_ASSERT(__func__, ret== TONE_PLAYER_ERROR_NONE , "tone_player_stop fail"); + dts_pass(__func__, "PASS"); +} +static void utc_tone_player_stop_n(void){ + int ret; + ret = tone_player_stop(-1); + MY_ASSERT(__func__, ret != TONE_PLAYER_ERROR_NONE , " not allow -1"); + dts_pass(__func__, "PASS"); + +} + 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/tet_xres b/TC/tet_xres new file mode 100644 index 0000000..a2e94c2 --- /dev/null +++ b/TC/tet_xres @@ -0,0 +1,21 @@ +15|0 3.7-lite 4|TCM Start +400|0 1 1 03:32:00|IC Start +200|0 1 03:32:00|TP Start +520|-1 1 00002484 1 1|20000207 03:32:00__[__type=CheckPass, api_name=utc_wav_player_start_p, file=(null)/utc_wav_player.c, func=utc_wav_player_start_p, line=48__]__ +220|0 1 0 03:32:00|PASS +410|0 1 1 03:32:00|IC End +400|0 2 1 03:32:00|IC Start +200|0 2 03:32:00|TP Start +520|-1 2 00002484 1 2|20000207 03:32:00__[__type=CheckPass, api_name=utc_wav_player_start_n, file=(null)/utc_wav_player.c, func=utc_wav_player_start_n, line=54__]__ +220|0 2 0 03:32:00|PASS +410|0 2 1 03:32:00|IC End +400|0 3 1 03:32:00|IC Start +200|0 3 03:32:00|TP Start +520|-1 3 00002484 1 3|20000207 03:32:00__[__type=CheckPass, api_name=utc_wav_player_stop_p, file=(null)/utc_wav_player.c, func=utc_wav_player_stop_p, line=62__]__ +220|0 3 0 03:32:00|PASS +410|0 3 1 03:32:00|IC End +400|0 4 1 03:32:00|IC Start +200|0 4 03:32:00|TP Start +520|-1 4 00002484 1 4|20000207 03:32:00__[__type=CheckPass, api_name=utc_wav_player_stop_n, file=(null)/utc_wav_player.c, func=utc_wav_player_stop_n, line=68__]__ +220|0 4 0 03:32:00|PASS +410|0 4 1 03:32:00|IC End diff --git a/TC/tetbuild.cfg b/TC/tetbuild.cfg new file mode 100644 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 100644 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 100644 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/capi-media-tone-player.pc.in b/capi-media-tone-player.pc.in old mode 100755 new mode 100644 diff --git a/debian/README b/debian/README old mode 100755 new mode 100644 diff --git a/debian/capi-media-tone-player-dev.install b/debian/capi-media-tone-player-dev.install old mode 100755 new mode 100644 diff --git a/debian/capi-media-tone-player-dev.postinst b/debian/capi-media-tone-player-dev.postinst old mode 100755 new mode 100644 diff --git a/debian/capi-media-tone-player.install b/debian/capi-media-tone-player.install old mode 100755 new mode 100644 diff --git a/debian/capi-media-tone-player.postinst b/debian/capi-media-tone-player.postinst old mode 100755 new mode 100644 diff --git a/debian/changelog b/debian/changelog old mode 100755 new mode 100644 index 7808f50..faa7bd7 --- a/debian/changelog +++ b/debian/changelog @@ -32,6 +32,56 @@ capi-media-tone-player (0.1.0-6) unstable; urgency=low capi-media-tone-player (0.1.0-5) unstable; urgency=low - * Initial release. + * Update error none value + * Git: slp-source.sec.samsung.net:slp/api/tone-player + * Tag: capi-media-tone-player_0.1.0-5 + + -- Seungkeun Lee Mon, 05 Dec 2011 11:06:33 +0900 + +capi-media-tone-player (0.1.0-4) unstable; urgency=low + + * Update Log formatting + * Git: slp-source.sec.samsung.net:slp/api/tone-player + * Tag: capi-media-tone-player_0.1.0-4 + + -- Seungkeun Lee Sun, 27 Nov 2011 14:17:12 +0900 + +capi-media-tone-player (0.1.0-3) unstable; urgency=low + + * update namespace + * Git: slp-source.sec.samsung.net:slp/api/tone-player + * Tag: capi-media-tone-player_0.1.0-3 + + -- Seungkeun Lee Wed, 23 Nov 2011 13:17:03 +0900 + +capi-media-tone-player (0.1.0-2) unstable; urgency=low + + * add tone type + * Git: slp-source.sec.samsung.net:slp/api/tone-player + * Tag: capi-media-tone-player_0.1.0-2 + + -- Seungkeun Lee Wed, 02 Nov 2011 17:00:07 +0900 + +capi-media-tone-player (0.1.0-1) unstable; urgency=low + + * SLP API Baseline + * Git: slp-source.sec.samsung.net:slp/api/tone-player + * Tag: capi-media-tone-player_0.1.0-1 + + -- Seungkeun Lee Tue, 27 Sep 2011 17:55:13 +0900 + +capi-media-tone-player (0.0.1-2) unstable; urgency=low + + * Update dependancy + * Git: slp-source.sec.samsung.net:slp/api/tone-player + * Tag: capi-media-tone-player_0.0.1-2 + + -- Seungkeun Lee Mon, 29 Aug 2011 15:00:47 +0900 + +capi-media-tone-player (0.0.1-1) unstable; urgency=low + + * Initial Upload + * Git: slp-source.sec.samsung.net:slp/api/tone-player + * Tag: capi-media-tone-player_0.0.1-1 - -- Seungkeun Lee Wed, 07 Dec 2011 12:53:09 +0900 + -- Seungkeun Lee Thu, 04 Aug 2011 17:32:41 +0900 diff --git a/debian/compat b/debian/compat old mode 100755 new mode 100644 diff --git a/include/tone_player.h b/include/tone_player.h old mode 100755 new mode 100644 diff --git a/packaging/capi-media-tone-player.spec b/packaging/capi-media-tone-player.spec index 3a168d2..16c5899 100755 --- a/packaging/capi-media-tone-player.spec +++ b/packaging/capi-media-tone-player.spec @@ -1,9 +1,10 @@ +#sbs-git:slp/api/tone-player capi-media-tone-player 0.1.0 b0f7320c6e26c5aab7708be00e7f20d018e39262 Name: capi-media-tone-player -Summary: A tone player library in Tizen Native API -Version: 0.1.0 +Summary: A tone player library in SLP C API +Version: 0.1.0 Release: 9 Group: TO_BE/FILLED_IN -License: Apache-2.0 +License: TO BE FILLED IN Source0: %{name}-%{version}.tar.gz BuildRequires: cmake BuildRequires: pkgconfig(mm-sound) @@ -17,7 +18,7 @@ Requires(postun): /sbin/ldconfig %package devel -Summary: A tone player library in Tizen Native API (Development) +Summary: A tone player library in SLP C API (Development) Group: TO_BE/FILLED_IN Requires: %{name} = %{version}-%{release} diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt old mode 100755 new mode 100644