summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2023-05-31 15:02:31 -0400
committerAndrew Cady <d@jerkface.net>2023-05-31 15:04:35 -0400
commit64b293b27670161ad13874839ccd0da019f8b0ec (patch)
tree21aa02669e2faa619c40e4f26cf0847b292ab72b
parenta884f3f2e64e1c94d9568ae1961040e7ac22ffed (diff)
change names of test instances, and do some clean up after tests
-rw-r--r--Makefile2
-rw-r--r--src/fossil-test@.service10
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)
7unit_files = $(addprefix src/,$(unit_files_basenames) fossil-init@.service) 7unit_files = $(addprefix src/,$(unit_files_basenames) fossil-init@.service)
8unit_instances = $(subst @,@"$(unit_instance_name)",$(unit_files_basenames)) 8unit_instances = $(subst @,@"$(unit_instance_name)",$(unit_files_basenames))
9unit_instance = $(our_name)@$(unit_instance_name).service 9unit_instance = $(our_name)@$(unit_instance_name).service
10fossil_test_instances = '$(shell systemd-escape fossil-instance-1)' '$(shell systemd-escape a/b/c/fossil-instance-2)' 10fossil_test_instances = '$(shell systemd-escape fossil-test-instance-1)' '$(shell systemd-escape a/b/c/fossil-test-instance-2)'
11 11
12default: install start test 12default: install start test
13install: 13install:
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 ""; \
24ssh -o BatchMode=yes -o StrictHostKeyChecking=accept-new -- %i@localhost :; \ 24ssh -o BatchMode=yes -o StrictHostKeyChecking=accept-new -- %i@localhost :; \
25ssh -o BatchMode=yes -o StrictHostKeyChecking=yes -- %i@localhost uptime; \ 25ssh -o BatchMode=yes -o StrictHostKeyChecking=yes -- %i@localhost uptime; \
26cd .ssh; \ 26cd .ssh; \
27fossil clone ssh://%i@localhost/fossil-instance-1 db~$(date -Ins).fossil; \ 27fossil clone ssh://%i@localhost/fossil-test-instance-1 db~$(date -Ins).fossil; \
28fossil clone ssh://%i@localhost/a/b/c/fossil-instance-2 db~$(date -Ins).fossil; \ 28fossil clone ssh://%i@localhost/a/b/c/fossil-test-instance-2 db~$(date -Ins).fossil; \
29fossil clone ssh://%i@localhost/fossil/db db~$(date -Ins).fossil; \ 29fossil clone ssh://%i@localhost/fossil/db db~$(date -Ins).fossil; \
30' 30'
31ExecStartPost = +runuser -u '%i' -- sh -exc '\
32cd; \
33cd src; \
34rm -f a/b/c/fossil-test-instance-2.fossil a/b/c/.fossil-remotes/*/fossil-test-instance-2.*; \
35rmdir -p a/b/c/.fossil-remotes/* 2>/dev/null ; \
36'