Commit e772899b authored by Raphael Defosseux's avatar Raphael Defosseux

CI: better reporting on basic simulator

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent c8eb68d5
...@@ -317,9 +317,74 @@ then ...@@ -317,9 +317,74 @@ then
echo " <th>Statistics</th>" >> ./test_simulator_results.html echo " <th>Statistics</th>" >> ./test_simulator_results.html
echo " </tr>" >> ./test_simulator_results.html echo " </tr>" >> ./test_simulator_results.html
PING_TESTS=`ls $ARCHIVES_LOC/*ping*txt` BW_CASES=(05 10 20)
for PING_CASE in $PING_TESTS for BW in ${BW_CASES[@]}
do do
ENB_LOG=$ARCHIVES_LOC/enb_${BW}MHz.log
UE_LOG=`echo $ENB_LOG | sed -e "s#enb#ue#"`
if [ -f $ENB_LOG ] && [ -f $UE_LOG ]
then
NAME_ENB=`echo $ENB_LOG | sed -e "s#$ARCHIVES_LOC/##"`
NAME_UE=`echo $UE_LOG | sed -e "s#$ARCHIVES_LOC/##"`
echo " <tr>" >> ./test_simulator_results.html
echo " <td>$NAME_ENB --- $NAME_UE</td>" >> ./test_simulator_results.html
echo " <td>N/A</td>" >> ./test_simulator_results.html
NB_ENB_GOT_SYNC=`egrep -c "got sync" $ENB_LOG`
NB_UE_GOT_SYNC=`egrep -c "got sync" $UE_LOG`
NB_ENB_SYNCED_WITH_UE=`egrep -c "got UE capabilities for UE" $ENB_LOG`
if [ $NB_ENB_GOT_SYNC -eq 1 ] && [ $NB_UE_GOT_SYNC -eq 2 ] && [ $NB_ENB_SYNCED_WITH_UE -eq 1 ]
then
echo " <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html
else
echo " <td bgcolor = \"red\" >OK</td>" >> ./test_simulator_results.html
fi
echo " <td><pre>" >> ./test_simulator_results.html
if [ $NB_ENB_GOT_SYNC -eq 1 ]
then
echo "<font color = \"blue\">- eNB --> got sync</font>" >> ./test_simulator_results.html
else
echo "<font color = \"red\"><b>- eNB NEVER got sync</b></font>" >> ./test_simulator_results.html
fi
if [ $NB_UE_GOT_SYNC -eq 2 ]
then
echo "<font color = \"blue\">- UE --> got sync</font>" >> ./test_simulator_results.html
else
echo "<font color = \"red\"><b>- UE NEVER got sync</b></font>" >> ./test_simulator_results.html
fi
if [ $NB_ENB_SYNCED_WITH_UE -eq 1 ]
then
echo "<font color = \"blue\">- UE attached to eNB</font>" >> ./test_simulator_results.html
else
echo "<font color = \"red\"><b>- UE NEVER attached to eNB</b></font>" >> ./test_simulator_results.html
fi
NB_SEGFAULT_ENB=`egrep -i -c "Segmentation Fault" $ENB_LOG`
if [ $NB_SEGFAULT_ENB -ne 0 ]
then
echo "<font color = \"red\"><b>- eNB --> Segmentation Fault</b></font>" >> ./test_simulator_results.html
fi
NB_SEGFAULT_UE=`egrep -i -c "Segmentation Fault" $UE_LOG`
if [ $NB_SEGFAULT_UE -ne 0 ]
then
echo "<font color = \"red\"><b>- UE --> Segmentation Fault</b></font>" >> ./test_simulator_results.html
fi
NB_ASSERTION_ENB=`egrep -i -c "Assertion" $ENB_LOG`
if [ $NB_ASSERTION_ENB -ne 0 ]
then
echo "<font color = \"red\"><b>- eNB --> Assertion</b></font>" >> ./test_simulator_results.html
awk 'BEGIN{assertion=10}{if(assertion < 3){print " " $0; assertion++};if ($0 ~/Assertion/){print " " $0;assertion=1}}END{}' $ENB_LOG >> ./test_simulator_results.html
fi
NB_ASSERTION_UE=`egrep -i -c "Assertion" $UE_LOG`
if [ $NB_ASSERTION_UE -ne 0 ]
then
echo "<font color = \"red\"><b>- eNB --> Assertion</b></font>" >> ./test_simulator_results.html
awk 'BEGIN{assertion=10}{if(assertion < 3){print " " $0; assertion++};if ($0 ~/Assertion/){print " " $0;assertion=1}}END{}' $UE_LOG >> ./test_simulator_results.html
fi
echo " </pre></td>" >> ./test_simulator_results.html
echo " </tr>" >> ./test_simulator_results.html
fi
PING_CASE=$ARCHIVES_LOC/${BW}MHz_ping_ue.txt
if [ -f $PING_CASE ]
then
echo " <tr>" >> ./test_simulator_results.html echo " <tr>" >> ./test_simulator_results.html
NAME=`echo $PING_CASE | sed -e "s#$ARCHIVES_LOC/##"` NAME=`echo $PING_CASE | sed -e "s#$ARCHIVES_LOC/##"`
echo " <td>$NAME</td>" >> ./test_simulator_results.html echo " <td>$NAME</td>" >> ./test_simulator_results.html
...@@ -353,9 +418,15 @@ then ...@@ -353,9 +418,15 @@ then
echo " </td>" >> ./test_simulator_results.html echo " </td>" >> ./test_simulator_results.html
fi fi
echo " </tr>" >> ./test_simulator_results.html echo " </tr>" >> ./test_simulator_results.html
done fi
IPERF_TESTS=`ls $ARCHIVES_LOC/*iperf*client*txt` if [ -f $ARCHIVES_LOC/${BW}*iperf*dl*client*txt ]
then
IPERF_TESTS=`ls $ARCHIVES_LOC/${BW}*iperf*client*txt`
else
echo "There are no iperf files"
IPERF_TESTS=""
fi
for IPERF_CASE in $IPERF_TESTS for IPERF_CASE in $IPERF_TESTS
do do
echo " <tr>" >> ./test_simulator_results.html echo " <tr>" >> ./test_simulator_results.html
...@@ -429,6 +500,7 @@ then ...@@ -429,6 +500,7 @@ then
echo " </td>" >> ./test_simulator_results.html echo " </td>" >> ./test_simulator_results.html
echo " </tr>" >> ./test_simulator_results.html echo " </tr>" >> ./test_simulator_results.html
done done
done
echo " </table>" >> ./test_simulator_results.html echo " </table>" >> ./test_simulator_results.html
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment