4 echo "Usage note: tctestsgen.sh <module_name>"
9 MODULE_NAME_C=$(echo $MODULE_NAME | sed -e 's/-\([a-z]\)/\U\1/' -e 's/^\([a-z]\)/\U\1/')
10 SCRIPT_DIR="$(cd "$(dirname $0)" && pwd)"
11 TC_DIR="/opt/usr/bin/tct-$1-core"
12 if [[ $3 == "desktop" ]] ; then
21 if [ -a $TFILE ]; then
26 awk -F',' -v MODULE_NAME=$MODULE_NAME -v MODULE_NAME_C=$MODULE_NAME_C -v TC_DIR=$TC_DIR '
29 print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
30 print " <?xml-stylesheet type=\"text/xsl\" href=\"./testcase.xsl\"?>";
31 print "<test_definition>";
32 print " <suite name=\"tct-"MODULE_NAME"-core-tests\" category=\"Core APIs\">";
35 if (set != "" && set != $2) {
41 print " <set name=\"" set "\">";
47 print " <testcase component=\"CoreAPI/" MODULE_NAME_C "/" set "\" execution_type=\"auto\" id=\"" tcname "\" purpose=\"" tcpurpose "\">";
48 print " <description>";
50 print " <test_script_entry test_script_expected_result=\"0\">" TC_DIR "/tct-" MODULE_NAME "-core " tcname "</test_script_entry>";
51 print " </description>";
59 print "</test_definition>"
63 (cd $SCRIPT_DIR/..; scripts/retriever.sh -f src/$MODULE_NAME $4 > ${TFILE}_pre)
64 if [ $? -ne 0 ]; then cat ${TFILE}_pre; exit 1; fi
65 cat ${TFILE}_pre | sort -t',' -k2,2 -s > $TFILE