[genlist]: removed bin files
[framework/uifw/elementary.git] / TC / build.sh
1 export MACHINE=`echo $SBOX_UNAME_MACHINE`
2 echo $MACHINE
3 if [ $MACHINE = "i686" ]
4 then
5         TET_SCEN_FILE=tet_scen_i686
6 else
7         TET_SCEN_FILE=tet_scen_arm
8 fi
9
10 TET_SCEN_NAME=all
11 RESULT_TO_JOURNAL="false"
12
13 if [ $# -eq 0 ]
14 then
15     echo 
16     echo "ERROR : Scenario name not found"
17     echo 
18     echo "SYNOPSIS :"
19     echo "./build-tar-host.sh [-j] [-s scenario file name] [scenario name]"
20     echo " -j : Write the journal file for test result"
21     echo " scenario name : A scenario name in 'tet_scen'file"
22     echo 
23     exit 0
24 fi
25
26 SCEN_FILE_INPUT="false"
27 args_count=0
28
29 for i in $* 
30 do
31         args_count=`expr $args_count + 1`
32         if [ $SCEN_FILE_INPUT = "true" ]
33         then
34                 TET_SCEN_FILE=$i
35                 SCEN_FILE_INPUT="false"
36         elif [ $i = "-j" ]
37         then
38                 RESULT_TO_JOURNAL="true"
39         elif [ $i = "-s" ]
40         then
41                 SCEN_FILE_INPUT="true"
42         elif [ $args_count = $# ]
43         then
44                 TET_SCEN_NAME=$i
45         fi
46 done
47
48 #Export the path information
49 . ./_export_env.sh
50
51 echo TET_ROOT=$TET_ROOT
52 echo TET_SUITE_ROOT=$TET_SUITE_ROOT
53 echo TET_SCEN_FILE=$TET_SCEN_FILE
54 echo TET_SCEN_NAME=$TET_SCEN_NAME
55 echo RESULT_TO_JOURNAL=$RESULT_TO_JOURNAL
56
57 RESULT_DIR=result
58
59 if [ $MACHINE = "i686" ]
60 then
61         TEXT_RESULT=$RESULT_DIR/BLD-i686-$TET_SCEN_NAME-$FILE_NAME_EXTENSION.html
62         JOURNAL_RESULT=$RESULT_DIR/BLD-i686-$TET_SCEN_NAME-$FILE_NAME_EXTENSION.journal
63 else
64         TEXT_RESULT=$RESULT_DIR/BLD-ARM-$TET_SCEN_NAME-$FILE_NAME_EXTENSION.html
65         JOURNAL_RESULT=$RESULT_DIR/BLD-ARM-$TET_SCEN_NAME-$FILE_NAME_EXTENSION.journal
66 fi              
67
68 ### Make Result output directory
69 echo
70 echo "$RESULT_DIR Folder Create"
71 if [ -e $RESULT_DIR ]
72 then
73         echo "  -> $RESULT_DIR Folder exist"
74 else
75         mkdir $RESULT_DIR
76 fi
77
78 ##execute and mkae html report
79 tcc -c -p -s $TET_SCEN_FILE ./ $TET_SCEN_NAME
80 if [ $RESULT_TO_JOURNAL = "false" ]
81 then
82         tcc -b -p -j - -s $TET_SCEN_FILE ./ $TET_SCEN_NAME
83 else
84         tcc -b -j $JOURNAL_RESULT -p -s $TET_SCEN_FILE ./ $TET_SCEN_NAME
85         grw -c 3 -f chtml -o $TEXT_RESULT -- $JOURNAL_RESULT
86         echo RESULT_SUMMARY = $TEXT_RESULT
87         echo RESULT_JOURNAL  = $JOURNAL_RESULT
88 fi
89         rm -rf ./results