Skip to contentSkip to conversation

run-opentest: introduce OPENTEST_BOOT_ATTEMPTS and OPENTEST_BOOT_TIMEOUT vars

PATCH New Denys Dmytriyenko 1 participant 1 message Sep 22, 2014 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 run-opentest: introduce OPENTEST_BOOT_ATTEMPTS and OPENTEST_BOOT_TIMEOUT vars

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)

---
 configs/arago-core-tisdk-daisy-puget.txt |  6 ++++++
 lib/run-opentest                         | 16 ++++++++++++++--
 2 files changed, 20 insertions(+), 2 deletions(-)
configs/arago-core-tisdk-daisy-puget.txt +6 -0
index 45b835f..9ab568b 100644
@@ -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.
lib/run-opentest +14 -2
index 4d8d2b0..4ae0e27 100644
@@ -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.
Signature · 1 line
2.0.4