mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-16 20:33:52 +01:00
Use an absolute path when specifying the directory for synapse in jenkins.sh
This commit is contained in:
parent
64b6606824
commit
9036d2d6a8
1 changed files with 8 additions and 8 deletions
16
jenkins.sh
16
jenkins.sh
|
@ -22,9 +22,7 @@ tox
|
||||||
|
|
||||||
: ${GIT_BRANCH:="origin/$(git rev-parse --abbrev-ref HEAD)"}
|
: ${GIT_BRANCH:="origin/$(git rev-parse --abbrev-ref HEAD)"}
|
||||||
|
|
||||||
set +u
|
TOX_BIN=$WORKSPACE/.tox/py27/bin
|
||||||
. .tox/py27/bin/activate
|
|
||||||
set -u
|
|
||||||
|
|
||||||
if [[ ! -e .sytest-base ]]; then
|
if [[ ! -e .sytest-base ]]; then
|
||||||
git clone https://github.com/matrix-org/sytest.git .sytest-base --mirror
|
git clone https://github.com/matrix-org/sytest.git .sytest-base --mirror
|
||||||
|
@ -48,7 +46,8 @@ export PERL5LIB PERL_MB_OPT PERL_MM_OPT
|
||||||
: ${PORT_BASE:=8000}
|
: ${PORT_BASE:=8000}
|
||||||
|
|
||||||
echo >&2 "Running sytest with SQLite3";
|
echo >&2 "Running sytest with SQLite3";
|
||||||
./run-tests.pl --coverage -O tap --synapse-directory .. --all --port-base $PORT_BASE > results-sqlite3.tap
|
./run-tests.pl --coverage -O tap --synapse-directory $WORKSPACE \
|
||||||
|
--python $TOX_BIN/python --all --port-base $PORT_BASE > results-sqlite3.tap
|
||||||
|
|
||||||
RUN_POSTGRES=""
|
RUN_POSTGRES=""
|
||||||
|
|
||||||
|
@ -66,8 +65,9 @@ done
|
||||||
# Run if both postgresql databases exist
|
# Run if both postgresql databases exist
|
||||||
if test $RUN_POSTGRES = ":$(($PORT_BASE + 1)):$(($PORT_BASE + 2))"; then
|
if test $RUN_POSTGRES = ":$(($PORT_BASE + 1)):$(($PORT_BASE + 2))"; then
|
||||||
echo >&2 "Running sytest with PostgreSQL";
|
echo >&2 "Running sytest with PostgreSQL";
|
||||||
pip install psycopg2
|
$TOX_BIN/pip install psycopg2
|
||||||
./run-tests.pl --coverage -O tap --synapse-directory .. --all --port-base $PORT_BASE > results-postgresql.tap
|
./run-tests.pl --coverage -O tap --synapse-directory $WORKSPACE \
|
||||||
|
--python $TOX_BIN/python --all --port-base $PORT_BASE > results-postgresql.tap
|
||||||
else
|
else
|
||||||
echo >&2 "Skipping running sytest with PostgreSQL, $RUN_POSTGRES"
|
echo >&2 "Skipping running sytest with PostgreSQL, $RUN_POSTGRES"
|
||||||
fi
|
fi
|
||||||
|
@ -76,6 +76,6 @@ cd ..
|
||||||
cp sytest/.coverage.* .
|
cp sytest/.coverage.* .
|
||||||
|
|
||||||
# Combine the coverage reports
|
# Combine the coverage reports
|
||||||
python -m coverage combine
|
$TOX_BIN/python -m coverage combine
|
||||||
# Output coverage to coverage.xml
|
# Output coverage to coverage.xml
|
||||||
coverage xml -o coverage.xml
|
$TOX_BIN/coverage xml -o coverage.xml
|
||||||
|
|
Loading…
Reference in a new issue