hgitaly-test-spawn 724 Bytes
Newer Older
1
2
3
4
5
#!/bin/sh

# This script is used only in CI
set -eu

6
7
8
# CI base image has Mercurial, installed system-wide by pip3.8
# We need the specific exact version, because even python3 is 3.5.
# as this can change, let's derive it from the hashbang.
9
HG=/usr/local/bin/hg
10
11
12
13
14
15
16
INTERPRETER=$(head -1 $HG | cut -b 3-)
HEPTAPOD_PKG_PATH=$($INTERPRETER -c 'import heptapod,os; print(os.path.dirname(heptapod.__file__))')
export HGRCPATH=config/tests.hgrc:${HEPTAPOD_PKG_PATH}/required.hgrc

echo "Calling hpd-versions"
$HG hpd-versions
echo
17
18
19
20
21
22
23
24
25

echo "Starting HGitaly server"
set -x
$HG --config extensions.hgitaly= \
    hgitaly-serve \
    --repositories-root $PWD/tmp/tests/repositories \
    --listen unix:tmp/tests/hgitaly/hgitaly.socket &