URL
https://opencores.org/ocsvn/pci/pci/trunk
Subversion Repositories pci
[/] [pci/] [tags/] [rel_7/] [sim/] [rtl_sim/] [log/] [parse_monitor_logs.scr] - Rev 104
Go to most recent revision | Compare with Previous | Blame | View Log
#!/bin/bash for pci_mon_log in `ls *pci_mon.log` ; do echo "Parsing:" $pci_mon_log # split log file into sections csplit -s -f "pci_mon_part" \ ./$pci_mon_log /"Monitor will complain in following section for a few times - testbench is intentionally causing parity errors"/ {*} for pci_mon_log_part in `ls pci_mon_part*` ; do if [ $pci_mon_log_part == "pci_mon_part00" ] ; then lines_in_part0=`wc -l < ./pci_mon_part00` if [ $lines_in_part0 -ne 1 ] ; then echo "WARNING! Error detected before the first section of pci monitor expected messages!" fi rm $pci_mon_log_part continue fi # parts of log file should now consist of sections between start and end marker of monitor complaining # check if the last line contains an end complaining section marker last_line_is_end_marker=$(tail -n 1 $pci_mon_log_part | grep -c "End of Monitor complaining section") if [ $last_line_is_end_marker -ne 1 ] ; then echo "WARNING! Unexpected warning or error detected in the "$pci_mon_log" file!" fi rm $pci_mon_log_part done done for pciu_mon_log in `ls *pciu_mon.log` ; do echo "Parsing:" $pciu_mon_log # split log file into sections csplit -s -f "pciu_mon_part" \ ./$pciu_mon_log /"Monitor should complain in following section for two times about STB de-asserted without slave response"/ {*} for pciu_mon_log_part in `ls pciu_mon_part*` ; do if [ $pciu_mon_log_part == "pciu_mon_part00" ] ; then lines_in_part0=`wc -l < ./pciu_mon_part00` if [ $lines_in_part0 -ne 1 ] ; then echo "WARNING! Error detected before the first section of pciu monitor expected messages!" fi rm $pciu_mon_log_part continue fi # parts of log file should now consist of sections between start and end marker of monitor complaining # check if the last line contains an end complaining section marker last_line_is_end_marker=$(tail -n 1 $pciu_mon_log_part | grep -c "Monitor should NOT complain any more") if [ $last_line_is_end_marker -ne 1 ] ; then echo "WARNING! Unexpected warning or error detected in the "$pciu_mon_log" file!" fi rm $pciu_mon_log_part done done for wbu_mon_log in `ls *wbu_mon.log` ; do echo "Parsing: "$wbu_mon_log num_of_lines_in_wbu_log=$(wc -l < $wbu_mon_log) if [ $num_of_lines_in_wbu_log -ne 1 ] ; then echo "WARNING! Unexpected warning or error detected in the "$wbu_mon_log" file!" fi done
Go to most recent revision | Compare with Previous | Blame | View Log