From: Jinkun Jang Date: Wed, 13 Mar 2013 00:16:05 +0000 (+0900) Subject: sync X-Git-Tag: 2.1b_release~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=337cbb3b7976f14fcd1838ef20d7a1d192e6eeaf;p=platform%2Fcore%2Fappfw%2Fapp-checker.git sync --- diff --git a/TC/build.sh b/TC/build.sh deleted file mode 100755 index e7a9432..0000000 --- a/TC/build.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -export TET_INSTALL_PATH=$HOME/git/tetware/TETware # local tetware 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 - -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 3 -f chtml -o $HTML_RESULT $JOURNAL_RESULT diff --git a/TC/execute.sh b/TC/execute.sh deleted file mode 100755 index a119011..0000000 --- a/TC/execute.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -export TET_INSTALL_PATH=/mnt/nfs/git/tetware/TETware -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 - -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/tet_code b/TC/tet_code deleted file mode 100755 index a2cf6c1..0000000 --- a/TC/tet_code +++ /dev/null @@ -1,12 +0,0 @@ -# TET reserved codes -0 "PASS" -1 "FAIL" -2 "UNRESOLVED" -3 "NOTINUSE" -4 "UNSUPPORTED" -5 "UNTESTED" -6 "UNINITIATED" -7 "NORESULT" - -# Test suite additional codes -33 "INSPECT" diff --git a/TC/tet_scen b/TC/tet_scen deleted file mode 100755 index 43cbc9b..0000000 --- a/TC/tet_scen +++ /dev/null @@ -1,7 +0,0 @@ -all - ^TEST -##### Scenarios for TEST ##### - -# Test scenario -TEST - :include:/unit/tslist diff --git a/TC/tetbuild.cfg b/TC/tetbuild.cfg deleted file mode 100755 index a584acd..0000000 --- a/TC/tetbuild.cfg +++ /dev/null @@ -1,2 +0,0 @@ -TET_OUTPUT_CAPTURE=False -TET_BUILD_TOOL=make diff --git a/TC/tetclean.cfg b/TC/tetclean.cfg deleted file mode 100755 index c66eda4..0000000 --- a/TC/tetclean.cfg +++ /dev/null @@ -1,2 +0,0 @@ -TET_OUTPUT_CAPTURE=False -TET_CLEAN_TOOL=make clean diff --git a/TC/tetexec.cfg b/TC/tetexec.cfg deleted file mode 100755 index 0d9d39a..0000000 --- a/TC/tetexec.cfg +++ /dev/null @@ -1 +0,0 @@ -TET_OUTPUT_CAPTURE=False diff --git a/TC/unit/Makefile b/TC/unit/Makefile deleted file mode 100755 index 8993f7d..0000000 --- a/TC/unit/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -CC ?= gcc - -TARGETS = utc_ApplicationFW_ac_register_launch_privilege_func \ - utc_ApplicationFW_ac_unregister_launch_privilege_func \ - utc_ApplicationFW_ac_check_launch_privilege_func - -PKGS = glib-2.0 dlog app-checker - -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 -LDFLAGS += -L/usr/lib -lpthread - -CFLAGS = -I. `pkg-config --cflags $(PKGS)` -CFLAGS += -I$(TET_ROOT)/inc/tet3 -CFLAGS += -Wall - -all: $(TARGETS) - -$(TARGETS): %: %.c - $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) - -clean: - rm -f $(TARGETS) diff --git a/TC/unit/tc_gen.sh b/TC/unit/tc_gen.sh deleted file mode 100755 index 54f482d..0000000 --- a/TC/unit/tc_gen.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -TMPSTR=$0 -SCRIPT=${TMPSTR##*/} - -if [ $# -lt 2 ]; then - echo "Usage) $SCRIPT module_name api_name" - exit 1 -fi - -MODULE=$1 -API=$2 -TEMPLATE=utc_MODULE_API_func.c.in -TESTCASE=utc_${MODULE}_${API}_func - -sed -e ' - s^@API@^'"$API"'^g - s^@MODULE@^'"$MODULE"'^g - ' $TEMPLATE > $TESTCASE.c - -if [ ! -e "$TESTCASE.c" ]; then - echo "Failed" - exit 1 -fi -echo "Testcase file is $TESTCASE.c" -echo "Done" -echo "please put \"$TESTCASE\" as Target in Makefile" -echo "please put \"/unit/$TESTCASE\" in tslist" diff --git a/TC/unit/tslist b/TC/unit/tslist deleted file mode 100755 index 2478015..0000000 --- a/TC/unit/tslist +++ /dev/null @@ -1,3 +0,0 @@ -/unit/utc_ApplicationFW_ac_register_launch_privilege_func -/unit/utc_ApplicationFW_ac_unregister_launch_privilege_func -/unit/utc_ApplicationFW_ac_check_launch_privilege_func diff --git a/TC/unit/utc_ApplicationFW_ac_check_launch_privilege_func.c b/TC/unit/utc_ApplicationFW_ac_check_launch_privilege_func.c deleted file mode 100755 index df57741..0000000 --- a/TC/unit/utc_ApplicationFW_ac_check_launch_privilege_func.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - * app-checker - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jayoun Lee , Sewook Park , - * Jaeho Lee , Shobhit Srivastava - * - * 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 - -static void startup(void); -static void cleanup(void); - -void (*tet_startup) (void) = startup; -void (*tet_cleanup) (void) = cleanup; - -static void utc_ApplicationFW_ac_check_launch_privilege_func_01(void); -static void utc_ApplicationFW_ac_check_launch_privilege_func_02(void); -static void utc_ApplicationFW_ac_check_launch_privilege_func_03(void); -static void utc_ApplicationFW_ac_check_launch_privilege_func_04(void); - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -struct tet_testlist tet_testlist[] = { - {utc_ApplicationFW_ac_check_launch_privilege_func_01, POSITIVE_TC_IDX}, - {utc_ApplicationFW_ac_check_launch_privilege_func_02, NEGATIVE_TC_IDX}, - {utc_ApplicationFW_ac_check_launch_privilege_func_03, NEGATIVE_TC_IDX}, - {utc_ApplicationFW_ac_check_launch_privilege_func_04, NEGATIVE_TC_IDX}, - {NULL, 0}, -}; - -static void startup(void) -{ -} - -static void cleanup(void) -{ -} - -/** API Prototype -*int ac_check_launch_privilege(const char *pkg_name, -* const char *pkg_type, int pid); -*/ - - -/** - * @brief Positive test case of ac_check_launch_privilege() - */ -static void utc_ApplicationFW_ac_check_launch_privilege_func_01(void) -{ - int r = AC_R_ERROR; - r = ac_check_launch_privilege("org.tizen.calculator", "deb", - getpid()); - if (r < 0) { - tet_infoline - ("ac_check_launch_privilege()" - " failed in positive test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); -} - -/** - * @brief Negative test case 01 of ac_check_launch_privilege() - */ -static void utc_ApplicationFW_ac_check_launch_privilege_func_02(void) -{ - int r = AC_R_ERROR; - r = ac_check_launch_privilege(NULL, "deb", getpid()); - if (r != AC_R_EINVAL) { - tet_infoline - ("ac_check_launch_privilege()" - " failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); -} - -/** - * @brief Negative test case 02 of ac_check_launch_privilege() - */ -static void utc_ApplicationFW_ac_check_launch_privilege_func_03(void) -{ - int r = AC_R_ERROR; - r = ac_check_launch_privilege("org.tizen.calculator", NULL, getpid()); - if (r != AC_R_EINVAL) { - tet_infoline - ("ac_check_launch_privilege()" - " failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); -} - -/** - * @brief Negative test case 03 of ac_check_launch_privilege() - */ -static void utc_ApplicationFW_ac_check_launch_privilege_func_04(void) -{ - int r = AC_R_ERROR; - r = ac_check_launch_privilege(NULL, NULL, getpid()); - if (r != AC_R_EINVAL) { - tet_infoline - ("ac_check_launch_privilege()" - " failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); -} diff --git a/TC/unit/utc_ApplicationFW_ac_register_launch_privilege_func.c b/TC/unit/utc_ApplicationFW_ac_register_launch_privilege_func.c deleted file mode 100755 index 34cfe03..0000000 --- a/TC/unit/utc_ApplicationFW_ac_register_launch_privilege_func.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * app-checker - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jayoun Lee , Sewook Park , - * Jaeho Lee , Shobhit Srivastava - * - * 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 -static void startup(void); -static void cleanup(void); - -void (*tet_startup) (void) = startup; -void (*tet_cleanup) (void) = cleanup; - -static void utc_ApplicationFW_ac_register_launch_privilege_func_01(void); -static void utc_ApplicationFW_ac_register_launch_privilege_func_02(void); -static void utc_ApplicationFW_ac_register_launch_privilege_func_03(void); -static void utc_ApplicationFW_ac_register_launch_privilege_func_04(void); - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -struct tet_testlist tet_testlist[] = { - {utc_ApplicationFW_ac_register_launch_privilege_func_01, - POSITIVE_TC_IDX}, - {utc_ApplicationFW_ac_register_launch_privilege_func_02, - NEGATIVE_TC_IDX}, - {utc_ApplicationFW_ac_register_launch_privilege_func_03, - NEGATIVE_TC_IDX}, - {utc_ApplicationFW_ac_register_launch_privilege_func_04, - NEGATIVE_TC_IDX}, - {NULL, 0}, -}; - -static void startup(void) -{ -} - -static void cleanup(void) -{ -} -/** API Prototype -*int ac_register_launch_privilege(const char *pkg_name, -* const char *pkg_type); -*/ - -/** - * @brief Positive test case of ac_register_launch_privilege() - */ -static void utc_ApplicationFW_ac_register_launch_privilege_func_01(void) -{ - int r = AC_R_ERROR; - r = ac_register_launch_privilege("org.tizen.calculator", "deb"); - if (r < 0 && r != AC_R_ENOPULUGINS) { - tet_infoline - ("ac_register_launch_privilege()" - " failed in positive test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); -} - -/** - * @brief Negative test case 01 of ac_register_launch_privilege() - */ -static void utc_ApplicationFW_ac_register_launch_privilege_func_02(void) -{ - int r = AC_R_ERROR; - r = ac_register_launch_privilege(NULL, "deb"); - if (r != AC_R_EINVAL) { - tet_infoline - ("ac_register_launch_privilege()" - " failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); -} - -/** - * @brief Negative test case 02 of ac_register_launch_privilege() - */ -static void utc_ApplicationFW_ac_register_launch_privilege_func_03(void) -{ - int r = AC_R_ERROR; - r = ac_register_launch_privilege("org.tizen.calculator", NULL); - if (r != AC_R_EINVAL) { - tet_infoline - ("ac_register_launch_privilege()" - " failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); -} - -/** - * @brief Negative test case 03 of ac_register_launch_privilege() - */ -static void utc_ApplicationFW_ac_register_launch_privilege_func_04(void) -{ - int r = AC_R_ERROR; - r = ac_register_launch_privilege(NULL, NULL); - if (r != AC_R_EINVAL) { - tet_infoline - ("ac_register_launch_privilege()" - " failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); -} diff --git a/TC/unit/utc_ApplicationFW_ac_unregister_launch_privilege_func.c b/TC/unit/utc_ApplicationFW_ac_unregister_launch_privilege_func.c deleted file mode 100755 index 73f8fd8..0000000 --- a/TC/unit/utc_ApplicationFW_ac_unregister_launch_privilege_func.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - * app-checker - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jayoun Lee , Sewook Park , - * Jaeho Lee , Shobhit Srivastava - * - * 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 -static void startup(void); -static void cleanup(void); - -void (*tet_startup) (void) = startup; -void (*tet_cleanup) (void) = cleanup; - -static void utc_ApplicationFW_ac_unregister_launch_privilege_func_01(void); -static void utc_ApplicationFW_ac_unregister_launch_privilege_func_02(void); -static void utc_ApplicationFW_ac_unregister_launch_privilege_func_03(void); -static void utc_ApplicationFW_ac_unregister_launch_privilege_func_04(void); - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -struct tet_testlist tet_testlist[] = { - {utc_ApplicationFW_ac_unregister_launch_privilege_func_01, - POSITIVE_TC_IDX}, - {utc_ApplicationFW_ac_unregister_launch_privilege_func_02, - NEGATIVE_TC_IDX}, - {utc_ApplicationFW_ac_unregister_launch_privilege_func_03, - NEGATIVE_TC_IDX}, - {utc_ApplicationFW_ac_unregister_launch_privilege_func_04, - NEGATIVE_TC_IDX}, - {NULL, 0}, -}; - -static void startup(void) -{ -} - -static void cleanup(void) -{ -} - -/** API Prototype -*int ac_unregister_launch_privilege(const char *pkg_name, -* const char *pkg_type); -*/ - - -/** - * @brief Positive test case of ac_unregister_launch_privilege() - */ -static void utc_ApplicationFW_ac_unregister_launch_privilege_func_01(void) -{ - int r = AC_R_ERROR; - r = ac_unregister_launch_privilege("org.tizen.calculator", "deb"); - if (r < 0 && r != AC_R_ENOPULUGINS) { - tet_infoline - ("ac_unregister_launch_privilege()" - " failed in positive test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); -} - -/** - * @brief Negative test case 01 of ac_unregister_launch_privilege() - */ -static void utc_ApplicationFW_ac_unregister_launch_privilege_func_02(void) -{ - int r = AC_R_ERROR; - r = ac_unregister_launch_privilege(NULL, "deb"); - if (r != AC_R_EINVAL) { - tet_infoline - ("ac_unregister_launch_privilege()" - " failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); -} - -/** - * @brief Negative test case 02 of ac_unregister_launch_privilege() - */ -static void utc_ApplicationFW_ac_unregister_launch_privilege_func_03(void) -{ - int r = AC_R_ERROR; - r = ac_unregister_launch_privilege("org.tizen.calculator", NULL); - if (r != AC_R_EINVAL) { - tet_infoline - ("ac_unregister_launch_privilege()" - " failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); -} - -/** - * @brief Negative test case 03 of ac_unregister_launch_privilege() - */ -static void utc_ApplicationFW_ac_unregister_launch_privilege_func_04(void) -{ - int r = AC_R_ERROR; - r = ac_unregister_launch_privilege(NULL, NULL); - if (r != AC_R_EINVAL) { - tet_infoline - ("ac_unregister_launch_privilege()" - " failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); -} diff --git a/TC/unit/utc_MODULE_API_func.c.in b/TC/unit/utc_MODULE_API_func.c.in deleted file mode 100755 index 2899c28..0000000 --- a/TC/unit/utc_MODULE_API_func.c.in +++ /dev/null @@ -1,76 +0,0 @@ -#include - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_@MODULE@_@API@_func_01(void); -static void utc_@MODULE@_@API@_func_02(void); - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -struct tet_testlist tet_testlist[] = { - { utc_@MODULE@_@API@_func_01, POSITIVE_TC_IDX }, - { utc_@MODULE@_@API@_func_02, NEGATIVE_TC_IDX }, -}; - -static void startup(void) -{ - int r; -/* - char *err; - r = initailze...; - if (r) { - err = "Error message......."; - tet_infoline(err); - tet_delete(POSITIVE_TC_IDX, err); - tet_delete(NEGATIVE_TC_IDX, err); - } -*/ - -} - -static void cleanup(void) -{ -} - -/** - * @brief Positive test case of @API@() - */ -static void utc_@MODULE@_@API@_func_01(void) -{ - int r = 0; - -/* - r = @API@(...); -*/ - if (r) { - tet_infoline("@API@() failed in positive test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); -} - -/** - * @brief Negative test case of ug_init @API@() - */ -static void utc_@MODULE@_@API@_func_02(void) -{ - int r = 0; - -/* - r = @API@(...); -*/ - if (!r) { - tet_infoline("@API@() failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); -}