Blob


1 Running server regression tests requires some manual system preparation.
3 Two dedicated user accounts and a group must be created. Password login
4 for these users should be disabled.
6 $ doas groupadd gotsh
7 $ doas useradd -m -G gotsh got
8 $ doas useradd -m -G gotsh gotdev
10 The above user and group names correspond to defaults used by the test suite.
11 If needed, the defaults can be overridden on by passing values for the
12 following variables to make(1): GOTD_USER, GOTD_DEVUSER, GOTD_GROUP
14 An SSH key must be added to ~gotdev/.ssh/authorized_keys, such that the
15 following command succeeds non-interactively:
17 $ ssh gotdev@127.0.0.1
19 The login shell of the gotdev user should be set to gotsh(1).
20 It is recommended to run the test suite using a locally built gotsh binary,
21 rather than /usr/local/bin/gotsh (which might be using messages in an
22 out-of-date format on the gotd socket).
23 For this to work, $HOME/bin/gotsh must be added to /etc/shells first.
25 $ doas usermod -s $HOME/bin/gotsh gotdev
27 If adding this file to /etc/shells is a problem, a locally built gotsh
28 binary can be made available in the command search path of the gotdev
29 user under the names git-receive-pack and git-upload-pack. When made
30 available in a non-standard PATH directory such as ~gotdev/bin, the
31 gotdev user's PATH must be set appropriately in sshd_config (see below).
33 Tests will run the locally built gotd binary found in gotd/obj/gotd.
34 The test suite creates the corresponding gotd socket in ~gotdev/gotd.sock.
35 To make this work, the GOTD_UNIX_SOCKET variable must be set by sshd
36 when the gotdev user logs in. The following should be added to the file
37 /etc/ssh/sshd_config:
39 Match User gotdev
40 SetEnv GOTD_UNIX_SOCKET=/home/gotdev/gotd.sock
41 # The following line is not needed when gotsh is used as login shell:
42 SetEnv PATH=/home/gotdev/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
43 DisableForwarding yes
44 PermitTTY no
46 sshd must be restarted for configuration changes to take effect:
48 $ doas rcctl restart sshd
50 The server test suite can now be run from the top-level directory:
52 $ doas pkg_add git # if not already done
53 $ doas make server-regress
55 The suite must be started as root in order to be able to start and stop gotd.
56 The test suite switches to non-root users as appropriate.