From 51e46a5bb7e8fca8498628f0372a074d8ab2b55c Mon Sep 17 00:00:00 2001 From: Hao Yunfei Date: Mon, 24 Jun 2013 21:27:03 +0800 Subject: [PATCH] Updated pack.sh for adding signing white list Change-Id: Iac52c36c826d87ec26cc4f946933b2cf504850de Signed-off-by: Hao Yunfei --- tct-appwgt-wrt-tests/pack.sh | 22 +++++++++++----------- tct-appwgt-wrt-tests/signing_blackdirs | 1 - tct-ext01-wrt-tests/pack.sh | 22 +++++++++++----------- tct-ext01-wrt-tests/signing_whitedirs | 1 + tct-ext02-wrt-tests/pack.sh | 22 +++++++++++----------- tct-ext02-wrt-tests/signing_whitedirs | 6 ++++++ tct-pm-wrt-tests/pack.sh | 22 +++++++++++----------- tct-rt01-wrt-tests/pack.sh | 22 +++++++++++----------- tct-rt02-wrt-tests/pack.sh | 22 +++++++++++----------- tct-rt02-wrt-tests/signing_whitedirs | 15 +++++++++++++++ tct-sp-wrt-tests/pack.sh | 22 +++++++++++----------- tct-sp-wrt-tests/signing_whitedirs | 3 +++ tct-stab-wrt-tests/pack.sh | 22 +++++++++++----------- tct-ui-wrt-tests/pack.sh | 22 +++++++++++----------- tct-ui-wrt-tests/signing_whitedirs | 1 + 15 files changed, 125 insertions(+), 100 deletions(-) delete mode 100644 tct-appwgt-wrt-tests/signing_blackdirs create mode 100644 tct-ext01-wrt-tests/signing_whitedirs create mode 100644 tct-ext02-wrt-tests/signing_whitedirs create mode 100644 tct-rt02-wrt-tests/signing_whitedirs create mode 100644 tct-sp-wrt-tests/signing_whitedirs create mode 100644 tct-ui-wrt-tests/signing_whitedirs diff --git a/tct-appwgt-wrt-tests/pack.sh b/tct-appwgt-wrt-tests/pack.sh index fcdcd88..3a56d8f 100755 --- a/tct-appwgt-wrt-tests/pack.sh +++ b/tct-appwgt-wrt-tests/pack.sh @@ -40,7 +40,7 @@ pack_fail='FALSE' suite_dir=${PWD} all_dirs=`ls -l --time-style="long-iso" $suite_dir | grep '^d' | awk '{print $8}'` black_dirs='' -signing_black_dirs='' +signing_white_dirs='' #black list reserved for some non-suite folders. if [ -f "$suite_dir/blackdirs" ]; then @@ -48,10 +48,10 @@ if [ -f "$suite_dir/blackdirs" ]; then echo "Got black dirs: $black_dirs" fi -#signning black list reserved for some non-signing folders. -if [ -f "$suite_dir/signing_blackdirs" ]; then - signing_black_dirs=`cat $suite_dir/signing_blackdirs` - echo "Got signing black dirs: $signing_black_dirs" +#signning white list reserved for some signing folders. +if [ -f "$suite_dir/signing_whitedirs" ]; then + signing_white_dirs=`cat $suite_dir/signing_whitedirs` + echo "Got signing white dirs: $signing_white_dirs" fi function check_blackdir() @@ -64,10 +64,10 @@ function check_blackdir() return 0 } -function check_signing_blackdir() +function check_signing_whitedir() { - for signing_bdir in ${signing_black_dirs[@]}; do - if [ $1 == $signing_bdir ]; then + for signing_wdir in ${signing_white_dirs[@]}; do + if [ $1 == $signing_wdir ]; then return 1; fi done @@ -102,9 +102,9 @@ for app in $all_dirs; do pack_fail='TRUE' echo "Create $app.wgt fail, continue to pack others" else - check_signing_blackdir $app - if [ $? == 1 ];then - echo "Got a signing black dir: $app" + check_signing_whitedir $app + if [ $? == 0 ];then + echo "$app is not in signing white dir, not sign for it." cd $suite_dir continue fi diff --git a/tct-appwgt-wrt-tests/signing_blackdirs b/tct-appwgt-wrt-tests/signing_blackdirs deleted file mode 100644 index a7da4fb..0000000 --- a/tct-appwgt-wrt-tests/signing_blackdirs +++ /dev/null @@ -1 +0,0 @@ -app-widget-signature-invalid diff --git a/tct-ext01-wrt-tests/pack.sh b/tct-ext01-wrt-tests/pack.sh index fcdcd88..3a56d8f 100755 --- a/tct-ext01-wrt-tests/pack.sh +++ b/tct-ext01-wrt-tests/pack.sh @@ -40,7 +40,7 @@ pack_fail='FALSE' suite_dir=${PWD} all_dirs=`ls -l --time-style="long-iso" $suite_dir | grep '^d' | awk '{print $8}'` black_dirs='' -signing_black_dirs='' +signing_white_dirs='' #black list reserved for some non-suite folders. if [ -f "$suite_dir/blackdirs" ]; then @@ -48,10 +48,10 @@ if [ -f "$suite_dir/blackdirs" ]; then echo "Got black dirs: $black_dirs" fi -#signning black list reserved for some non-signing folders. -if [ -f "$suite_dir/signing_blackdirs" ]; then - signing_black_dirs=`cat $suite_dir/signing_blackdirs` - echo "Got signing black dirs: $signing_black_dirs" +#signning white list reserved for some signing folders. +if [ -f "$suite_dir/signing_whitedirs" ]; then + signing_white_dirs=`cat $suite_dir/signing_whitedirs` + echo "Got signing white dirs: $signing_white_dirs" fi function check_blackdir() @@ -64,10 +64,10 @@ function check_blackdir() return 0 } -function check_signing_blackdir() +function check_signing_whitedir() { - for signing_bdir in ${signing_black_dirs[@]}; do - if [ $1 == $signing_bdir ]; then + for signing_wdir in ${signing_white_dirs[@]}; do + if [ $1 == $signing_wdir ]; then return 1; fi done @@ -102,9 +102,9 @@ for app in $all_dirs; do pack_fail='TRUE' echo "Create $app.wgt fail, continue to pack others" else - check_signing_blackdir $app - if [ $? == 1 ];then - echo "Got a signing black dir: $app" + check_signing_whitedir $app + if [ $? == 0 ];then + echo "$app is not in signing white dir, not sign for it." cd $suite_dir continue fi diff --git a/tct-ext01-wrt-tests/signing_whitedirs b/tct-ext01-wrt-tests/signing_whitedirs new file mode 100644 index 0000000..bc3bbe6 --- /dev/null +++ b/tct-ext01-wrt-tests/signing_whitedirs @@ -0,0 +1 @@ +application-privilege diff --git a/tct-ext02-wrt-tests/pack.sh b/tct-ext02-wrt-tests/pack.sh index fcdcd88..3a56d8f 100755 --- a/tct-ext02-wrt-tests/pack.sh +++ b/tct-ext02-wrt-tests/pack.sh @@ -40,7 +40,7 @@ pack_fail='FALSE' suite_dir=${PWD} all_dirs=`ls -l --time-style="long-iso" $suite_dir | grep '^d' | awk '{print $8}'` black_dirs='' -signing_black_dirs='' +signing_white_dirs='' #black list reserved for some non-suite folders. if [ -f "$suite_dir/blackdirs" ]; then @@ -48,10 +48,10 @@ if [ -f "$suite_dir/blackdirs" ]; then echo "Got black dirs: $black_dirs" fi -#signning black list reserved for some non-signing folders. -if [ -f "$suite_dir/signing_blackdirs" ]; then - signing_black_dirs=`cat $suite_dir/signing_blackdirs` - echo "Got signing black dirs: $signing_black_dirs" +#signning white list reserved for some signing folders. +if [ -f "$suite_dir/signing_whitedirs" ]; then + signing_white_dirs=`cat $suite_dir/signing_whitedirs` + echo "Got signing white dirs: $signing_white_dirs" fi function check_blackdir() @@ -64,10 +64,10 @@ function check_blackdir() return 0 } -function check_signing_blackdir() +function check_signing_whitedir() { - for signing_bdir in ${signing_black_dirs[@]}; do - if [ $1 == $signing_bdir ]; then + for signing_wdir in ${signing_white_dirs[@]}; do + if [ $1 == $signing_wdir ]; then return 1; fi done @@ -102,9 +102,9 @@ for app in $all_dirs; do pack_fail='TRUE' echo "Create $app.wgt fail, continue to pack others" else - check_signing_blackdir $app - if [ $? == 1 ];then - echo "Got a signing black dir: $app" + check_signing_whitedir $app + if [ $? == 0 ];then + echo "$app is not in signing white dir, not sign for it." cd $suite_dir continue fi diff --git a/tct-ext02-wrt-tests/signing_whitedirs b/tct-ext02-wrt-tests/signing_whitedirs new file mode 100644 index 0000000..2659860 --- /dev/null +++ b/tct-ext02-wrt-tests/signing_whitedirs @@ -0,0 +1,6 @@ +appcontrol-test-app +app-control-complex-wgt-3 +unit-test-for-app-control +app-control-complex-wgt-1 +app-control-complex-wgt-4 +app-control-complex-wgt-2 diff --git a/tct-pm-wrt-tests/pack.sh b/tct-pm-wrt-tests/pack.sh index fcdcd88..3a56d8f 100755 --- a/tct-pm-wrt-tests/pack.sh +++ b/tct-pm-wrt-tests/pack.sh @@ -40,7 +40,7 @@ pack_fail='FALSE' suite_dir=${PWD} all_dirs=`ls -l --time-style="long-iso" $suite_dir | grep '^d' | awk '{print $8}'` black_dirs='' -signing_black_dirs='' +signing_white_dirs='' #black list reserved for some non-suite folders. if [ -f "$suite_dir/blackdirs" ]; then @@ -48,10 +48,10 @@ if [ -f "$suite_dir/blackdirs" ]; then echo "Got black dirs: $black_dirs" fi -#signning black list reserved for some non-signing folders. -if [ -f "$suite_dir/signing_blackdirs" ]; then - signing_black_dirs=`cat $suite_dir/signing_blackdirs` - echo "Got signing black dirs: $signing_black_dirs" +#signning white list reserved for some signing folders. +if [ -f "$suite_dir/signing_whitedirs" ]; then + signing_white_dirs=`cat $suite_dir/signing_whitedirs` + echo "Got signing white dirs: $signing_white_dirs" fi function check_blackdir() @@ -64,10 +64,10 @@ function check_blackdir() return 0 } -function check_signing_blackdir() +function check_signing_whitedir() { - for signing_bdir in ${signing_black_dirs[@]}; do - if [ $1 == $signing_bdir ]; then + for signing_wdir in ${signing_white_dirs[@]}; do + if [ $1 == $signing_wdir ]; then return 1; fi done @@ -102,9 +102,9 @@ for app in $all_dirs; do pack_fail='TRUE' echo "Create $app.wgt fail, continue to pack others" else - check_signing_blackdir $app - if [ $? == 1 ];then - echo "Got a signing black dir: $app" + check_signing_whitedir $app + if [ $? == 0 ];then + echo "$app is not in signing white dir, not sign for it." cd $suite_dir continue fi diff --git a/tct-rt01-wrt-tests/pack.sh b/tct-rt01-wrt-tests/pack.sh index fcdcd88..3a56d8f 100755 --- a/tct-rt01-wrt-tests/pack.sh +++ b/tct-rt01-wrt-tests/pack.sh @@ -40,7 +40,7 @@ pack_fail='FALSE' suite_dir=${PWD} all_dirs=`ls -l --time-style="long-iso" $suite_dir | grep '^d' | awk '{print $8}'` black_dirs='' -signing_black_dirs='' +signing_white_dirs='' #black list reserved for some non-suite folders. if [ -f "$suite_dir/blackdirs" ]; then @@ -48,10 +48,10 @@ if [ -f "$suite_dir/blackdirs" ]; then echo "Got black dirs: $black_dirs" fi -#signning black list reserved for some non-signing folders. -if [ -f "$suite_dir/signing_blackdirs" ]; then - signing_black_dirs=`cat $suite_dir/signing_blackdirs` - echo "Got signing black dirs: $signing_black_dirs" +#signning white list reserved for some signing folders. +if [ -f "$suite_dir/signing_whitedirs" ]; then + signing_white_dirs=`cat $suite_dir/signing_whitedirs` + echo "Got signing white dirs: $signing_white_dirs" fi function check_blackdir() @@ -64,10 +64,10 @@ function check_blackdir() return 0 } -function check_signing_blackdir() +function check_signing_whitedir() { - for signing_bdir in ${signing_black_dirs[@]}; do - if [ $1 == $signing_bdir ]; then + for signing_wdir in ${signing_white_dirs[@]}; do + if [ $1 == $signing_wdir ]; then return 1; fi done @@ -102,9 +102,9 @@ for app in $all_dirs; do pack_fail='TRUE' echo "Create $app.wgt fail, continue to pack others" else - check_signing_blackdir $app - if [ $? == 1 ];then - echo "Got a signing black dir: $app" + check_signing_whitedir $app + if [ $? == 0 ];then + echo "$app is not in signing white dir, not sign for it." cd $suite_dir continue fi diff --git a/tct-rt02-wrt-tests/pack.sh b/tct-rt02-wrt-tests/pack.sh index fcdcd88..3a56d8f 100755 --- a/tct-rt02-wrt-tests/pack.sh +++ b/tct-rt02-wrt-tests/pack.sh @@ -40,7 +40,7 @@ pack_fail='FALSE' suite_dir=${PWD} all_dirs=`ls -l --time-style="long-iso" $suite_dir | grep '^d' | awk '{print $8}'` black_dirs='' -signing_black_dirs='' +signing_white_dirs='' #black list reserved for some non-suite folders. if [ -f "$suite_dir/blackdirs" ]; then @@ -48,10 +48,10 @@ if [ -f "$suite_dir/blackdirs" ]; then echo "Got black dirs: $black_dirs" fi -#signning black list reserved for some non-signing folders. -if [ -f "$suite_dir/signing_blackdirs" ]; then - signing_black_dirs=`cat $suite_dir/signing_blackdirs` - echo "Got signing black dirs: $signing_black_dirs" +#signning white list reserved for some signing folders. +if [ -f "$suite_dir/signing_whitedirs" ]; then + signing_white_dirs=`cat $suite_dir/signing_whitedirs` + echo "Got signing white dirs: $signing_white_dirs" fi function check_blackdir() @@ -64,10 +64,10 @@ function check_blackdir() return 0 } -function check_signing_blackdir() +function check_signing_whitedir() { - for signing_bdir in ${signing_black_dirs[@]}; do - if [ $1 == $signing_bdir ]; then + for signing_wdir in ${signing_white_dirs[@]}; do + if [ $1 == $signing_wdir ]; then return 1; fi done @@ -102,9 +102,9 @@ for app in $all_dirs; do pack_fail='TRUE' echo "Create $app.wgt fail, continue to pack others" else - check_signing_blackdir $app - if [ $? == 1 ];then - echo "Got a signing black dir: $app" + check_signing_whitedir $app + if [ $? == 0 ];then + echo "$app is not in signing white dir, not sign for it." cd $suite_dir continue fi diff --git a/tct-rt02-wrt-tests/signing_whitedirs b/tct-rt02-wrt-tests/signing_whitedirs new file mode 100644 index 0000000..72e70b3 --- /dev/null +++ b/tct-rt02-wrt-tests/signing_whitedirs @@ -0,0 +1,15 @@ +sys-launch-service-camera +sys-launch-service-gallery-show +sys-launch-service-gallery-pick +lifecycle-launch-installed-app +sys-launch-service-call +sys-launch-service-music-player +lifecycle-hide-running-app +sys-launch-service-app +sys-launch-service-image-viewer +lifecycle-exit-running-app +sys-launch-service-email +lifecycle-launch-removed-app +sys-launch-service-video-player +sys-launch-service-message + diff --git a/tct-sp-wrt-tests/pack.sh b/tct-sp-wrt-tests/pack.sh index fcdcd88..3a56d8f 100755 --- a/tct-sp-wrt-tests/pack.sh +++ b/tct-sp-wrt-tests/pack.sh @@ -40,7 +40,7 @@ pack_fail='FALSE' suite_dir=${PWD} all_dirs=`ls -l --time-style="long-iso" $suite_dir | grep '^d' | awk '{print $8}'` black_dirs='' -signing_black_dirs='' +signing_white_dirs='' #black list reserved for some non-suite folders. if [ -f "$suite_dir/blackdirs" ]; then @@ -48,10 +48,10 @@ if [ -f "$suite_dir/blackdirs" ]; then echo "Got black dirs: $black_dirs" fi -#signning black list reserved for some non-signing folders. -if [ -f "$suite_dir/signing_blackdirs" ]; then - signing_black_dirs=`cat $suite_dir/signing_blackdirs` - echo "Got signing black dirs: $signing_black_dirs" +#signning white list reserved for some signing folders. +if [ -f "$suite_dir/signing_whitedirs" ]; then + signing_white_dirs=`cat $suite_dir/signing_whitedirs` + echo "Got signing white dirs: $signing_white_dirs" fi function check_blackdir() @@ -64,10 +64,10 @@ function check_blackdir() return 0 } -function check_signing_blackdir() +function check_signing_whitedir() { - for signing_bdir in ${signing_black_dirs[@]}; do - if [ $1 == $signing_bdir ]; then + for signing_wdir in ${signing_white_dirs[@]}; do + if [ $1 == $signing_wdir ]; then return 1; fi done @@ -102,9 +102,9 @@ for app in $all_dirs; do pack_fail='TRUE' echo "Create $app.wgt fail, continue to pack others" else - check_signing_blackdir $app - if [ $? == 1 ];then - echo "Got a signing black dir: $app" + check_signing_whitedir $app + if [ $? == 0 ];then + echo "$app is not in signing white dir, not sign for it." cd $suite_dir continue fi diff --git a/tct-sp-wrt-tests/signing_whitedirs b/tct-sp-wrt-tests/signing_whitedirs new file mode 100644 index 0000000..3b06825 --- /dev/null +++ b/tct-sp-wrt-tests/signing_whitedirs @@ -0,0 +1,3 @@ +security-permission +security-policy + diff --git a/tct-stab-wrt-tests/pack.sh b/tct-stab-wrt-tests/pack.sh index fcdcd88..3a56d8f 100755 --- a/tct-stab-wrt-tests/pack.sh +++ b/tct-stab-wrt-tests/pack.sh @@ -40,7 +40,7 @@ pack_fail='FALSE' suite_dir=${PWD} all_dirs=`ls -l --time-style="long-iso" $suite_dir | grep '^d' | awk '{print $8}'` black_dirs='' -signing_black_dirs='' +signing_white_dirs='' #black list reserved for some non-suite folders. if [ -f "$suite_dir/blackdirs" ]; then @@ -48,10 +48,10 @@ if [ -f "$suite_dir/blackdirs" ]; then echo "Got black dirs: $black_dirs" fi -#signning black list reserved for some non-signing folders. -if [ -f "$suite_dir/signing_blackdirs" ]; then - signing_black_dirs=`cat $suite_dir/signing_blackdirs` - echo "Got signing black dirs: $signing_black_dirs" +#signning white list reserved for some signing folders. +if [ -f "$suite_dir/signing_whitedirs" ]; then + signing_white_dirs=`cat $suite_dir/signing_whitedirs` + echo "Got signing white dirs: $signing_white_dirs" fi function check_blackdir() @@ -64,10 +64,10 @@ function check_blackdir() return 0 } -function check_signing_blackdir() +function check_signing_whitedir() { - for signing_bdir in ${signing_black_dirs[@]}; do - if [ $1 == $signing_bdir ]; then + for signing_wdir in ${signing_white_dirs[@]}; do + if [ $1 == $signing_wdir ]; then return 1; fi done @@ -102,9 +102,9 @@ for app in $all_dirs; do pack_fail='TRUE' echo "Create $app.wgt fail, continue to pack others" else - check_signing_blackdir $app - if [ $? == 1 ];then - echo "Got a signing black dir: $app" + check_signing_whitedir $app + if [ $? == 0 ];then + echo "$app is not in signing white dir, not sign for it." cd $suite_dir continue fi diff --git a/tct-ui-wrt-tests/pack.sh b/tct-ui-wrt-tests/pack.sh index fcdcd88..3a56d8f 100755 --- a/tct-ui-wrt-tests/pack.sh +++ b/tct-ui-wrt-tests/pack.sh @@ -40,7 +40,7 @@ pack_fail='FALSE' suite_dir=${PWD} all_dirs=`ls -l --time-style="long-iso" $suite_dir | grep '^d' | awk '{print $8}'` black_dirs='' -signing_black_dirs='' +signing_white_dirs='' #black list reserved for some non-suite folders. if [ -f "$suite_dir/blackdirs" ]; then @@ -48,10 +48,10 @@ if [ -f "$suite_dir/blackdirs" ]; then echo "Got black dirs: $black_dirs" fi -#signning black list reserved for some non-signing folders. -if [ -f "$suite_dir/signing_blackdirs" ]; then - signing_black_dirs=`cat $suite_dir/signing_blackdirs` - echo "Got signing black dirs: $signing_black_dirs" +#signning white list reserved for some signing folders. +if [ -f "$suite_dir/signing_whitedirs" ]; then + signing_white_dirs=`cat $suite_dir/signing_whitedirs` + echo "Got signing white dirs: $signing_white_dirs" fi function check_blackdir() @@ -64,10 +64,10 @@ function check_blackdir() return 0 } -function check_signing_blackdir() +function check_signing_whitedir() { - for signing_bdir in ${signing_black_dirs[@]}; do - if [ $1 == $signing_bdir ]; then + for signing_wdir in ${signing_white_dirs[@]}; do + if [ $1 == $signing_wdir ]; then return 1; fi done @@ -102,9 +102,9 @@ for app in $all_dirs; do pack_fail='TRUE' echo "Create $app.wgt fail, continue to pack others" else - check_signing_blackdir $app - if [ $? == 1 ];then - echo "Got a signing black dir: $app" + check_signing_whitedir $app + if [ $? == 0 ];then + echo "$app is not in signing white dir, not sign for it." cd $suite_dir continue fi diff --git a/tct-ui-wrt-tests/signing_whitedirs b/tct-ui-wrt-tests/signing_whitedirs new file mode 100644 index 0000000..70b406a --- /dev/null +++ b/tct-ui-wrt-tests/signing_whitedirs @@ -0,0 +1 @@ +multiple-other-alarm -- 2.7.4