summaryrefslogtreecommitdiffstats
path: root/src/build/citest/autocitest
diff options
context:
space:
mode:
Diffstat (limited to 'src/build/citest/autocitest')
-rwxr-xr-xsrc/build/citest/autocitest64
1 files changed, 48 insertions, 16 deletions
diff --git a/src/build/citest/autocitest b/src/build/citest/autocitest
index 0cb8d078f..3e29c414f 100755
--- a/src/build/citest/autocitest
+++ b/src/build/citest/autocitest
@@ -154,8 +154,11 @@ 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
+# see simics license usage.
+hindsight_license=$(echo "hindsight_usage-"`date +%Y`-`date +%B`".log")
+# show last 4 hours. Gives alittle insight to license usage trends.
+#This log file is added to every twenty minutes. There are spaces between each line. 4x2x3=24 lines
+tail -n 24 /gsa/ausgsa/projects/s/simics_test/license_logs/$hindsight_license
# Run set up in current shell
echo "run autosimsetup.."
@@ -333,10 +336,11 @@ while [ $(($modsstarted)) -lt 1 -o $(($modsstarted)) -ne $(($modscompleted)) ];
sleep 20
((loopcount++)) # increment loopcount
echo "loopcount = $loopcount"
-
+ date +'%H:%M:%S'
echo "modscompleted log command"
- echo "autosim $NOWIN --simcmd \"print ((system_cmp0.phys_mem).read 0x$mods_completed_addr 0x08)\" 1> $SBXHOME/modscompleted.log 2> /dev/null"
- autosim $NOWIN --simcmd "print ((system_cmp0.phys_mem).read 0x$mods_completed_addr 0x08)" 1> $SBXHOME/modscompleted.log 2> /dev/null
+ echo "autosim $NOWIN --simcmd \"print ((system_cmp0.phys_mem).read 0x$mods_completed_addr 0x08)\" 1> $SBXHOME/modscompleted.log 2> /dev/null"
+ autosim $NOWIN --simcmd "print ((system_cmp0.phys_mem).read 0x$mods_completed_addr 0x08)" 1> $SBXHOME/modscompleted.log 2> /dev/null
+ date +'%H:%M:%S'
echo
echo "modscompleted command"
@@ -344,9 +348,11 @@ while [ $(($modsstarted)) -lt 1 -o $(($modsstarted)) -ne $(($modscompleted)) ];
modscompleted=`cat $SBXHOME/modscompleted.log | awk '/0x/ {print strtonum($1)}'`
echo
+ date +'%H:%M:%S'
echo "modsstarted log command"
- echo "autosim $NOWIN --simcmd \"print ((system_cmp0.phys_mem).read 0x$mods_started_addr 0x08)\" 1> $SBXHOME/modsstarted.log 2> /dev/null"
- autosim $NOWIN --simcmd "print ((system_cmp0.phys_mem).read 0x$mods_started_addr 0x08)" 1> $SBXHOME/modsstarted.log 2> /dev/null
+ echo "autosim $NOWIN --simcmd \"print ((system_cmp0.phys_mem).read 0x$mods_started_addr 0x08)\" 1> $SBXHOME/modsstarted.log 2> /dev/null"
+ autosim $NOWIN --simcmd "print ((system_cmp0.phys_mem).read 0x$mods_started_addr 0x08)" 1> $SBXHOME/modsstarted.log 2> /dev/null
+ date +'%H:%M:%S'
echo
echo "modsstarted command"
@@ -356,18 +362,35 @@ while [ $(($modsstarted)) -lt 1 -o $(($modsstarted)) -ne $(($modscompleted)) ];
echo "ModulesStarted:ModulesCompleted => $modsstarted:$modscompleted"
- # @TODO RTC:149210 temporary fix for autosim hangs on real code errors. For some reason
- # when we hit an actual bug and simics halts, the autosim commands hang
- # causing this loop to take >8 hours.
- if [ -z $modsstarted ] && [ -z $modscompleted ]; then
- echo "ERROR: autosim hanging on real code errors, temporarily catching early"
- echo "See archived hbTracMerg for more info"
- exit 1
+ # For code coverage, sometimes simics takes a while to respond as it dumps data.
+ # Allow it to continue if this condition is seen.
+ if [[ -z "${HOSTBOOT_PROFILE}" ]]; then
+ # @TODO RTC:149210 temporary fix for autosim hangs on real code errors. For some reason
+ # when we hit an actual bug and simics halts, the autosim commands hang
+ # causing this loop to take >8 hours.
+ if [ -z $modsstarted ] && [ -z $modscompleted ]; then
+ echo "ERROR: autosim hanging on real code errors, temporarily catching early"
+ echo "See archived hbTracMerg for more info"
+ exit 1
+ fi
+ fi
+
+ if [[ -z "${HOSTBOOT_PROFILE}" ]]; then
+ if [[ "$CHIP" == "AXONE" ]]; then
+ # 75 minutes for axone
+ loop_timeout=225
+ else
+ # 50 minutes by default
+ loop_timeout=150
+ fi
+ else
+ # Increase timeout to 166 minutes for code coverage
+ loop_timeout=500
fi
- if [ "$loopcount" -ge 150 ]; then
+ if [ "$loopcount" -ge "$loop_timeout" ]; then
timestamp=`date +'%H:%M:%S'`
- echo "$timestamp ERROR: timed out after 50 minutes waiting for until test completion"
+ echo "$timestamp ERROR: timed out waiting for until test completion"
autosim $NOWIN --simcmd "hb-Ps with-backtrace"
timeout=$(($modsstarted - $modscompleted))
break
@@ -467,6 +490,15 @@ if [ $? -ne 0 ] ; then
echo "ERROR: Unable to run $?"
fi
+if [[ ! -z "${HOSTBOOT_PROFILE}" ]]; then
+ # After simics test are complete, dump data.
+ echo "====> hb-Gcov..."
+ autosim $NOWIN --simcmd "hb-Gcov" --timeout 300
+ if [ $? -ne 0 ] ; then
+ echo "ERROR: Unable to run $?"
+ fi
+fi
+
########################################################
## done. Stop the simulation
########################################################
OpenPOWER on IntegriCloud