ashb commented on a change in pull request #4938: [AIRFLOW-4117] Multi-staging 
Image - Travis CI tests [Step 3/3]
URL: https://github.com/apache/airflow/pull/4938#discussion_r268548110
 
 

 ##########
 File path: run_tests.sh
 ##########
 @@ -18,28 +18,39 @@
 # specific language governing permissions and limitations
 # under the License.
 
+set -o verbose
+set -euo pipefail
 set -x
 
+MY_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+pwd
+
+AIRFLOW_ROOT="$(cd ${MY_DIR}; pwd)"
+export AIRFLOW__CORE__DAGS_FOLDER="S{AIRFLOW_ROOT}/tests/dags"
+
+# add test/contrib to PYTHONPATH
+export PYTHONPATH=${PYTHONPATH:-${AIRFLOW_ROOT}/tests/test_utils}
+
 # environment
-export AIRFLOW_HOME=${AIRFLOW_HOME:=~}
+export AIRFLOW_HOME=${AIRFLOW_HOME:=${HOME}}
+
+echo Airflow home: ${AIRFLOW_HOME}
+
 export AIRFLOW__CORE__UNIT_TEST_MODE=True
 
-# add test/contrib to PYTHONPATH
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-export PYTHONPATH=$PYTHONPATH:${DIR}/tests/test_utils
+# add test/test_utils to PYTHONPATH TODO: Do we need that ??? Looks fishy.
+export PYTHONPATH=${PYTHONPATH}:${MY_DIR}/tests/test_utils
 
 # any argument received is overriding the default nose execution arguments:
-nose_args=$@
-
-# Generate the `airflow` executable if needed
-which airflow > /dev/null || python setup.py develop
+NOSE_ARGS=$@
 
 echo "Initializing the DB"
-yes | airflow initdb
-yes | airflow resetdb
+yes | airflow initdb || true
+yes | airflow resetdb || true
 
 Review comment:
   When do these fail? If they fail the tests will not work, so ignoring the 
error code here doesn't seem right

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to