aboutsummaryrefslogtreecommitdiffstats
path: root/extras/hs-test/Makefile
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2023-03-07 22:09:20 -0500
committerFlorin Coras <florin.coras@gmail.com>2023-03-08 16:06:43 +0000
commit05120fb1a12f05bb7a56e8af6276d34688bc5542 (patch)
treece9861f2087beab861ac553b1c84301a4633e4ad /extras/hs-test/Makefile
parent1a66150f187e382b028a73f12d81c3617f8c91d7 (diff)
hs-test: fix docker-ce install
Type: fix Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I449cd4ad71e33a2dd41e53accc6b325803a32c70
Diffstat (limited to 'extras/hs-test/Makefile')
-rw-r--r--extras/hs-test/Makefile22
1 files changed, 17 insertions, 5 deletions
diff --git a/extras/hs-test/Makefile b/extras/hs-test/Makefile
index 29cbd0ea01e..eb2461dfc67 100644
--- a/extras/hs-test/Makefile
+++ b/extras/hs-test/Makefile
@@ -19,6 +19,14 @@ ifeq ($(DEBUG),)
DEBUG=false
endif
+ifeq ($(UBUNTU_CODENAME),)
+UBUNTU_CODENAME=$(shell grep '^UBUNTU_CODENAME=' /etc/os-release | cut -f2- -d=)
+endif
+
+ifeq ($(ARCH),)
+ARCH=$(shell dpkg --print-architecture)
+endif
+
list_tests = @(grep -r ') Test' *_test.go | cut -d '*' -f2 | cut -d '(' -f1 | \
tr -d ' ' | tr ')' '/' | sed 's/Suite//')
@@ -62,23 +70,27 @@ build-go:
go build ./tools/http_server
build: .deps.ok build-vpp-release build-go
- @rm .build.vpp || exit 0
+ @rm -f .build.vpp
bash ./script/build.sh release
@touch .build.vpp
build-debug: .deps.ok build-vpp-debug build-go
- @rm .build.vpp || exit 0
+ @rm -f .build.vpp
bash ./script/build.sh debug
@touch .build.vpp
.PHONY: install-deps
install-deps:
- @rm .deps.ok || exit 0
- @apt update -y && apt install -y golang docker-ce apache2-utils wrk bridge-utils
+ @rm -f .deps.ok
+ @apt update -y \
+ && apt install -y apt-transport-https ca-certificates curl software-properties-common \
+ && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \
+ && echo "deb [arch=$(ARCH) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(UBUNTU_CODENAME) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null \
+ && apt update \
+ && apt install -y golang docker-ce apache2-utils wrk bridge-utils
@touch .deps.ok
.PHONY: fixstyle
fixstyle:
@gofmt -w .
@go mod tidy
-