Blob


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