From: Denys Dmytriyenko <[email protected]>

They control the number of attempts to boot the target (1 by default) and the
timeout value for boot to finish (150 sec by default)

Signed-off-by: Denys Dmytriyenko <[email protected]>
---
 configs/arago-core-tisdk-daisy-puget.txt |  6 ++++++
 lib/run-opentest                         | 16 ++++++++++++++--
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/configs/arago-core-tisdk-daisy-puget.txt 
b/configs/arago-core-tisdk-daisy-puget.txt
index 45b835f..9ab568b 100644
--- a/configs/arago-core-tisdk-daisy-puget.txt
+++ b/configs/arago-core-tisdk-daisy-puget.txt
@@ -189,6 +189,12 @@ OPENTEST_HW_CAP="linux_tigt_farm"
 # testing. Otherwise uses existing bootloaders on the board (SD, NAND, etc)
 OPENTEST_BOOTLOADERS="false"
 
+# Specify the number of attempts to boot the target (default is 1)
+OPENTEST_BOOT_ATTEMPTS="3"
+
+# Specify timeout in seconds for boot to finish (default is 150 sec)
+OPENTEST_BOOT_TIMEOUT="300"
+
 # This variable will allow control over whether to perform build testing or
 # skip it.  This should usually be set to true but may be changed for
 # prototyping.
diff --git a/lib/run-opentest b/lib/run-opentest
index 4d8d2b0..4ae0e27 100644
--- a/lib/run-opentest
+++ b/lib/run-opentest
@@ -227,6 +227,18 @@ run_target_side_test() {
         esac
     fi
 
+    bootattempts=""
+    boottimeout=""
+    if [ -n $OPENTEST_BOOT_ATTEMPTS ]
+    then
+        bootattempts="~var_boot_attempts=$OPENTEST_BOOT_ATTEMPTS"
+    fi
+    if [ -n $OPENTEST_BOOT_TIMEOUT ]
+    then
+        boottimeout="~var_boot_timeout=$OPENTEST_BOOT_TIMEOUT"
+    fi
+
+
     # Start the STAF process if not already started
     daemonize $STAF_ROOT/startSTAFProc.sh
     source $STAF_ROOT/STAFEnv.sh start
@@ -252,8 +264,8 @@ run_target_side_test() {
     fi
 
     # Call opentest framework.  Echo the command being used for logging
-    echo "java -jar $OPENTEST_JAR --template penguin --hw 
platform=$oplatform,$OPENTEST_HW_CAP --sw 
kernel=$kernel$dtb~kernel_modules=$spluart$uboot~nfs=$ipaddr:$nfs_dir$ASSIGN_TO_TEE~test_scripts_root=git://http://arago-project.org/git/projects/test-automation/execution-engines/vatf-scripts.git
 --params script=/$TEST_SCRIPTS_TGT/opentest.sh"
-    java -jar $OPENTEST_JAR --template penguin --hw 
platform=$oplatform,$OPENTEST_HW_CAP --sw 
kernel=$kernel$dtb~kernel_modules=$spluart$uboot~nfs=$ipaddr:$nfs_dir$ASSIGN_TO_TEE~test_scripts_root=git://http://arago-project.org/git/projects/test-automation/execution-engines/vatf-scripts.git
 --params script=/$TEST_SCRIPTS_TGT/opentest.sh
+    echo "java -jar $OPENTEST_JAR --template penguin --hw 
platform=$oplatform,$OPENTEST_HW_CAP --sw 
kernel=$kernel$dtb~kernel_modules=$spluart$uboot$bootattempts$boottimeout~nfs=$ipaddr:$nfs_dir$ASSIGN_TO_TEE~test_scripts_root=git://http://arago-project.org/git/projects/test-automation/execution-engines/vatf-scripts.git
 --params script=/$TEST_SCRIPTS_TGT/opentest.sh"
+    java -jar $OPENTEST_JAR --template penguin --hw 
platform=$oplatform,$OPENTEST_HW_CAP --sw 
kernel=$kernel$dtb~kernel_modules=$spluart$uboot$bootattempts$boottimeout~nfs=$ipaddr:$nfs_dir$ASSIGN_TO_TEE~test_scripts_root=git://http://arago-project.org/git/projects/test-automation/execution-engines/vatf-scripts.git
 --params script=/$TEST_SCRIPTS_TGT/opentest.sh
 
 
################################################################################
 # Check the results of the opentest run.
-- 
2.0.4

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

Reply via email to