-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathci.sh
76 lines (65 loc) · 2.64 KB
/
ci.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
################################################################################
# FUNCTIONS
################################################################################
ci_simulate () {
start_time=$(date +%s)
echo -n -e " $(date +%x\ %H:%M:%S) - \033[1;33mSIMULATING $1 $2... \033[0m"
make simulate TOP=$1 CONFIG=$2 > /dev/null
end_time=$(date +%s)
time_diff=$((end_time - start_time))
echo -e "\033[1;32mDone!\033[0m ($time_diff seconds)"
echo ""
}
################################################################################
# CLEANUP
################################################################################
start_time=$(date +%s)
clear
make print_logo
echo -n -e " $(date +%x\ %H:%M:%S) - \033[1;33mCLEANING UP TEMPORATY FILES... \033[0m"
make -s clean
end_time=$(date +%s)
time_diff=$((end_time - start_time))
echo -e "\033[1;32mDone!\033[0m ($time_diff seconds)"
echo ""
################################################################################
# SIMULATE
################################################################################
ci_simulate encoder_tb default
ci_simulate exe_m64_mult_tb default
ci_simulate fixed_priority_arbiter_tb default
ci_simulate instr_decoder_tb default
ci_simulate instr_launcher_tb default
ci_simulate pipeline_split_tb default
ci_simulate pipeline_tb default
ci_simulate priority_encoder_tb default
ci_simulate reg_gnt_ckr_tb default
ci_simulate regfile_tb default
ci_simulate rotating_xbar_tb default
ci_simulate round_robin_arbiter_tb default
ci_simulate xbar_tb default
################################################################################
# COLLECT & PRINT
################################################################################
rm -rf temp_ci_issues
touch temp_ci_issues
grep -s -r "\[1;31m\[FAIL\]" ./log | sed "s/.*\.log://g" >> temp_ci_issues
grep -s -r "ERROR:" ./log | sed "s/.*\.log://g" >> temp_ci_issues
echo -e ""
echo -e "\033[1;36m___________________________ CI REPORT ___________________________\033[0m"
grep -s -r "\[1;32m\[PASS\]" ./log | sed "s/.*\.log://g"
grep -s -r "\[1;31m\[FAIL\]" ./log | sed "s/.*\.log://g"
grep -s -r "WARNING:" ./log | sed "s/.*\.log://g"
grep -s -r "ERROR:" ./log | sed "s/.*\.log://g"
echo -e "\n"
echo -e "\033[1;36m____________________________ SUMMARY ____________________________\033[0m"
echo -n "PASS : "
grep -s -r "\[1;32m\[PASS\]" ./log | sed "s/.*\.log://g" | wc -l
echo -n "FAIL : "
grep -s -r "\[1;31m\[FAIL\]" ./log | sed "s/.*\.log://g" | wc -l
echo -n "WARNING : "
grep -s -r "WARNING:" ./log | sed "s/.*\.log://g" | wc -l
echo -n "ERROR : "
grep -s -r "ERROR:" ./log | sed "s/.*\.log://g" | wc -l
echo -e ""