diff --git a/.travis.yml b/.travis.yml index 6e001873ac1807d961b6b8ecbf0c96ca815a7823..4c8f91c4e402c618db49c3e947d970b369cda970 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ env: - TOX_ENV=py27 SETUP=true - TOX_ENV=py34 SETUP=true - TOX_ENV=py34-unit SETUP=true + - TOX_ENV=py27-install-wheel install: - pip install tox diff --git a/Makefile b/Makefile index c7727ab6a8c2d6f060a3754f6811073ea87cf312..316a4e4b5881ebf33227f5dfefd25703e13576ef 100644 --- a/Makefile +++ b/Makefile @@ -79,6 +79,12 @@ lint-readme: tests: $(IN_VENV) nosetests $(NOSE_TESTS) +test-install-pypi: + bash install_test/test_install.bash + +test-install-wheel: dist + PULSAR_INSTALL_TARGET=$(shell pwd)/dist/pulsar_app*.whl bash install_test/test_install.bash + coverage: coverage run --source $(SOURCE_DIR) setup.py $(TEST_DIR) coverage report -m diff --git a/install_test/test_install.bash b/install_test/test_install.bash index ca82d11a1a99a996d65272a74b46f4c46e95404b..3e95ba040f39ef1de3c3ccb3f6c9190543ca5a61 100755 --- a/install_test/test_install.bash +++ b/install_test/test_install.bash @@ -2,39 +2,63 @@ set -e -echo "Start Pulsar Checks" +shopt -s nullglob +PULSAR_INSTALL_TARGET="${PULSAR_INSTALL_TARGET:-pulsar-app}" + +#PULSAR_INSTALL_TARGET=`echo $PULSAR_INSTALL_TARGET` # Expand wildcards +PLANEMO_INSTALL_TARGET="${PLANEMO_INSTALL_TARGET:-planemo==0.29.1}" + +echo "Begin Pulsar checks" SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd )" PROJECT_DIR="$SCRIPT_DIR/.." TEMP_DIR=`mktemp -d` +echo "Setting up test directory $TEMP_DIR" cd "$TEMP_DIR" mkdir pulsar cd pulsar +echo "Setting up virtualenv for Pulsar" virtualenv venv . venv/bin/activate # .venv\Scripts\activate if Windows -pip install pulsar-app +moo=`echo $PULSAR_INSTALL_TARGET` +echo $moo +echo "Installing Pulsar using 'pip install $PULSAR_INSTALL_TARGET'" +pip install $PULSAR_INSTALL_TARGET +echo "Running pulsar-config with default arguments" pulsar-config -pulsar --daemon # just pulsar if Windows +echo "Starting Pulsar in daemon mode." +pulsar --daemon +echo "Waiting for Pulsar to start." sleep 2 +echo "Running a standalone Pulsar job." pulsar-check # runs a test job +echo "Stopping Pulsar daemon." pulsar --stop-daemon - echo "End Pulsar Checks" -echo "Testing Galaxy Interactions" -pulsar --daemon # just pulsar if Windows +echo "Testing Pulsar-Galaxy Interaction" +echo "Starting Pulsar in daemon mode." +pulsar --daemon +echo "Waiting for Pulsar to start." sleep 2 cd .. +echo "Creating a virtual environment for Planemo to drive a test job." virtualenv planemo-venv . planemo-venv/bin/activate -pip install planemo +echo "Installing Pulsar using 'pip install $PLANEMO_INSTALL_TARGET'" +pip install "$PLANEMO_INSTALL_TARGET" +echo "Setting up Planemo test tools." planemo project_init --template=demo test_tools -planemo --verbose test --job_config_file "$SCRIPT_DIR/galaxy_job_conf.xml" test_tools -pulsar --stop-daemon - -echo "Ending tests. +echo "Running tool tests with Planemo through Pulsar" +planemo --verbose test --job_config_file "$SCRIPT_DIR/galaxy_job_conf.xml" test_tools/cat.xml +echo "Tests complete." +cd pulsar +. venv/bin/activate +echo "Stopping Pulsar daemon." +pulsar --stop-daemon +echo "Ending tests." diff --git a/tox.ini b/tox.ini index 0b5a9c14302bd6424dff321fb1901f92f4ecb884..d3263e50fe7779051ff05a3d666c7086d270f8a6 100644 --- a/tox.ini +++ b/tox.ini @@ -51,3 +51,10 @@ whitelist_externals = make deps = -rrequirements.txt sphinx==1.2 + +[testenv:py27-install-wheel] +commands = make test-install-wheel +skip_install = True +whitelist_externals = make +deps = + virtualenv