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