-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.sh
executable file
·64 lines (48 loc) · 1.38 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
#!/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/cocotb
cd ${TEST_DIR}
# 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=True"
make cocotb TARGET=UdpIpEthTx SUPPORT_RDMA=False
echo -e "\nStart testing UdpIpEthRx with SUPPORT_RDMA=True"
make cocotb TARGET=UdpIpEthRx SUPPORT_RDMA=False
make clean
# 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