From: wchang kim Date: Mon, 21 May 2018 08:05:39 +0000 (+0900) Subject: Adding some script to make tct-plan for tizeniot. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ee430d547fc0e1e305ea9882a62869ae0ce1498;p=tools%2Ftbb.git Adding some script to make tct-plan for tizeniot. Change-Id: I16b6ed910fc0b6a5624e2b2156ce99379b0ec015 --- diff --git a/README.make_tct_plan.md b/README.make_tct_plan.md new file mode 100644 index 0000000..d5dc518 --- /dev/null +++ b/README.make_tct_plan.md @@ -0,0 +1,16 @@ +# How to make tct-plans for tizeniot and apply them to the TCT tool + +1. Move the directory of make_tct_plan. +$ cd make_tct_plan + +2. Make each tct-plan - headless, headed and iotbb. +$ ./mk_iotheadless_plan.sh headless_tc_list.txt +$ ./mk_iotheaded_plan.sh headed_tc_list.txt +$ ./mk_iotbb_plan.sh + +3. Copy all output xml files to TCT manager plan directory. +$ cp *.xml /opt/tct/tizen_native_5.0/manager/plan/ + + + +4. Now you can select a plan for tizeniot in TCT tool. diff --git a/make_tct_plan/headed_tc_list.txt b/make_tct_plan/headed_tc_list.txt new file mode 100644 index 0000000..6ac5877 --- /dev/null +++ b/make_tct_plan/headed_tc_list.txt @@ -0,0 +1,118 @@ +tct-audio-io-native-ctc +tct-camera-native-ctc +tct-connection-native-ctc +tct-device-native-ctc +tct-image-util-native-ctc +tct-mediacodec-native-ctc +tct-player-native-ctc +tct-runtime-info-native-ctc +tct-system-info-native-ctc +tct-alarm-native-itc +tct-appcore-agent-native-itc +tct-application-native-itc +tct-app-manager-native-itc +tct-audio-io-native-itc +tct-base-utils-native-itc +tct-bluetooth-native-itc +tct-bundle-native-itc +tct-cairo-native-itc +tct-camera-native-itc +tct-capi-message-port-native-itc +tct-capi-ui-inputmethod-manager-native-itc +tct-connection-native-itc +tct-dali-adaptor-native-itc +tct-dali-core-native-itc +tct-dali-toolkit-native-itc +tct-data-control-native-itc +tct-device-native-itc +tct-dlog-native-itc +tct-efl-ext-native-itc +tct-efl-util-native-itc +tct-eom-native-itc +tct-image-util-native-itc +tct-iotcon-native-itc +tct-key-manager-native-itc +tct-libstorage-native-itc +tct-mediacodec-native-itc +tct-media-content-native-itc +tct-media-key-native-itc +tct-metadata-extractor-native-itc +tct-mime-type-native-itc +tct-mtp-native-itc +tct-native-common-native-itc +tct-notification-native-itc +tct-nsd-native-itc +tct-package-manager-native-itc +tct-player-native-itc +tct-privilege-info-native-itc +tct-recorder-native-itc +tct-runtime-info-native-itc +tct-sensor-native-itc +tct-sound-manager-native-itc +tct-system-info-native-itc +tct-system-settings-native-itc +tct-tbm-native-itc +tct-thumbnail-util-native-itc +tct-ttrace-native-itc +tct-url-download-native-itc +tct-wav-player-native-itc +tct-webkit2-native-itc +tct-wifi-manager-native-itc +tct-yaca-native-itc +tct-alarm-native-utc +tct-appcore-agent-native-utc +tct-application-native-utc +tct-app-manager-native-utc +tct-audio-io-native-utc +tct-base-utils-native-utc +tct-bluetooth-native-utc +tct-bundle-native-utc +tct-cairo-native-utc +tct-camera-native-utc +tct-capi-message-port-native-utc +tct-capi-ui-inputmethod-manager-native-utc +tct-capi-ui-inputmethod-native-utc +tct-connection-native-utc +tct-dali-adaptor-native-utc +tct-dali-core-native-utc +tct-dali-toolkit-native-utc +tct-data-control-native-utc +tct-device-native-utc +tct-dlog-native-utc +tct-efl-ext-native-utc +tct-efl-util-native-utc +tct-eom-native-utc +tct-image-util-native-utc +tct-iotcon-native-utc +tct-key-manager-native-utc +tct-libstorage64-native-utc +tct-libstorage-native-utc +tct-mediacodec-native-utc +tct-media-content-native-utc +tct-media-key-native-utc +tct-mediatool-native-utc +tct-metadata-extractor-native-utc +tct-mime-type-native-utc +tct-mtp-native-utc +tct-native-common-native-utc +tct-notification-native-utc +tct-nsd-native-utc +tct-package-manager-native-utc +tct-peripheral-io-native-utc +tct-player-native-utc +tct-privilege-info-native-utc +tct-recorder-native-utc +tct-runtime-info-native-utc +tct-sensor-native-utc +tct-sound-manager-native-utc +tct-system-info-native-utc +tct-system-settings-native-utc +tct-tbm-native-utc +tct-thumbnail-util-native-utc +tct-trace-native-utc +tct-tzsh-quickpanel-native-utc +tct-url-download-native-utc +tct-wav-player-native-utc +tct-webkit2-native-utc +tct-wifi-manager-native-utc +tct-yaca-native-utc diff --git a/make_tct_plan/headless_tc_list.txt b/make_tct_plan/headless_tc_list.txt new file mode 100644 index 0000000..46c8aae --- /dev/null +++ b/make_tct_plan/headless_tc_list.txt @@ -0,0 +1,23 @@ +tct-dlog-native-utc +tct-ttrace-native-itc +tct-native-common-native-utc +tct-system-info-native-itc +tct-key-manager-native-itc +tct-wifi-manager-native-utc +tct-bluetooth-native-utc +tct-system-info-native-ctc +tct-wifi-manager-native-itc +tct-appcore-agent-native-itc +tct-bundle-native-utc +tct-trace-native-utc +tct-bluetooth-native-itc +tct-dlog-native-itc +tct-iotcon-native-itc +tct-native-common-native-itc +tct-player-native-utc +tct-iotcon-native-utc +tct-system-info-native-utc +tct-appcore-agent-native-utc +tct-bundle-native-itc +tct-key-manager-native-utc +tct-peripheral-io-native-utc diff --git a/make_tct_plan/mk_iotbb_plan.sh b/make_tct_plan/mk_iotbb_plan.sh new file mode 100755 index 0000000..8933c24 --- /dev/null +++ b/make_tct_plan/mk_iotbb_plan.sh @@ -0,0 +1,66 @@ +#!/bin/sh + +PKG_INFO_FILE="/opt/tct/tizen_native_5.0/packages/pkg_infos/tizeniot_pkg_info.xml" + +HEADER1="" +HEADER2="" +HEADER3="All" + +MAPPING_FILE="mapping-bb-tct.xml" +ERROR=0 + +TAILER="" + +if [ ! -e $PKG_INFO_FILE ] +then + echo "Please install TCT tool for tizeniot" + exit 2 +fi + +echo "PKG_INFO_FILE : $PKG_INFO_FILE" + +wget -q https://git.tizen.org/cgit/tools/building-blocks/plain/mapping-bb-tct.xml?h=tizen --output-document=$MAPPING_FILE + +if [ $? != 0 ] +then + echo "Please check to download $MAPPING_FILE" + exit 3 +fi + +BB_TC_LIST=`xmlstarlet sel -t -m "//imageid" -v "@name" -n $MAPPING_FILE` + +for BB_TC_ID in $BB_TC_LIST +do + OUTPUT="iotbb_${BB_TC_ID}.xml" + HEADER2="" +# echo "$OUTPUT" +# echo $HEADER2 + TC_LIST=`xmlstarlet sel -t -m "//imageid[@name='$BB_TC_ID']/tct_info" -v "." -n $MAPPING_FILE` + echo $HEADER1 > $OUTPUT + echo $HEADER2 >> $OUTPUT + echo $HEADER3 >> $OUTPUT + for TC_NAME in $TC_LIST + do + xmlstarlet -q sel -t -m "//suite[@name='$TC_NAME']" -c "." -n $PKG_INFO_FILE + if [ $? != 0 ] + then + ERROR=1 + ERROR_IMG="$ERROR_IMG [$BB_TC_ID:$TC_NAME]" + else + xmlstarlet sel -t -m "//suite[@name='$TC_NAME']" -c "." -n $PKG_INFO_FILE | sed -e 's/xmlns.\+=\".\+\" xmlns=\"\" //' >> $OUTPUT + fi + done + echo $TAILER >> $OUTPUT + +done + +rm -f $MAPPING_FILE + +if [ $ERROR = 1 ] +then + echo "Error image list" + for ERR_ID in $ERROR_IMG + do + echo "$ERR_ID" + done +fi diff --git a/make_tct_plan/mk_iotheaded_plan.sh b/make_tct_plan/mk_iotheaded_plan.sh new file mode 100755 index 0000000..9c0507d --- /dev/null +++ b/make_tct_plan/mk_iotheaded_plan.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +PKG_INFO_FILE="/opt/tct/tizen_native_5.0/packages/pkg_infos/tizeniot_pkg_info.xml" + +HEADER1="" +HEADER2="" +HEADER3="All" + +TAILER="" + +OUTPUT="iot_headed.xml" + + +if [ $# = 1 ] +then + LIST_FILE=$1 +else + echo "usage : mk_iotheaded " + exit 1 +fi + +if [ ! -e $PKG_INFO_FILE ] +then + echo "Please install TCT tool for tizeniot" + exit 2 +fi + +echo "PKG_INFO_FILE : $PKG_INFO_FILE" + +echo $HEADER1 > $OUTPUT +echo $HEADER2 >> $OUTPUT +echo $HEADER3 >> $OUTPUT + +TC_LIST=`cat $LIST_FILE` + +for TC_NAME in $TC_LIST +do + xmlstarlet sel -t -m "//suite[@name='$TC_NAME']" -c "." -n $PKG_INFO_FILE | sed -e 's/xmlns.\+=\".\+\" xmlns=\"\" //' >> $OUTPUT +# xmlstarlet sel -t -m "//suite[@name='$TC_NAME']" -c "." -n $PKG_INFO_FILE >> $OUTPUT +done + + +echo $TAILER >> $OUTPUT + diff --git a/make_tct_plan/mk_iotheadless_plan.sh b/make_tct_plan/mk_iotheadless_plan.sh new file mode 100755 index 0000000..110bda5 --- /dev/null +++ b/make_tct_plan/mk_iotheadless_plan.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +PKG_INFO_FILE="/opt/tct/tizen_native_5.0/packages/pkg_infos/tizeniot_pkg_info.xml" + +HEADER1="" +HEADER2="" +HEADER3="All" + +TAILER="" + +OUTPUT="iot_headless.xml" + + +if [ $# = 1 ] +then + LIST_FILE=$1 +else + echo "usage : mk_iotheadless " + exit 1 +fi + +if [ ! -e $PKG_INFO_FILE ] +then + echo "Please install TCT tool for tizeniot" + exit 2 +fi + +echo "PKG_INFO_FILE : $PKG_INFO_FILE" + +echo $HEADER1 > $OUTPUT +echo $HEADER2 >> $OUTPUT +echo $HEADER3 >> $OUTPUT + +TC_LIST=`cat $LIST_FILE` + +for TC_NAME in $TC_LIST +do + xmlstarlet sel -t -m "//suite[@name='$TC_NAME']" -c "." -n $PKG_INFO_FILE | sed -e 's/xmlns.\+=\".\+\" xmlns=\"\" //' >> $OUTPUT +# xmlstarlet sel -t -m "//suite[@name='$TC_NAME']" -c "." -n $PKG_INFO_FILE >> $OUTPUT +done + + +echo $TAILER >> $OUTPUT +