mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-24 04:09:23 -05:00
Use a PORT_BASE environment variable to configure the ports that sytest uses
This commit is contained in:
parent
f280726037
commit
a33c0748e3
16
jenkins.sh
16
jenkins.sh
@ -42,22 +42,14 @@ export PERL5LIB PERL_MB_OPT PERL_MM_OPT
|
|||||||
|
|
||||||
./install-deps.pl
|
./install-deps.pl
|
||||||
|
|
||||||
for port in 800{1,2}; do
|
: ${PORT_BASE:=8000}
|
||||||
if test -e localhost-$port/database.yaml; then
|
|
||||||
cat > localhost-$port/database.yaml << EOF
|
|
||||||
name: sqlite3
|
|
||||||
args:
|
|
||||||
database: ':memory:'
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo >&2 "Running sytest with SQLite3";
|
echo >&2 "Running sytest with SQLite3";
|
||||||
./run-tests.pl -O tap --synapse-directory .. --all > results.tap
|
./run-tests.pl -O tap --synapse-directory .. --all --port-base $PORT_BASE > results.tap
|
||||||
|
|
||||||
RUN_POSTGRES=""
|
RUN_POSTGRES=""
|
||||||
|
|
||||||
for port in 800{1,2}; do
|
for port in $(($PORT_BASE + 1)) $(($PORT_BASE + 2)); do
|
||||||
if psql synapse_jenkins_$port <<< ""; then
|
if psql synapse_jenkins_$port <<< ""; then
|
||||||
RUN_POSTGRES=$RUN_POSTGRES:$port
|
RUN_POSTGRES=$RUN_POSTGRES:$port
|
||||||
cat > localhost-$port/database.yaml << EOF
|
cat > localhost-$port/database.yaml << EOF
|
||||||
@ -69,7 +61,7 @@ EOF
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Run if both postgresql databases exist
|
# Run if both postgresql databases exist
|
||||||
if test $RUN_POSTGRES = ":8001:8002"; 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
|
pip install psycopg2
|
||||||
./run-tests.pl -O tap --synapse-directory .. --all > results.tap
|
./run-tests.pl -O tap --synapse-directory .. --all > results.tap
|
||||||
|
Loading…
Reference in New Issue
Block a user