diff --git a/.coveragerc b/.coveragerc index 095caa82210..ad04dd9faa6 100644 --- a/.coveragerc +++ b/.coveragerc @@ -20,3 +20,6 @@ omit = keras/layers/cudnn_recurrent.py keras/legacy/* keras/utils/multi_gpu_utils.py + keras/backend/theano_backend.py + keras/backend/tensorflow_backend.py + keras/backend/cntk_backend.py diff --git a/.travis.yml b/.travis.yml index c67cc8f4649..15fdd78eaa0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -72,16 +72,8 @@ install: # install cntk - pip install cntk - # exclude different backends to measure a coverage for the designated backend only - - if [[ "$KERAS_BACKEND" != "tensorflow" ]]; then - echo ' keras/backend/tensorflow_backend.py' >> .coveragerc; - fi - - if [[ "$KERAS_BACKEND" != "theano" ]]; then - echo ' keras/backend/theano_backend.py' >> .coveragerc; - fi - - if [[ "$KERAS_BACKEND" != "cntk" ]]; then - echo ' keras/backend/cntk_backend.py' >> .coveragerc; - fi + # Remove the current backend from the coverage exclusion. + - sed -i "\/keras\/backend\/${KERAS_BACKEND}_backend.py/d" .coveragerc # detect whether core files are changed or not - export CORE_CHANGED=False;