From 4b3a2596298a7e973c40bbdfb54c129264a712bf Mon Sep 17 00:00:00 2001 From: JUN JIE NAN Date: Wed, 26 Jun 2024 15:46:24 +0800 Subject: [PATCH] Run unit tests via sudo Since distrobuilder should run via root. Signed-off-by: JUN JIE NAN --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fe8997b2..23a23575 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,8 @@ SPHINXENV=.sphinx/venv/bin/activate .PHONY: default default: + go env -w GOCACHE=$(shell go env GOCACHE) + $(shell go env | grep -v GOENV | sed "s/'//g" > $(shell go env GOENV)) gofmt -s -w . go install -v ./... @echo "distrobuilder built successfully" @@ -16,7 +18,7 @@ update-gomod: .PHONY: check check: default - go test -v ./... + sudo GOENV=$(shell go env GOENV) go test -v ./... .PHONY: dist dist: