Commit 360066ee authored by Jameson Rollins's avatar Jameson Rollins

test: attempt at better cleanup of systemd-run slice

Apparently the slice doesn't go away after systemd-run is complete, at least
when run with --scope.  Manually issue stop for the slice after test is
complete to clean up slice.
parent e1ae9bd6
......@@ -11,6 +11,7 @@ WITH_SYSTEMD := $(shell which systemd-run)
ifdef WITH_SYSTEMD
TEST_NAME := guardtest_$(shell date | md5sum | cut -b -7)
TEST_EXEC := systemd-run --user --scope --unit=$(TEST_NAME) --slice=$(TEST_NAME) #--collect
TEST_CLEAN := systemctl --user stop $(TEST_NAME).slice
endif
##########
......@@ -21,8 +22,10 @@ all: build
.PHONY: test
test:
$(TEST_EXEC) ./test/guardian-test $(GUARD_TEST_OPTS)
$(TEST_CLEAN)
test-verbose:
$(TEST_EXEC) ./test/guardian-test --verbose $(GUARD_TEST_OPTS)
$(TEST_CLEAN)
##########
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment