[TCT][tpk scripts change from content to share]
authorJihun Park <jihun87.park@samsung.com>
Fri, 1 Jul 2016 06:58:55 +0000 (15:58 +0900)
committerJihun Park <jihun87.park@samsung.com>
Fri, 1 Jul 2016 07:59:18 +0000 (16:59 +0900)
Change-Id: I0e37481522b70c5e4f045636e20879cac5f475c2
Signed-off-by: Jihun Park <jihun87.park@samsung.com>
scripts_tpk/init.sh
scripts_tpk/inst.sh
scripts_tpk/spec.sh
scripts_tpk/tctestsgen.py
scripts_tpk/tpk-install.py

index c79a247..0f6d7ef 100755 (executable)
@@ -24,4 +24,4 @@ ln -sf $HOME/tizen-sdk/tools/ide/bin/tizen.sh $HOME/bin/tizen
 export PATH=$PATH:$HOME/bin
 tizen cli-config --global default.profiles.path=$HOME/workspace/.metadata/.plugins/org.tizen.common.sign/profiles.xml
 
-ln -sf ./scripts_tpk/tpkbuild.sh $PROJECT_DIR/tpkbuild
\ No newline at end of file
+ln -sf ./scripts_tpk/tpkbuild.sh $PROJECT_DIR/tpkbuild
index f5e1e27..8a4e8ac 100755 (executable)
@@ -47,33 +47,33 @@ function KillPackage {
        fi
          
        if [ -d /home/owner/apps_rw/$PKG_NAME/shared/res ];then
-               rm -rf /home/owner/content/res
-               mkdir -p /home/owner/content/res
+               rm -rf /home/owner/share/res
+               mkdir -p /home/owner/share/res
 
-               cp -rf /home/owner/apps_rw/$PKG_NAME/shared/res/* /home/owner/content/res/
-               find /home/owner/content/res/ -exec chsmack -a "User::App::Shared" {} \;
+               cp -rf /home/owner/apps_rw/$PKG_NAME/shared/res/* /home/owner/share/res/
+               find /home/owner/share/res/ -exec chsmack -a "User::App::Shared" {} \;
 
                if [ "$(uname -m)" == "armv7l" ]; then
-                        applist=`ls /home/owner/content/res | grep tpk | grep arm`
+                        applist=`ls /home/owner/share/res | grep tpk | grep arm`
                else
-                        applist=`ls /home/owner/content/res | grep tpk | grep i386`
+                        applist=`ls /home/owner/share/res | grep tpk | grep i386`
                fi
 
                for app in $applist
                do
-                        su -c "pkgcmd -i -q -t tpk -p /home/owner/content/res/$app" owner 
+                        su -c "pkgcmd -i -q -t tpk -p /home/owner/share/res/$app" owner 
                         sync
                done
 
                if [ "$(uname -m)" == "armv7l" ]; then
-                        applist_rpm=`ls /home/owner/content/res | grep rpm | grep arm`
+                        applist_rpm=`ls /home/owner/share/res | grep rpm | grep arm`
                else
-                        applist_rpm=`ls /home/owner/content/res | grep rpm | grep i586`
+                        applist_rpm=`ls /home/owner/share/res | grep rpm | grep i586`
                fi
 
                for app in $applist_rpm
                do
-                       su -c "pkgcmd -i -q -t rpm -p /home/owner/content/res/$app" owner
+                       su -c "pkgcmd -i -q -t rpm -p /home/owner/share/res/$app" owner
                         sync
                done
        fi
@@ -104,22 +104,22 @@ function KillPackage {
  
  function uninstallpkg(){
  ### uninstall tpks and rpms and remove other resources ###
-         if [ -d /home/owner/content/tct/opt/$NAME ];then
-                 rm -rf /home/owner/content/tct/opt/$NAME
+         if [ -d /home/owner/share/tct/opt/$NAME ];then
+                 rm -rf /home/owner/share/tct/opt/$NAME
                  su -c "pkgcmd -u -n $PKG_NAME" owner
          else
-                 echo "Remove source file fail, please check if the source file exist: /home/owner/content/tct/opt/$NAME ..."
+                 echo "Remove source file fail, please check if the source file exist: /home/owner/share/tct/opt/$NAME ..."
          fi
                 
-                if [ -d /home/owner/content/res ];then
+                if [ -d /home/owner/share/res ];then
                 
-                       applist=`ls /home/owner/content/res | grep 'rpm\|tpk' | awk -F'-[0-9]' '{print $1}'`
+                       applist=`ls /home/owner/share/res | grep 'rpm\|tpk' | awk -F'-[0-9]' '{print $1}'`
                        for app in $applist
                                do
                                su -c "pkgcmd -u -n $app" owner
                                sync
                        done
-                       rm -rf /home/owner/content/res
+                       rm -rf /home/owner/share/res
                fi
  }
  
index 4db77d8..aafb275 100755 (executable)
@@ -202,16 +202,16 @@ case "$1" in
                        chsmack -a "User::App::Shared" ../../data/Music/*
                        chsmack -e "User::App::Shared" ../../data/Music/*
                        
-                       mkdir -p /home/owner/content/TestFolder
-                       chsmack -a "User::App::Shared" /home/owner/content/TestFolder
-                       chsmack -e "User::App::Shared" /home/owner/content/TestFolder
-                       cp TestImage.jpg /home/owner/content/TestFolder/TestImage.jpg
-                       cp TestImage.jpg /home/owner/content/TestImage.jpg
-                       cp TestImage.jpg /home/owner/content/Remove.jpg
-                       cp -R ../../data/Images/* /home/owner/content/Images/
-                       cp -R ../../data/Videos/* /home/owner/content/Videos/
-                       cp -R ../../data/Music/* /home/owner/content/Music/
-                       chmod -R 777 /home/owner/content/Music
+                       mkdir -p /home/owner/share/TestFolder
+                       chsmack -a "User::App::Shared" /home/owner/share/TestFolder
+                       chsmack -e "User::App::Shared" /home/owner/share/TestFolder
+                       cp TestImage.jpg /home/owner/share/TestFolder/TestImage.jpg
+                       cp TestImage.jpg /home/owner/share/TestImage.jpg
+                       cp TestImage.jpg /home/owner/share/Remove.jpg
+                       cp -R ../../data/Images/* /home/owner/share/Images/
+                       cp -R ../../data/Videos/* /home/owner/share/Videos/
+                       cp -R ../../data/Music/* /home/owner/share/Music/
+                       chmod -R 777 /home/owner/share/Music
                        chown -R 5000:5000 ../../data
                        chmod -R 777 ../../data
                        ;;
@@ -233,11 +233,11 @@ case "$1" in
                        ;;
        "org.tizen.shortcut-native-itc")
                        echo "Installing pre-requisites for the package $1"
-                       cp icon.png /home/owner/content/icon.png
-                       chown -R 5000:5000 /home/owner/content/icon.png
-                       chmod -R 777 /home/owner/content/icon.png
-                       chsmack -a "User::App::Shared" /home/owner/content/icon.png
-                       chsmack -e "User::App::Shared" /home/owner/content/icon.png
+                       cp icon.png /home/owner/share/icon.png
+                       chown -R 5000:5000 /home/owner/share/icon.png
+                       chmod -R 777 /home/owner/share/icon.png
+                       chsmack -a "User::App::Shared" /home/owner/share/icon.png
+                       chsmack -e "User::App::Shared" /home/owner/share/icon.png
                        ;;
        "org.tizen.service-adaptor-native-itc")
                        echo "Installing pre-requisites for the package $1"
@@ -357,8 +357,8 @@ case "$1" in
                        chmod -R 777 ../../data
                        chsmack -a "User::App::Shared" ../../data/*
                        chsmack -e "User::App::Shared" ../../data/*
-                       cp -R PlatformPermission_test.jpg /home/owner/content/Images/PlatformPermission_test.jpg
-                       chmod -R 777 /home/owner/content/Images
+                       cp -R PlatformPermission_test.jpg /home/owner/share/Images/PlatformPermission_test.jpg
+                       chmod -R 777 /home/owner/share/Images
                        ;;
        "org.tizen.video-util-native-ctc")
                        echo "Installing pre-requisites for the package $1"
@@ -372,96 +372,96 @@ case "$1" in
                        ;;
        "org.tizen.capi-media-vision-native-utc")
                        echo "Installing pre-requisites for the package $1"
-                       mkdir -p /home/owner/content/model
-                       chsmack -a "User::App::Shared" /home/owner/content/model
-                       chsmack -e "User::App::Shared" /home/owner/content/model
-                       cp rec/test_rec_model /home/owner/content/model/test_rec_model
-                       cp track/test_trk_model /home/owner/content/model/test_trk_model
-                       chmod -R 777 /home/owner/content/model
-                       chown -R 5000:5000 /home/owner/content/model
-                       chsmack -a "User::App::Shared" /home/owner/content/model/*
-                       chsmack -e "User::App::Shared" /home/owner/content/model/*
+                       mkdir -p /home/owner/share/model
+                       chsmack -a "User::App::Shared" /home/owner/share/model
+                       chsmack -e "User::App::Shared" /home/owner/share/model
+                       cp rec/test_rec_model /home/owner/share/model/test_rec_model
+                       cp track/test_trk_model /home/owner/share/model/test_trk_model
+                       chmod -R 777 /home/owner/share/model
+                       chown -R 5000:5000 /home/owner/share/model
+                       chsmack -a "User::App::Shared" /home/owner/share/model/*
+                       chsmack -e "User::App::Shared" /home/owner/share/model/*
                        
-                       mkdir -p /home/owner/content/res/img
-                       chsmack -a "User::App::Shared" /home/owner/content/res
-                       chsmack -e "User::App::Shared" /home/owner/content/res
-                       chsmack -a "User::App::Shared" /home/owner/content/res/img
-                       chsmack -e "User::App::Shared" /home/owner/content/res/img
-                       cp res/media-vision-barcodes.json /home/owner/content/res/media-vision-barcodes.json
-                       cp res/img/*.jpg /home/owner/content/res/img/
-                       cp res/img/*.raw /home/owner/content/res/img/
-                       chmod -R 777 /home/owner/content/res
-                       chown -R 5000:5000 /home/owner/content/res
-                       chsmack -a "User::App::Shared" /home/owner/content/res/*
-                       chsmack -e "User::App::Shared" /home/owner/content/res/*
-                       chsmack -a "User::App::Shared" /home/owner/content/res/img/*
-                       chsmack -e "User::App::Shared" /home/owner/content/res/img/*
+                       mkdir -p /home/owner/share/res/img
+                       chsmack -a "User::App::Shared" /home/owner/share/res
+                       chsmack -e "User::App::Shared" /home/owner/share/res
+                       chsmack -a "User::App::Shared" /home/owner/share/res/img
+                       chsmack -e "User::App::Shared" /home/owner/share/res/img
+                       cp res/media-vision-barcodes.json /home/owner/share/res/media-vision-barcodes.json
+                       cp res/img/*.jpg /home/owner/share/res/img/
+                       cp res/img/*.raw /home/owner/share/res/img/
+                       chmod -R 777 /home/owner/share/res
+                       chown -R 5000:5000 /home/owner/share/res
+                       chsmack -a "User::App::Shared" /home/owner/share/res/*
+                       chsmack -e "User::App::Shared" /home/owner/share/res/*
+                       chsmack -a "User::App::Shared" /home/owner/share/res/img/*
+                       chsmack -e "User::App::Shared" /home/owner/share/res/img/*
                        
-                       mkdir -p /home/owner/content/res/rec/P1
-                       mkdir -p /home/owner/content/res/rec/P2
-                       chsmack -a "User::App::Shared" /home/owner/content/res/rec
-                       chsmack -e "User::App::Shared" /home/owner/content/res/rec
-                       chsmack -a "User::App::Shared" /home/owner/content/res/rec/P1
-                       chsmack -e "User::App::Shared" /home/owner/content/res/rec/P1
-                       chsmack -a "User::App::Shared" /home/owner/content/res/rec/P2
-                       chsmack -e "User::App::Shared" /home/owner/content/res/rec/P2
-                       cp rec/P1/*.jpg /home/owner/content/res/rec/P1/
-                       cp rec/P2/*.jpg /home/owner/content/res/rec/P2/
-                       chsmack -a "User::App::Shared" /home/owner/content/res/rec/*
-                       chsmack -e "User::App::Shared" /home/owner/content/res/rec/*
-                       chsmack -a "User::App::Shared" /home/owner/content/res/rec/P1/*
-                       chsmack -e "User::App::Shared" /home/owner/content/res/rec/P1/*
-                       chsmack -a "User::App::Shared" /home/owner/content/res/rec/P2/*
-                       chsmack -e "User::App::Shared" /home/owner/content/res/rec/P2/*
+                       mkdir -p /home/owner/share/res/rec/P1
+                       mkdir -p /home/owner/share/res/rec/P2
+                       chsmack -a "User::App::Shared" /home/owner/share/res/rec
+                       chsmack -e "User::App::Shared" /home/owner/share/res/rec
+                       chsmack -a "User::App::Shared" /home/owner/share/res/rec/P1
+                       chsmack -e "User::App::Shared" /home/owner/share/res/rec/P1
+                       chsmack -a "User::App::Shared" /home/owner/share/res/rec/P2
+                       chsmack -e "User::App::Shared" /home/owner/share/res/rec/P2
+                       cp rec/P1/*.jpg /home/owner/share/res/rec/P1/
+                       cp rec/P2/*.jpg /home/owner/share/res/rec/P2/
+                       chsmack -a "User::App::Shared" /home/owner/share/res/rec/*
+                       chsmack -e "User::App::Shared" /home/owner/share/res/rec/*
+                       chsmack -a "User::App::Shared" /home/owner/share/res/rec/P1/*
+                       chsmack -e "User::App::Shared" /home/owner/share/res/rec/P1/*
+                       chsmack -a "User::App::Shared" /home/owner/share/res/rec/P2/*
+                       chsmack -e "User::App::Shared" /home/owner/share/res/rec/P2/*
                        
-                       mkdir -p /home/owner/content/res/eye
-                       chsmack -a "User::App::Shared" /home/owner/content/res/eye
-                       chsmack -e "User::App::Shared" /home/owner/content/res/eye
-                       cp res/eye/*.jpg /home/owner/content/res/eye/
-                       chsmack -a "User::App::Shared" /home/owner/content/res/eye/*
-                       chsmack -e "User::App::Shared" /home/owner/content/res/eye/*
+                       mkdir -p /home/owner/share/res/eye
+                       chsmack -a "User::App::Shared" /home/owner/share/res/eye
+                       chsmack -e "User::App::Shared" /home/owner/share/res/eye
+                       cp res/eye/*.jpg /home/owner/share/res/eye/
+                       chsmack -a "User::App::Shared" /home/owner/share/res/eye/*
+                       chsmack -e "User::App::Shared" /home/owner/share/res/eye/*
                        
-                       mkdir -p /home/owner/content/res/expr
-                       chsmack -a "User::App::Shared" /home/owner/content/res/expr
-                       chsmack -e "User::App::Shared" /home/owner/content/res/expr
-                       cp res/expr/*.jpg  /home/owner/content/res/expr/
-                       chsmack -a "User::App::Shared" /home/owner/content/res/expr/*
-                       chsmack -e "User::App::Shared" /home/owner/content/res/expr/*
+                       mkdir -p /home/owner/share/res/expr
+                       chsmack -a "User::App::Shared" /home/owner/share/res/expr
+                       chsmack -e "User::App::Shared" /home/owner/share/res/expr
+                       cp res/expr/*.jpg  /home/owner/share/res/expr/
+                       chsmack -a "User::App::Shared" /home/owner/share/res/expr/*
+                       chsmack -e "User::App::Shared" /home/owner/share/res/expr/*
                        
-                       mkdir -p /home/owner/content/res/track/sequence
-                       chsmack -a "User::App::Shared" /home/owner/content/res/track/sequence
-                       chsmack -e "User::App::Shared" /home/owner/content/res/track/sequence
-                       cp res/track/sequence/*.jpg /home/owner/content/res/track/sequence/
-                       chsmack -a "User::App::Shared" /home/owner/content/res/track/sequence/*
-                       chsmack -e "User::App::Shared" /home/owner/content/res/track/sequence/*
+                       mkdir -p /home/owner/share/res/track/sequence
+                       chsmack -a "User::App::Shared" /home/owner/share/res/track/sequence
+                       chsmack -e "User::App::Shared" /home/owner/share/res/track/sequence
+                       cp res/track/sequence/*.jpg /home/owner/share/res/track/sequence/
+                       chsmack -a "User::App::Shared" /home/owner/share/res/track/sequence/*
+                       chsmack -e "User::App::Shared" /home/owner/share/res/track/sequence/*
                        
-                       mkdir -p /home/owner/content/res/facedetect
-                       chsmack -a "User::App::Shared" /home/owner/content/res/facedetect
-                       chsmack -e "User::App::Shared" /home/owner/content/res/facedetect
-                       cp res/facedetect/*.jpg %{buildroot}/home/owner/content/res/facedetect/
-                       chsmack -a "User::App::Shared" /home/owner/content/res/facedetect/*
-                       chsmack -e "User::App::Shared" /home/owner/content/res/facedetect/*
+                       mkdir -p /home/owner/share/res/facedetect
+                       chsmack -a "User::App::Shared" /home/owner/share/res/facedetect
+                       chsmack -e "User::App::Shared" /home/owner/share/res/facedetect
+                       cp res/facedetect/*.jpg %{buildroot}/home/owner/share/res/facedetect/
+                       chsmack -a "User::App::Shared" /home/owner/share/res/facedetect/*
+                       chsmack -e "User::App::Shared" /home/owner/share/res/facedetect/*
                        
-                       mkdir -p /home/owner/content/res/image
-                       chsmack -a "User::App::Shared" /home/owner/content/res/image
-                       chsmack -e "User::App::Shared" /home/owner/content/res/image
-                       cp res/image/*.jpg %{buildroot}/home/owner/content/res/image/
-                       chsmack -a "User::App::Shared" /home/owner/content/res/image/*
-                       chsmack -e "User::App::Shared" /home/owner/content/res/image/*
+                       mkdir -p /home/owner/share/res/image
+                       chsmack -a "User::App::Shared" /home/owner/share/res/image
+                       chsmack -e "User::App::Shared" /home/owner/share/res/image
+                       cp res/image/*.jpg %{buildroot}/home/owner/share/res/image/
+                       chsmack -a "User::App::Shared" /home/owner/share/res/image/*
+                       chsmack -e "User::App::Shared" /home/owner/share/res/image/*
                        
-                       mkdir -p /home/owner/content/res/image/tracking
-                       chsmack -a "User::App::Shared" /home/owner/content/res/image/tracking
-                       chsmack -e "User::App::Shared" /home/owner/content/res/image/tracking
-                       cp res/image/tracking/*.jpg /home/owner/content/res/image/tracking/
-                       chsmack -a "User::App::Shared" /home/owner/content/res/image/tracking/*
-                       chsmack -e "User::App::Shared" /home/owner/content/res/image/tracking/*
+                       mkdir -p /home/owner/share/res/image/tracking
+                       chsmack -a "User::App::Shared" /home/owner/share/res/image/tracking
+                       chsmack -e "User::App::Shared" /home/owner/share/res/image/tracking
+                       cp res/image/tracking/*.jpg /home/owner/share/res/image/tracking/
+                       chsmack -a "User::App::Shared" /home/owner/share/res/image/tracking/*
+                       chsmack -e "User::App::Shared" /home/owner/share/res/image/tracking/*
                        
-                       mkdir -p /home/owner/content/res/surv
-                       chsmack -a "User::App::Shared" /home/owner/content/res/surv
-                       chsmack -e "User::App::Shared" /home/owner/content/res/surv
-                       cp res/surv/* /home/owner/content/res/surv/
-                       chsmack -a "User::App::Shared" /home/owner/content/res/surv/*
-                       chsmack -e "User::App::Shared" /home/owner/content/res/surv/*
+                       mkdir -p /home/owner/share/res/surv
+                       chsmack -a "User::App::Shared" /home/owner/share/res/surv
+                       chsmack -e "User::App::Shared" /home/owner/share/res/surv
+                       cp res/surv/* /home/owner/share/res/surv/
+                       chsmack -a "User::App::Shared" /home/owner/share/res/surv/*
+                       chsmack -e "User::App::Shared" /home/owner/share/res/surv/*
                        ;;
        "org.tizen.capi-message-port-native-utc")
                        echo "Installing pre-requisites for the package $1"
@@ -515,4 +515,4 @@ case "$1" in
                        chsmack -a "User::App::Shared" ../../data/*
                        chsmack -e "User::App::Shared" ../../data/*
                        ;;
-esac
\ No newline at end of file
+esac
index e05e275..3f76170 100755 (executable)
@@ -36,7 +36,7 @@ def gen(tcfile):
                
                fil.write('      <testcase component="NativeAPI/'+MODULE_NAME_C+'/'+set+'" execution_type="auto" id="'+tcname+'" purpose="'+tcpurpose+'">\n')
                fil.write('        <description>\n')
-               fil.write('          <test_script_entry test_script_expected_result="0">/home/owner/content/tct/opt/tct-'+MODULE_NAME+'-native-'+BUILD_TYPE+'/external_wrapper.sh '+MODULE_FULL_NAME+' '+tcname+' '+BUILD_TYPE+'</test_script_entry>\n')
+               fil.write('          <test_script_entry test_script_expected_result="0">/home/owner/share/tct/opt/tct-'+MODULE_NAME+'-native-'+BUILD_TYPE+'/external_wrapper.sh '+MODULE_FULL_NAME+' '+tcname+' '+BUILD_TYPE+'</test_script_entry>\n')
                fil.write('        </description>\n')
                fil.write('      </testcase>\n')
        
index 77198ae..075daec 100755 (executable)
@@ -117,7 +117,7 @@ def install(TYPE, MODNAME, PROFILE):
                                pkg_name_m=re.search('^\sPKG_NAME=(?P<pkg_name>%{PKG_NAME})', line)
                                pkg_fname_m=re.search('^\sPKG_FULLNAME=(?P<pkg_fname>%{PKG_FULLNAME})', line)
                                if ( pkg_dir_m != None ):
-                                       PKG_DIR=dirSeparator+'home'+dirSeparator+'owner'+dirSeparator+'content'+dirSeparator+'tct'+dirSeparator+TCT_DIR
+                                       PKG_DIR=dirSeparator+'home'+dirSeparator+'owner'+dirSeparator+'share'+dirSeparator+'tct'+dirSeparator+TCT_DIR
                                        line=line.replace('%{PKG_DIR}', '"'+PKG_DIR+'"')
                                elif ( pkg_name_m != None ):
                                        line=line.replace('%{PKG_NAME}', '"'+PKG_NAME+'"')