2.0 init
authorSeungbae Shin <seungbae.shin@samsung.com>
Tue, 21 Aug 2012 12:07:59 +0000 (21:07 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Tue, 21 Aug 2012 12:07:59 +0000 (21:07 +0900)
26 files changed:
TC/README.txt [new file with mode: 0644]
TC/_export_env.sh [new file with mode: 0755]
TC/_export_target_env.sh [new file with mode: 0755]
TC/build.sh [new file with mode: 0755]
TC/clean.sh [new file with mode: 0755]
TC/config.default [new file with mode: 0644]
TC/execute.sh [new file with mode: 0755]
TC/testcase/Makefile [new file with mode: 0755]
TC/testcase/test.wav [new file with mode: 0755]
TC/testcase/tslist [new file with mode: 0644]
TC/testcase/utc_wav_player.c [new file with mode: 0755]
TC/tet_scen [new file with mode: 0755]
TC/tetbuild.cfg [new file with mode: 0644]
TC/tetclean.cfg [new file with mode: 0644]
TC/tetexec.cfg [new file with mode: 0644]
capi-media-wav-player.pc.in [changed mode: 0755->0644]
debian/README [changed mode: 0755->0644]
debian/capi-media-wav-player-dev.install [changed mode: 0755->0644]
debian/capi-media-wav-player-dev.postinst [changed mode: 0755->0644]
debian/capi-media-wav-player.install [changed mode: 0755->0644]
debian/capi-media-wav-player.postinst [changed mode: 0755->0644]
debian/changelog [changed mode: 0755->0644]
debian/compat [changed mode: 0755->0644]
include/wav_player.h [changed mode: 0755->0644]
packaging/capi-media-wav-player.spec [changed mode: 0755->0644]
test/CMakeLists.txt [changed mode: 0755->0644]

diff --git a/TC/README.txt b/TC/README.txt
new file mode 100644 (file)
index 0000000..be8526e
--- /dev/null
@@ -0,0 +1 @@
+mediafile "testcase/test.wav"
diff --git a/TC/_export_env.sh b/TC/_export_env.sh
new file mode 100755 (executable)
index 0000000..72a11ec
--- /dev/null
@@ -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 (executable)
index 0000000..5ddaa53
--- /dev/null
@@ -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 (executable)
index 0000000..72aad6c
--- /dev/null
@@ -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 (executable)
index 0000000..29743e0
--- /dev/null
@@ -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 (file)
index 0000000..12ac1e2
--- /dev/null
@@ -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 (executable)
index 0000000..a4f6095
--- /dev/null
@@ -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 (executable)
index 0000000..dc0d3b1
--- /dev/null
@@ -0,0 +1,25 @@
+CC ?= gcc
+
+C_FILES = $(shell ls *.c)
+
+PKGS = capi-media-wav-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/test.wav b/TC/testcase/test.wav
new file mode 100755 (executable)
index 0000000..02fbe63
Binary files /dev/null and b/TC/testcase/test.wav differ
diff --git a/TC/testcase/tslist b/TC/testcase/tslist
new file mode 100644 (file)
index 0000000..a6629f2
--- /dev/null
@@ -0,0 +1 @@
+/testcase/utc_wav_player
diff --git a/TC/testcase/utc_wav_player.c b/TC/testcase/utc_wav_player.c
new file mode 100755 (executable)
index 0000000..ce23111
--- /dev/null
@@ -0,0 +1,261 @@
+/*
+* 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 <tet_api.h>
+#include <wav_player.h>
+#include <pthread.h>
+
+#define TESTFILE "./test.wav"
+
+
+#define API_NAME_WAVPL_START "wav_player_start_playing"
+#define API_NAME_WAVPL_STOP "wav_player_stop_playing"
+#define API_NAME_WAVPL_CALLBACK "wav_player_stop_callback"
+
+
+#define MY_ASSERT( fun , test , msg ) \
+{\
+       if( !test ) \
+               dts_fail(fun , msg ); \
+}              
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+
+
+struct
+{
+       int proc_result;
+       int proc_id;
+} glob;
+
+
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+// basic tests for start and stop of play
+static void utc_wav_player_start_p(void);
+static void utc_wav_player_start_n(void);
+static void utc_wav_player_stop_p(void);
+static void utc_wav_player_stop_n(void);
+
+static void utc_wav_player_callback_p(void);
+static void utc_wav_player_callback2_p(void);
+
+
+// more sophisticated tests for input parameters
+static void utc_wav_player_wrong_param_n(void);
+static void utc_wav_player_wrong_param2_n(void);
+static void utc_wav_player_wrong_param3_n(void);
+
+
+struct tet_testlist tet_testlist[] = {
+       { utc_wav_player_start_p , 1 },
+       { utc_wav_player_start_n , 2 },
+       { utc_wav_player_stop_p, 3 },
+       { utc_wav_player_stop_n, 4 },
+       { utc_wav_player_callback_p, 5 },
+       { utc_wav_player_callback2_p, 6 },      
+       { utc_wav_player_wrong_param_n, 7 },
+       { utc_wav_player_wrong_param2_n, 8 },
+       { utc_wav_player_wrong_param3_n, 9 },
+       { NULL, 0 },
+};
+
+
+static void startup(void)
+{
+       /* start of TC */
+}
+
+static void cleanup(void)
+{
+       /* end of TC */
+}
+
+
+
+//**********************************************************************/
+
+
+/**
+ * @brief all parameters fine, play music
+ */
+static void utc_wav_player_start_p(void)
+{
+       int ret;
+       ret = wav_player_start(TESTFILE, SOUND_TYPE_MEDIA, NULL, NULL, NULL);
+       dts_check_eq( API_NAME_WAVPL_START, ret, WAV_PLAYER_ERROR_NONE );
+}
+
+
+
+//**********************************************************************/
+
+
+
+/**
+ * @brief lack of sound file path
+ */
+static void utc_wav_player_start_n(void)
+{
+       int ret;
+       ret = wav_player_start(NULL, SOUND_TYPE_MEDIA, NULL, NULL, NULL);
+       dts_check_ne( API_NAME_WAVPL_START, ret, WAV_PLAYER_ERROR_NONE );
+}
+
+
+
+//**********************************************************************/
+
+
+
+/**
+ * @brief stop playing, all parameters fine
+ */
+static void utc_wav_player_stop_p(void)
+{
+       int ret;
+       int id;
+       ret = wav_player_start(TESTFILE, SOUND_TYPE_MEDIA, NULL, NULL, &id);
+       ret = wav_player_stop(id);
+       dts_check_eq( API_NAME_WAVPL_STOP, ret, WAV_PLAYER_ERROR_NONE );
+}
+
+
+
+//**********************************************************************/
+
+
+
+/**
+ * @brief stop playing, wrong id of playing process
+ */
+static void utc_wav_player_stop_n(void)
+{
+       int ret;
+       ret = wav_player_stop(-1);
+       dts_check_ne( API_NAME_WAVPL_STOP, ret, WAV_PLAYER_ERROR_NONE );
+}
+
+
+
+//**********************************************************************/
+
+
+//**********************************************************************/
+
+
+
+/**
+ * @brief wrong parameter: wrong file name
+ */
+static void utc_wav_player_wrong_param_n(void)
+{
+       int ret;
+       char file_name[100] = { '\0' };
+       snprintf( file_name, 100 ,  "%s", TESTFILE );
+       snprintf( file_name, 100 ,  "%s", "something" );
+       
+       ret = wav_player_start( file_name, SOUND_TYPE_MEDIA, NULL, NULL, NULL );
+       dts_check_ne( API_NAME_WAVPL_START, ret, WAV_PLAYER_ERROR_NONE );
+}
+
+
+
+
+//**********************************************************************/
+
+
+
+/**
+ * @brief wrong parameter: wrong media file type
+ */
+static void utc_wav_player_wrong_param2_n(void)
+{
+       int ret;
+
+       ret = wav_player_start( TESTFILE, SOUND_TYPE_CALL + 1, NULL, NULL, NULL );
+       dts_check_ne( API_NAME_WAVPL_START, ret, WAV_PLAYER_ERROR_NONE );
+}
+
+
+
+//**********************************************************************/
+
+
+
+/**
+ * @brief wrong parameter: wrong media file type
+ */
+static void utc_wav_player_wrong_param3_n(void)
+{
+       int ret;
+
+       ret = wav_player_start( TESTFILE, -1, NULL, NULL, NULL );
+       dts_check_ne( API_NAME_WAVPL_START, ret, WAV_PLAYER_ERROR_NONE );
+}
+
+
+//************************************************************************/
+
+void _playback_completed_cb(int id, void *user_data){
+       int *result = (int*)user_data;
+       *result = 1;
+}
+
+static void utc_wav_player_callback_p(void)
+{
+       int ret ;
+       int result = 0;
+       
+       ret = wav_player_start( TESTFILE, SOUND_TYPE_MEDIA, _playback_completed_cb, &result, NULL );    
+       sleep(6);
+       dts_check_eq( API_NAME_WAVPL_CALLBACK, result , 1 );
+       
+}
+
+//************************************************************************/
+
+void _playback_completed_cb2(int id, void *user_data){
+       int *result = (int*)user_data;
+       *result = id;
+}
+
+
+static void utc_wav_player_callback2_p(void){
+
+       int ret ;
+       int callback_id = 0;
+       int id;
+       
+       ret = wav_player_start( TESTFILE, SOUND_TYPE_MEDIA, _playback_completed_cb2, &callback_id, &id );       
+
+       sleep(6);
+       dts_check_eq( API_NAME_WAVPL_CALLBACK, callback_id , id );
+
+       
+}
diff --git a/TC/tet_scen b/TC/tet_scen
new file mode 100755 (executable)
index 0000000..03f029a
--- /dev/null
@@ -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 100644 (file)
index 0000000..f7eda55
--- /dev/null
@@ -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 (file)
index 0000000..02d7030
--- /dev/null
@@ -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 (file)
index 0000000..ef3e452
--- /dev/null
@@ -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 ?
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index d92403b..4d7b4f5
@@ -25,19 +25,87 @@ capi-media-wav-player (0.1.0-8) unstable; urgency=low
 capi-media-wav-player (0.1.0-7) unstable; urgency=low
 
   * update parameter check code
-  * Git: api/wav-player
+  * Git: slp/api/wav-player
   * Tag: capi-media-wav-player_0.1.0-7
 
- -- Seungkeun Lee <sngn.lee@samsung.com>  Wed, 21 Dec 2011 20:08:50 +0900
+ -- Seungkeun Lee <sngn.lee@samsung.com>  Wed, 21 Dec 2011 20:04:57 +0900
 
 capi-media-wav-player (0.1.0-6) unstable; urgency=low
 
-  * update version
+  * Update error none value
+  * Git: slp-source.sec.samsung.net:slp/api/wav-player
+  * Tag: capi-media-wav-player_0.1.0-6
+
+ -- Seungkeun Lee <sngn.lee@samsung.com>  Mon, 05 Dec 2011 11:11:04 +0900
+
+capi-media-wav-player (0.1.0-5) unstable; urgency=low
+
+  * Update log formatting
+  * Git: slp-source.sec.samsung.net:slp/api/wav-player
+  * Tag: capi-media-wav-player_0.1.0-5
+
+ -- Seungkeun Lee <sngn.lee@samsung.com>  Sun, 27 Nov 2011 14:24:24 +0900
+
+capi-media-wav-player (0.1.0-4) unstable; urgency=low
+
+  * Static analysis bug fix
+  * Git: slp-source.sec.samsung.net:slp/api/wav-player
+  * Tag: capi-media-wav-player_0.1.0-4
+
+ -- Seungkeun Lee <sngn.lee@samsung.com>  Fri, 25 Nov 2011 09:57:34 +0900
+
+capi-media-wav-player (0.1.0-3) unstable; urgency=low
+
+  * update namespace
+  * Git: slp-source.sec.samsung.net:slp/api/wav-player
+  * Tag: capi-media-wav-player_0.1.0-3
+
+ -- Seungkeun Lee <sngn.lee@samsung.com>  Wed, 23 Nov 2011 13:08:19 +0900
+
+capi-media-wav-player (0.1.0-2) unstable; urgency=low
+
+  * update complete callback signature
+  * Git: slp-source.sec.samsung.net:slp/api/wav-player
+  * Tag: capi-media-wav-player_0.1.0-2
+
+ -- Seungkeun Lee <sngn.lee@samsung.com>  Tue, 22 Nov 2011 08:50:29 +0900
+
+capi-media-wav-player (0.1.0-1) unstable; urgency=low
+
+  * SDK API Baseline
+  * Git: slp-source.sec.samsung.net:slp/api/wav-player
+  * Tag: capi-media-wav-player_0.1.0-1 
+
+ -- Seungkeun Lee <sngn.lee@samsung.com>  Tue, 27 Sep 2011 17:48:47 +0900
+
+capi-media-wav-player (0.0.1-4) unstable; urgency=low
+
+  * update wav_player_playback_completed_cb
+  * Git: slp-source.sec.samsung.net:slp/api/wav-player
+  * Tag: capi-media-wav-player_0.0.1-4
+
+ -- Seungkeun Lee <sngn.lee@samsung.com>  Thu, 22 Sep 2011 09:46:11 +0900
+
+capi-media-wav-player (0.0.1-3) unstable; urgency=low
+
+  * Update dependancy
+  * Git: slp-source.sec.samsung.net:slp/api/wav-player
+  * Tag: capi-media-wav-player_0.0.1-3
+
+ -- Seungkeun Lee <sngn.lee@samsung.com>  Mon, 29 Aug 2011 17:32:48 +0900
+
+capi-media-wav-player (0.0.1-2) unstable; urgency=low
+
+  * Update dependancy
+  * Git: slp-source.sec.samsung.net:slp/api/wav-player
+  * Tag: capi-media-wav-player_0.0.1-2 
 
- -- Seungkeun Lee <sngn.lee@samsung.com>  Thu, 15 Dec 2011 12:56:57 +0900
+ -- Seungkeun Lee <sngn.lee@samsung.com>  Mon, 29 Aug 2011 14:58:29 +0900
 
 capi-media-wav-player (0.0.1-1) unstable; urgency=low
 
-  * Initial release.
+  * Initial Upload
+  * Git: slp-source.sec.samsung.net:slp/api/wav-player
+  * Tag: capi-media-wav-player_0.0.1-1
 
- -- Seungkeun Lee <sngn.lee@samsung.com>  Wed, 07 Dec 2011 12:54:34 +0900
+ -- Seungkeun Lee <sngn.lee@samsung.com>  Thu, 04 Aug 2011 17:32:41 +0900
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 403129d..520f572
@@ -1,9 +1,10 @@
+#sbs-git:slp/api/wav-player capi-media-wav-player 0.1.0 8d904bb3bd0ca7fa01ebd8f4185e4b993d94c08d
 Name:       capi-media-wav-player
-Summary:    A wav player library in Tizen Native API
-Version:    0.1.0
+Summary:    A wav player library in SLP C API
+Version: 0.1.0
 Release:    10
 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 wav player library in Tizen Native API (Development)
+Summary:  A wav player library in SLP C API (Development)
 Group:    TO_BE/FILLED_IN
 Requires: %{name} = %{version}-%{release}
 
old mode 100755 (executable)
new mode 100644 (file)