diff --git a/lib/galaxy/dependencies/pipfiles/develop/Pipfile b/lib/galaxy/dependencies/pipfiles/develop/Pipfile index dd036046343..af7e71ccad9 100644 --- a/lib/galaxy/dependencies/pipfiles/develop/Pipfile +++ b/lib/galaxy/dependencies/pipfiles/develop/Pipfile @@ -19,6 +19,9 @@ selenium = "*" testfixtures = "*" watchdog = "*" pygithub3 = {version = "*", markers = "python_version < '3'"} +pytest = "*" +pytest-html = "*" +pytest-pythonpath = "*" Sphinx = "<1.7" # Docs do not build with sphinx 1.7 for some reason, can't find issue. sphinx_rtd_theme = "*" lxml = "!=4.2.2" diff --git a/lib/galaxy/dependencies/pipfiles/develop/pinned-requirements.txt b/lib/galaxy/dependencies/pipfiles/develop/pinned-requirements.txt index 5947b7302a0..53ebba57b86 100644 --- a/lib/galaxy/dependencies/pipfiles/develop/pinned-requirements.txt +++ b/lib/galaxy/dependencies/pipfiles/develop/pinned-requirements.txt @@ -21,6 +21,9 @@ pathtools==0.1.2 pbr==4.1.0 pygithub3==0.5.1; python_version < '3' pygments==2.2.0 +pytest==3.7.0 +pytest-html==1.19.0 +pytest-pythonpath==0.7.2 pytz==2018.5 pyyaml==3.12 recommonmark==0.4.0 diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 00000000000..cf83b3d43cb --- /dev/null +++ b/pytest.ini @@ -0,0 +1,4 @@ +[pytest] +log_cli=true +log_level=DEBUG +python_paths=lib diff --git a/run_tests.sh b/run_tests.sh index c45821544d4..8de8335e29a 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -11,6 +11,7 @@ cat <&2 exit ${exit_status} diff --git a/scripts/plugin_staging.py b/scripts/plugin_staging.py index 1c21cc13614..c35ed5a3566 100644 --- a/scripts/plugin_staging.py +++ b/scripts/plugin_staging.py @@ -18,7 +18,10 @@ def link_up_static(f): elif not os.path.exists(dest_parent): # Create parent dir structure to symlink directly to static. os.makedirs(dest_parent) - os.symlink(src, dest) + try: + os.symlink(src, dest) + except Exception: + pass if __name__ == "__main__": diff --git a/test/docker/base/Dockerfile b/test/docker/base/Dockerfile index 112d0de6350..46a6a5533e4 100644 --- a/test/docker/base/Dockerfile +++ b/test/docker/base/Dockerfile @@ -10,7 +10,9 @@ ENV DEBIAN_FRONTEND=noninteractive \ MYSQL_MAJOR=5.7 \ POSTGRES_MAJOR=9.5 \ GALAXY_ROOT=/galaxy \ - GALAXY_VIRTUAL_ENV=/galaxy_venv + GALAXY_VIRTUAL_ENV=/galaxy_venv \ + GALAXY_VIRTUAL_ENV_2=/galaxy_venv \ + GALAXY_VIRTUAL_ENV_3=/galaxy_venv3 # Pre-install a bunch of packages to speed up ansible steps. RUN apt-get update -y && apt-get install -y software-properties-common apt-transport-https curl && \ @@ -79,11 +81,15 @@ RUN mkdir /etc/galaxy && cd /tmp/ansible && mkdir roles && \ apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN cd $GALAXY_ROOT && \ - ./scripts/common_startup.sh || { echo "common_startup.sh failed"; exit 1; } && \ - dev_requirements=./lib/galaxy/dependencies/dev-requirements.txt && \ - [ -f $dev_requirements ] && $GALAXY_VIRTUAL_ENV/bin/pip install -r $dev_requirements + for VENV in $GALAXY_VIRTUAL_ENV_2 $GALAXY_VIRTUAL_ENV_3; do \ + export GALAXY_VIRTUAL_ENV=$VENV && \ + ./scripts/common_startup.sh || { echo "common_startup.sh failed"; exit 1; } && \ + dev_requirements=./lib/galaxy/dependencies/dev-requirements.txt && \ + [ -f $dev_requirements ] && $VENV/bin/pip install -r $dev_requirements; done -RUN . $GALAXY_VIRTUAL_ENV/bin/activate && \ +RUN for VENV in $GALAXY_VIRTUAL_ENV_2 $GALAXY_VIRTUAL_ENV_3; do \ + export GALAXY_VIRTUAL_ENV=$VENV && \ + . $GALAXY_VIRTUAL_ENV/bin/activate && \ pip install psycopg2 && \ pip install mysql && \ cd $GALAXY_ROOT && \ @@ -101,7 +107,7 @@ RUN . $GALAXY_VIRTUAL_ENV/bin/activate && \ echo "Prepopulating toolshed sqlite database" && \ TOOL_SHED_CONFIG_DATABASE_CONNECTION="sqlite:////opt/galaxy/toolshed.sqlite" bash create_db.sh tool_shed && \ echo "Prepopulating toolshed mysql database" && \ - TOOL_SHED_CONFIG_DATABASE_CONNECTION="mysql://galaxy:galaxy@localhost/toolshed?unix_socket=/var/run/mysqld/mysqld.sock" bash create_db.sh tool_shed + TOOL_SHED_CONFIG_DATABASE_CONNECTION="mysql://galaxy:galaxy@localhost/toolshed?unix_socket=/var/run/mysqld/mysqld.sock" bash create_db.sh tool_shed; done # bcftools for Galaxy. RUN mkdir -p /tmp/install && \ diff --git a/test/docker/base/run_test_wrapper.sh b/test/docker/base/run_test_wrapper.sh index 1a4f2337a6e..f2ae8f986f7 100644 --- a/test/docker/base/run_test_wrapper.sh +++ b/test/docker/base/run_test_wrapper.sh @@ -18,7 +18,7 @@ echo "Creating galaxy user with uid $GALAXY_TEST_UID - it may already exist and useradd -u $GALAXY_TEST_UID -r -g galaxy -d /home/galaxy -c "Galaxy User" galaxy -s /bin/bash | true echo "Setting galaxy user password - the operation may fail." echo "galaxy:galaxy" | chpasswd | true -chown -R "$GALAXY_TEST_UID:$GALAXY_TEST_UID" /galaxy_venv +chown -R "$GALAXY_TEST_UID:$GALAXY_TEST_UID" "${GALAXY_VIRTUAL_ENV:-/galaxy_venv}" : ${GALAXY_TEST_DATABASE_TYPE:-"postgres"} if [ "$GALAXY_TEST_DATABASE_TYPE" = "postgres" ];