Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set -e on test script #494

Merged
merged 1 commit into from
Sep 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions docker/synapse_sytest.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env bash

set -x
set -ex

# Attempt to find a sytest to use.
# If /test/run-tests.pl exists, it means that a SyTest checkout has been mounted into the Docker image.
Expand All @@ -14,17 +14,11 @@ else

# Try and fetch the branch
echo "Trying to get same-named sytest branch..."
wget -q https://github.com/matrix-org/sytest/archive/$branch_name.tar.gz -O sytest.tar.gz

if [ $? -eq 0 ]
then
# The download succeeded, use that.
echo "Using $branch_name!"
else
wget -q https://github.com/matrix-org/sytest/archive/$branch_name.tar.gz -O sytest.tar.gz || {
# Probably a 404, fall back to develop
echo "Using develop instead..."
wget -q https://github.com/matrix-org/sytest/archive/develop.tar.gz -O sytest.tar.gz
fi
}

tar --strip-components=1 -xf sytest.tar.gz

Expand Down Expand Up @@ -61,9 +55,8 @@ $PYTHON -m virtualenv -p $PYTHON /venv/
./install-deps.pl

# Run the tests
./run-tests.pl -I Synapse --python=/venv/bin/python -O tap --all > results.tap

TEST_STATUS=$?
TEST_STATUS=0
./run-tests.pl -I Synapse --python=/venv/bin/python -O tap --all > results.tap || TEST_STATUS=$?

# Copy out the logs
cp results.tap /logs/results.tap
Expand Down