10 ifeq ($(UNCONFIGURE),)
27 VPPSRC=$(shell pwd)/../..
30 ifeq ($(UBUNTU_CODENAME),)
31 UBUNTU_CODENAME=$(shell grep '^UBUNTU_CODENAME=' /etc/os-release | cut -f2- -d=)
35 ARCH=$(shell dpkg --print-architecture)
38 list_tests = @(grep -r ') Test' *_test.go | cut -d '*' -f2 | cut -d '(' -f1 | \
39 tr -d ' ' | tr ')' '/' | sed 's/Suite//')
44 @echo " test - run tests"
45 @echo " build - build test infra"
46 @echo " build-debug - build test infra (vpp debug image)"
47 @echo " build-go - just build golang files"
48 @echo " fixstyle - format .go source files"
49 @echo " list-tests - list all tests"
51 @echo "make build arguments:"
52 @echo " UBUNTU_VERSION - ubuntu version for docker image"
53 @echo " HST_EXTENDED_TESTS - build extended tests"
55 @echo "make test arguments:"
56 @echo " PERSIST=[true|false] - whether clean up topology and dockers after test"
57 @echo " VERBOSE=[true|false] - verbose output"
58 @echo " UNCONFIGURE=[true|false] - unconfigure selected test"
59 @echo " DEBUG=[true|false] - attach VPP to GDB"
60 @echo " TEST=[test-name] - specific test to run"
61 @echo " CPUS=[n-cpus] - number of cpus to run with vpp"
62 @echo " VPPSRC=[path-to-vpp-src] - path to vpp source files (for gdb)"
64 @echo "List of all tests:"
72 @make -C ../.. build-release
78 test: .deps.ok .build.vpp
79 @bash ./test --persist=$(PERSIST) --verbose=$(VERBOSE) \
80 --unconfigure=$(UNCONFIGURE) --debug=$(DEBUG) --test=$(TEST) --cpus=$(CPUS) \
84 go build ./tools/http_server
86 build: .deps.ok build-vpp-release build-go
88 bash ./script/build_hst.sh release
91 build-debug: .deps.ok build-vpp-debug build-go
93 bash ./script/build_hst.sh debug
97 @sudo make install-deps
103 && apt-get install -y apt-transport-https ca-certificates curl software-properties-common \
104 && apt-get install -y golang apache2-utils wrk bridge-utils
105 @if [ ! -f /usr/share/keyrings/docker-archive-keyring.gpg ] ; then \
106 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg; \
107 echo "deb [arch=$(ARCH) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(UBUNTU_CODENAME) stable" \
108 | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null ; \
111 @apt-get install -y docker-ce