From 3e4343f6ddea7ce8509203da738db4e262d868cb Mon Sep 17 00:00:00 2001 From: Stephen Cprek Date: Fri, 9 Dec 2016 16:38:37 -0600 Subject: Enable simics telnet port and multiple attempts to start simics Change-Id: I9059851b432f2a54e47ae479a631ef3f3e8cd8b6 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/33700 Tested-by: Jenkins Server Reviewed-by: Christian R. Geddes Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Reviewed-by: Matthew A. Ploetz Reviewed-by: Daniel M. Crowell --- src/build/citest/autocitest | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) (limited to 'src/build/citest') diff --git a/src/build/citest/autocitest b/src/build/citest/autocitest index 587ccfce6..f7374060e 100755 --- a/src/build/citest/autocitest +++ b/src/build/citest/autocitest @@ -154,6 +154,9 @@ waitkb timestamp=`date +'%H:%M:%S'` echo "$timestamp Starting autosample test..." +# see simics license usage +tail -n 500 /afs/rch/usr4/dlarson/public/stats/lic_usage.txt | grep hindsight + # Run set up in current shell echo "run autosimsetup.." export AUTOSIM_WORKDIR=$SANDBOXBASE @@ -171,9 +174,6 @@ fi waitkb -# Start simics and wait for it to reach standby -echo "Starting simics" - # If we are running under Jenkins, do "no remote execution" because built in # /tmp. if [ -z $RUNNING_UNDER_JENKINS -a -z $SANDBOX_IN_TEMP ]; @@ -186,15 +186,40 @@ else NRE="--sim_parms -nre" fi +# Start simics and wait for it to reach standby +echo "Attempting to start simics" + #autosim $VERBOSE --startsim --chkpt standby <<< chkpt not working yet -autosim $NOWIN $VERBOSE --startsim $NRE --notar +max_start_simics_attempts=5 +current_attempts=0 +while [ $current_attempts -lt $max_start_simics_attempts ]; do + echo "> Attempt $current_attempts/$max_start_simics_attempts to start simics" + autosim $NOWIN $VERBOSE --startsim $NRE --notar + if [ $? -ne 0 ] ; then + # Do not fail until max attempts tried + if [ $current_attempts -ge $max_start_simics_attempts ]; then + echo ">> ERROR: Unable to start simics $?" + stopserver ## kill the server again. + exit 1 + fi + echo ">> Failed: trying to start simics again" + sleep 15 + else + echo ">> Success: started simics" + break + fi + ((current_attempts++)) +done + +waitkb + +# open simics telnet port +autosim --simtelnet if [ $? -ne 0 ] ; then - echo "ERROR: Unable to start simics $?" - stopserver ## kill the server again. - exit 1 + echo "ERROR: Unable to open simics telnet port $?" + exit 1 fi - waitkb -- cgit v1.2.1