From 64b293b27670161ad13874839ccd0da019f8b0ec Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Wed, 31 May 2023 15:02:31 -0400 Subject: change names of test instances, and do some clean up after tests --- Makefile | 2 +- src/fossil-test@.service | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5503371..d806105 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ unit_files_basenames = $(addprefix $(our_name)@.,service path timer) unit_files = $(addprefix src/,$(unit_files_basenames) fossil-init@.service) unit_instances = $(subst @,@"$(unit_instance_name)",$(unit_files_basenames)) unit_instance = $(our_name)@$(unit_instance_name).service -fossil_test_instances = '$(shell systemd-escape fossil-instance-1)' '$(shell systemd-escape a/b/c/fossil-instance-2)' +fossil_test_instances = '$(shell systemd-escape fossil-test-instance-1)' '$(shell systemd-escape a/b/c/fossil-test-instance-2)' default: install start test install: diff --git a/src/fossil-test@.service b/src/fossil-test@.service index 1643925..edfb79e 100644 --- a/src/fossil-test@.service +++ b/src/fossil-test@.service @@ -24,7 +24,13 @@ ssh-keygen -t ed25519 -f .ssh/id_ed25519 -N ""; \ ssh -o BatchMode=yes -o StrictHostKeyChecking=accept-new -- %i@localhost :; \ ssh -o BatchMode=yes -o StrictHostKeyChecking=yes -- %i@localhost uptime; \ cd .ssh; \ -fossil clone ssh://%i@localhost/fossil-instance-1 db~$(date -Ins).fossil; \ -fossil clone ssh://%i@localhost/a/b/c/fossil-instance-2 db~$(date -Ins).fossil; \ +fossil clone ssh://%i@localhost/fossil-test-instance-1 db~$(date -Ins).fossil; \ +fossil clone ssh://%i@localhost/a/b/c/fossil-test-instance-2 db~$(date -Ins).fossil; \ fossil clone ssh://%i@localhost/fossil/db db~$(date -Ins).fossil; \ ' +ExecStartPost = +runuser -u '%i' -- sh -exc '\ +cd; \ +cd src; \ +rm -f a/b/c/fossil-test-instance-2.fossil a/b/c/.fossil-remotes/*/fossil-test-instance-2.*; \ +rmdir -p a/b/c/.fossil-remotes/* 2>/dev/null ; \ +' -- cgit v1.2.3