tests: fix pkg outpout directory.

This commit is contained in:
Alexandre Pujol 2024-03-17 23:20:05 +00:00
parent 8290c74e66
commit 1f3da81d5a
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
3 changed files with 4 additions and 7 deletions

View File

@ -5,6 +5,7 @@
DESTDIR ?= /
BUILD := .build
PKGDEST := /tmp/pkg
PKGNAME := apparmor.d
P = $(filter-out dpkg,$(notdir $(wildcard ${BUILD}/apparmor.d/*)))
@ -74,11 +75,11 @@ pkg:
dpkg:
@bash dists/build.sh dpkg
@sudo dpkg -i ${PKGNAME}_*.deb
@sudo dpkg -i ${PKGDEST}/${PKGNAME}_*.deb
rpm:
@bash dists/build.sh rpm
@sudo rpm -ivh --force ${PKGNAME}-*.rpm
@sudo rpm -ivh --force ${PKGDEST}/${PKGNAME}-*.rpm
tests:
@go test ./cmd/... -v -cover -coverprofile=coverage.out

View File

@ -8,8 +8,7 @@
set -eu -o pipefail
readonly COMMAND="$1"
readonly OUTPUT="$PWD"
readonly PKGDEST="${PKGDEST:-$PWD}"
readonly OUTPUT="${PKGDEST:-$PWD}"
readonly PKGNAME=apparmor.d
VERSION="0.$(git rev-list --count HEAD)"
readonly VERSION

View File

@ -23,6 +23,3 @@ debian | ubuntu | whonix)
opensuse*) make rpm ;;
*) ;;
esac
sudo rm -rf /etc/apparmor/earlypolicy/
sudo systemctl restart apparmor || sudo systemctl status apparmor