Skip to content

Commit

Permalink
Setting up necessary dependencies for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JackDanger committed Aug 12, 2015
1 parent 8ec6bf3 commit cc2f3ec
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion run_unit_tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
export AIRFLOW_HOME=${AIRFLOW_HOME:=~/airflow}
export AIRFLOW_CONFIG=$AIRFLOW_HOME/unittests.cfg
nosetests --with-doctest --with-coverage --cover-erase --cover-html --cover-package=airflow -v --cover-html-dir=airflow/www/static/coverage --logging-level=DEBUG

# Generate the `airflow` executable if needed
which airflow > /dev/null || python setup.py develop

# initialize the test db
AIRFLOW_DB=$AIRFLOW_HOME/unittests.db
ls -s $AIRFLOW_DB > /dev/null 2>&1 || airflow initdb # if it's missing
ls -s $AIRFLOW_DB | egrep '^0 ' > /dev/null && airflow initdb # if it's blank

nosetests --with-doctest \
--with-coverage \
--cover-erase \
--cover-html \
--cover-package=airflow \
--cover-html-dir=airflow/www/static/coverage \
-v \
--logging-level=DEBUG
# To run individual tests:
# nosetests tests.core:CoreTest.test_scheduler_job

0 comments on commit cc2f3ec

Please sign in to comment.