2015-11-10 19:52:45 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
2015-03-18 18:48:36 +03:00
|
|
|
export AIRFLOW_HOME=${AIRFLOW_HOME:=~/airflow}
|
2015-04-06 22:21:47 +03:00
|
|
|
export AIRFLOW_CONFIG=$AIRFLOW_HOME/unittests.cfg
|
2015-08-12 19:17:23 +03:00
|
|
|
|
2015-11-10 19:52:45 +03:00
|
|
|
# any argument received is overriding the default nose execution arguments:
|
|
|
|
|
|
|
|
nose_args=$@
|
|
|
|
if [ -a $nose_args ]; then
|
|
|
|
nose_args="--with-coverage \
|
|
|
|
--cover-erase \
|
|
|
|
--cover-html \
|
|
|
|
--cover-package=airflow \
|
|
|
|
--cover-html-dir=airflow/www/static/coverage \
|
|
|
|
-v \
|
|
|
|
--logging-level=DEBUG
|
|
|
|
#--with-doctest \
|
|
|
|
"
|
|
|
|
fi
|
|
|
|
|
2015-08-12 19:17:23 +03:00
|
|
|
# Generate the `airflow` executable if needed
|
|
|
|
which airflow > /dev/null || python setup.py develop
|
|
|
|
|
2015-10-18 00:04:56 +03:00
|
|
|
echo "Initializing the DB"
|
2015-10-17 23:44:19 +03:00
|
|
|
airflow initdb
|
2015-08-12 19:17:23 +03:00
|
|
|
|
2015-11-10 19:52:45 +03:00
|
|
|
echo "Starting the unit tests with the following nose arguments: "$nose_args
|
|
|
|
nosetests $nose_args
|
|
|
|
|
2015-06-05 20:41:36 +03:00
|
|
|
# To run individual tests:
|
2015-05-10 01:30:40 +03:00
|
|
|
# nosetests tests.core:CoreTest.test_scheduler_job
|