Make sure that the test policy is properly unloaded when `make test` fails, to prevent it from accidentally lingering on the system after a failed test. Signed-off-by: Ondrej Mosnacek <omosnace@xxxxxxxxxx> --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9081406..8efe15c 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,11 @@ all: test: make -C policy load - make -C tests test + make -C tests test || { \ + res=$$?; \ + make -C policy unload; \ + exit $$res; \ + } make -C policy unload check-syntax: -- 2.29.2