From d4b3f9a29306174af8cc24c8481df39925d6d276 Mon Sep 17 00:00:00 2001 From: ABHISHEK JAIN Date: Fri, 14 Sep 2018 16:58:45 +0530 Subject: [PATCH] [HAL-Test][camera module pre-condition handling for Failed case] Change-Id: Iaceecde96080606ccba044dba80e8be875bb54c2 Signed-off-by: ABHISHEK JAIN --- Scripts/PreCondition/libtbm_install.sh | 18 ++++++++++-------- Scripts/PreCondition/libtdm_install.sh | 18 ++++++++++-------- Scripts/execute.sh | 4 +++- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/Scripts/PreCondition/libtbm_install.sh b/Scripts/PreCondition/libtbm_install.sh index 8a7f7ec..537c650 100644 --- a/Scripts/PreCondition/libtbm_install.sh +++ b/Scripts/PreCondition/libtbm_install.sh @@ -34,10 +34,11 @@ function PreInstall do sleep 5 count=`sdb devices | wc -l` -# ((pre_retry+=1)) -# if [[ $pre_retry -gt "300" ]]; then -# break -# fi + ((pre_retry+=1)) + if [[ $pre_retry -gt "21" ]]; then + echo "device not detected for more than 2 min" + break; + fi done sleep 5 echo "device rebooted and detected." @@ -63,10 +64,11 @@ function PostExecute do sleep 5 count=`sdb devices | wc -l` -# ((post_retry+=1)) -# if [[ $post_retry -gt "300" ]]; then -# break -# fi + ((post_retry+=1)) + if [[ $post_retry -gt "21" ]]; then + echo "device not detected for more than 2 min" + break + fi done sleep 5 echo "device rebooted and detected." diff --git a/Scripts/PreCondition/libtdm_install.sh b/Scripts/PreCondition/libtdm_install.sh index 8f95974..61b615c 100644 --- a/Scripts/PreCondition/libtdm_install.sh +++ b/Scripts/PreCondition/libtdm_install.sh @@ -34,10 +34,11 @@ function PreInstall do sleep 5 count=`sdb devices | wc -l` -# ((pre_retry+=1)) -# if [[ $pre_retry -gt "300" ]]; then -# break -# fi + ((pre_retry+=1)) + if [[ $pre_retry -gt "21" ]]; then + echo "device not detected for more than 2 min" + break + fi done sleep 5 echo "device rebooted and detected." @@ -63,10 +64,11 @@ function PostExecute do sleep 5 count=`sdb devices | wc -l` -# ((post_retry+=1)) -# if [[ $post_retry -gt "300" ]]; then -# break -# fi + ((post_retry+=1)) + if [[ $post_retry -gt "21" ]]; then + echo "device not detected for more than 2 min" + break + fi done sleep 5 echo "device rebooted and detected." diff --git a/Scripts/execute.sh b/Scripts/execute.sh index f12c969..8e27c00 100755 --- a/Scripts/execute.sh +++ b/Scripts/execute.sh @@ -436,9 +436,11 @@ Execute_Binary() SUMMARY_GENERATION=$SUCCESS sdb root on - # HAL test execution handling for codec module + # HAL test execution handling for codec and camera module if [ "codec" == $current_mod ]; then sdb shell "echo 'codec_haltests --gtest_output=xml:/tmp/codec_haltests.xml' | su -l owner" &>> $EXEC_RESULT_DIR/$binaryname.txt + elif [ "camera" == $current_mod ]; then + sdb shell 'export XDG_RUNTIME_DIR=/run/user/5001; camera_haltests --gtest_output=xml:/tmp/camera_haltests.xml' &>> $EXEC_RESULT_DIR/$binaryname.txt else sdb shell su -c "/usr/bin/$binaryname --gtest_output=\"xml:/tmp/$binaryname.xml\"" &>> $EXEC_RESULT_DIR/$binaryname.txt fi -- 2.7.4