From 645a9d836f63a7fb4e558c2db8bf0455ef4aac60 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 10 Oct 2019 11:40:04 +0200 Subject: [PATCH] install static webserver for server symlinked riot on CI --- scripts/ci/end-to-end-tests.sh | 2 ++ test/end-to-end-tests/riot/install.sh | 24 +++++++++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) mode change 100755 => 100644 test/end-to-end-tests/riot/install.sh diff --git a/scripts/ci/end-to-end-tests.sh b/scripts/ci/end-to-end-tests.sh index 4968bc4f72..85257420e3 100644 --- a/scripts/ci/end-to-end-tests.sh +++ b/scripts/ci/end-to-end-tests.sh @@ -34,6 +34,8 @@ ln -s $REACT_SDK_DIR/$RIOT_WEB_DIR riot/riot-web # CHROME_PATH=$(which google-chrome-stable) ./run.sh echo "--- Install synapse & other dependencies" ./install.sh +# install (only) static webserver to server symlinked local copy of riot +./riot/install.sh --without-riot mkdir logs echo "+++ Running end-to-end tests" TESTS_STARTED=1 diff --git a/test/end-to-end-tests/riot/install.sh b/test/end-to-end-tests/riot/install.sh old mode 100755 new mode 100644 index 8a942a05ea..9495234bcc --- a/test/end-to-end-tests/riot/install.sh +++ b/test/end-to-end-tests/riot/install.sh @@ -2,6 +2,14 @@ set -e RIOT_BRANCH=develop +with_riot=1 + +for i in $@; do + if [ "$i" == "--without-riot" ] ; then + with_riot=0 + fi +done + BASE_DIR=$(cd $(dirname $0) && pwd) cd $BASE_DIR # Install ComplexHttpServer (a drop in replacement for Python's SimpleHttpServer @@ -26,10 +34,12 @@ if [ -d $BASE_DIR/riot-web ]; then exit fi -curl -L https://github.com/vector-im/riot-web/archive/${RIOT_BRANCH}.zip --output riot.zip -unzip -q riot.zip -rm riot.zip -mv riot-web-${RIOT_BRANCH} riot-web -cd riot-web -yarn install -yarn run build +if [ $with_riot -eq 1 ]; then + curl -L https://github.com/vector-im/riot-web/archive/${RIOT_BRANCH}.zip --output riot.zip + unzip -q riot.zip + rm riot.zip + mv riot-web-${RIOT_BRANCH} riot-web + cd riot-web + yarn install + yarn run build +fi