From: Prashant Kumar Jangid Date: Tue, 13 Dec 2022 06:45:48 +0000 (+0530) Subject: [TCT][Scripts][NonACR]multiple modules build and install feature is added X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F79%2F285479%2F1;p=test%2Ftct%2Fnative%2Fapi.git [TCT][Scripts][NonACR]multiple modules build and install feature is added Usage: sudo ./tpkbuild build itc dlog,bluetooth,camera armv7l mobile sudo ./tpkbuild install itc dlog,bluetooth,camera armv7l mobile Change-Id: Ie7616ca24601b4373d34b488734e7be58b3e3303 Signed-off-by: Prashant Kumar Jangid (cherry picked from commit 3a22b4145209fc072233e0725c045d8f5e316d72) --- diff --git a/scripts_tpk/tpkbuild.sh b/scripts_tpk/tpkbuild.sh index 47914b27e..4be05309a 100755 --- a/scripts_tpk/tpkbuild.sh +++ b/scripts_tpk/tpkbuild.sh @@ -23,6 +23,9 @@ TESTCASE_TYPE="" MODULE_NAME="" TC_COUNT="" +green=`tput setaf 2` +reset=`tput sgr0` +bold=`tput bold` function helpusage { # usage note @@ -46,7 +49,7 @@ function helpusage { INSTALL_CHILD=0 -if [ "$1" != "addmod" ] && [ "$1" != "rmmod" ]; then +if [ "$1" != "addmod" ] && [ "$1" != "rmmod" ] ; then if [ "$2" = "mobile" ] || [ "$3" = "mobile" ] || [ "$4" = "mobile" ] || [ "$5" = "mobile" ]; then PROFILE_TYPE="mobile" elif [ "$2" = "wearable" ] || [ "$3" = "wearable" ] || [ "$4" = "wearable" ] || [ "$5" = "wearable" ]; then @@ -240,6 +243,23 @@ function install_custom { } +function multi_build { + IFS=',' + read -ra module_arr<<< $* + for module_name_seperated in "${module_arr[@]}"; + do + echo $green$bold"Build Started for module :${module_name_seperated}"$reset + build $TESTCASE_TYPE $module_name_seperated + done +} +function multi_install { + IFS=',' + read -ra module_arr<<< $* + for module_name_seperated in "${module_arr[@]}";do + echo $green$bold"Installing module :${module_name_seperated}"$reset + install $TESTCASE_TYPE $module_name_seperated + done +} # d_showVar VARNAME -- print bash variable name function d_showVar { if [ "$ARG" == "-d" -a -n "$1" ]; then echo "d >> ${1} = ${!1}"; fi } # keyprompt "introductory message" -- wait until any key pressed @@ -432,7 +452,8 @@ elif [ "build" == "$1" ]; then elif [ "$#" -eq "5" ]; then check_tc_type $2 $3 $4 $5 MODULE_NAME=$3 - build $TESTCASE_TYPE $MODULE_NAME + multi_build $MODULE_NAME + # build $TESTCASE_TYPE $MODULE_NAME else echo "Entered wrong number of arguments" @@ -451,7 +472,8 @@ elif [ "install" == "$1" ]; then elif [ "$#" -eq "5" ]; then check_tc_type $2 $3 $4 $5 MODULE_NAME=$3 - install $TESTCASE_TYPE $MODULE_NAME + multi_install $MODULE_NAME + # install $TESTCASE_TYPE $MODULE_NAME else echo "Entered wrong number of arguments" @@ -519,7 +541,6 @@ elif [ "install_custom" == "$1" ]; then echo "Entered wrong number of arguments" helpusage fi - else echo "Entered invalid arguments" helpusage