-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrun.sh
executable file
·77 lines (56 loc) · 1.71 KB
/
run.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
#!/bin/bash
set -o errexit
set -o nounset
set -o xtrace
in_server=0
while getopts 's' op; do
if [ $op == 's' ]; then
in_server=1
fi
done
if [ $in_server == 1 ]; then
BASH_PROFILE=$HOME/.bash_profile
if [ -f "$BASH_PROFILE" ]; then
source $BASH_PROFILE
fi
fi
# Update submodules
git submodule update --init --recursive
# Check or format Code format
echo -e "\nStart check code format"
if [ $in_server == 1 ]; then
black --check $(find ./ -name "*.py")
else
black $(find ./ -name "*.py")
fi
ROOT_DIR=`pwd`
TEST_DIR=${ROOT_DIR}/test/
# Run Cocotb Testbench
cd ${TEST_DIR}/cocotb
# Run Tests with SUPPORT_RDMA=True
echo -e "\nStart testing UdpIpEthTx with SUPPORT_RDMA=True"
make cocotb TARGET=UdpIpEthTx SUPPORT_RDMA=True
echo -e "\nStart testing UdpIpEthRx with SUPPORT_RDMA=True"
make cocotb TARGET=UdpIpEthRx SUPPORT_RDMA=True
make clean
# Run Tests with SUPPORT_RDMA=False
echo -e "\nStart testing UdpIpEthTx with SUPPORT_RDMA=False"
make cocotb TARGET=UdpIpEthTx SUPPORT_RDMA=False
echo -e "\nStart testing UdpIpEthRx with SUPPORT_RDMA=False"
make cocotb TARGET=UdpIpEthRx SUPPORT_RDMA=False
make clean
# Run Bluesim Testbench
cd ${TEST_DIR}/bluesim
echo -e "\nStart testing UdpIpEthBypassRxTx with SUPPORT_RDMA=False"
make sim TARGET=UdpIpEthBypassRxTx SUPPORT_RDMA=False
make clean
echo -e "\nStart testing UdpIpEthBypassRxTx with SUPPORT_RDMA=True"
make sim TARGET=UdpIpEthBypassRxTx SUPPORT_RDMA=True
# Test UdpIpArpEthRxTx on virtual docker network
# echo -e "\nStart testing UdpIpArpEthRxTx on docker virtual network"
# make verilog TARGET=UdpIpArpEthRxTx SUPPORT_RDMA=False
# if [ $in_server == 1 ]; then
# ./run_udp_docker_test.sh -s
# else
# ./run_udp_docker_test.sh
# fi