10 ifeq ($(UNCONFIGURE),)
26 ifeq ($(UBUNTU_CODENAME),)
27 UBUNTU_CODENAME=$(shell grep '^UBUNTU_CODENAME=' /etc/os-release | cut -f2- -d=)
31 ARCH=$(shell dpkg --print-architecture)
34 list_tests = @(grep -r ') Test' *_test.go | cut -d '*' -f2 | cut -d '(' -f1 | \
35 tr -d ' ' | tr ')' '/' | sed 's/Suite//')
40 @echo " test - run tests"
41 @echo " build - build test infra"
42 @echo " build-debug - build test infra (vpp debug image)"
43 @echo " build-go - just build golang files"
44 @echo " fixstyle - format .go source files"
45 @echo " list-tests - list all tests"
47 @echo "Make arguments:"
48 @echo " UBUNTU_VERSION - ubuntu version for docker image"
49 @echo " PERSIST=[true|false] - whether clean up topology and dockers after test"
50 @echo " VERBOSE=[true|false] - verbose output"
51 @echo " UNCONFIGURE=[true|false] - unconfigure selected test"
52 @echo " DEBUG=[true|false] - attach VPP to GDB"
53 @echo " TEST=[test-name] - specific test to run"
54 @echo " CPUS=[n-cpus] - number of cpus to run with vpp"
56 @echo "List of all tests:"
64 @make -C ../.. build-release
70 test: .deps.ok .build.vpp
71 @bash ./test --persist=$(PERSIST) --verbose=$(VERBOSE) \
72 --unconfigure=$(UNCONFIGURE) --debug=$(DEBUG) --test=$(TEST) --cpus=$(CPUS)
75 go build ./tools/http_server
77 build: .deps.ok build-vpp-release build-go
79 bash ./script/build.sh release
82 build-debug: .deps.ok build-vpp-debug build-go
84 bash ./script/build.sh debug
88 @sudo make install-deps
94 && apt-get install -y apt-transport-https ca-certificates curl software-properties-common \
95 && apt-get install -y golang apache2-utils wrk bridge-utils
96 @if [ ! -f /usr/share/keyrings/docker-archive-keyring.gpg ] ; then \
97 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg; \
98 echo "deb [arch=$(ARCH) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(UBUNTU_CODENAME) stable" \
99 | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null ; \
102 @apt-get install -y docker-ce