lint_CI.sh 1.05 KB
Newer Older
1
2
3
4
RED='\033[7;31m'
GREEN='\033[7;32m'
BLUE='\033[7;36m'
NC='\033[0m' # No Color
Guillem Cabo's avatar
Guillem Cabo committed
5
TOP='injector'
6
7
8
9
10
11
############
## TOP $TOP.sv
############
# Run Spyglass
printf "Please wait, running Spyglass\n"
./local_spyglass.sh \
Guillem's avatar
Guillem committed
12
../hdl/$TOP.vhd 
Guillem Cabo's avatar
Guillem Cabo committed
13
#../hdl/$TOP.vhd  1> /dev/null
14
15
16
# TODO: add remaining files here
#Capture is there is a problem with the script
if [ $? -ne 0 ]; then
Guillem Cabo's avatar
Guillem Cabo committed
17
exit 3
18
19
fi
# check if there is a result file
Guillem Cabo's avatar
Guillem Cabo committed
20
21
echo "$TOP/consolidated_reports/${TOP}_lint_lint_rtl/moresimple.rpt"
test -f $TOP/consolidated_reports/${TOP}_lint_lint_rtl/moresimple.rpt || exit 2
22
23
# Check outcome
printf "UNIT - : ${BLUE} $TOP ${BLUE}${NC}\n"
Guillem Cabo's avatar
Guillem Cabo committed
24
cat $TOP/consolidated_reports/${TOP}lint_lint_rtl/moresimple.rpt  | grep -i 'error\|Syntax' | GREP_COLORS='mt=01;31'  egrep -i --color=always error\|syntax
25
26
if [ $? -ne 0 ]; then
printf "SPYGLASS - Chech for errors: ${GREEN}PASS${GREEN}${NC}\n"
Guillem Cabo's avatar
Guillem Cabo committed
27
cat $TOP/consolidated_reports/${TOP}lint_lint_rtl/moresimple.rpt  | GREP_COLORS='mt=01;33'  egrep -i --color=always 'warning'
28
29
30
31
32
33
else
printf "SPYGLASS - Chech for errors: ${RED}FAIL${RED}${NC}\n"
exit 1
fi

exit 0