diff --git a/scripts/test b/scripts/test index 694e56e9b..9296acb0f 100755 --- a/scripts/test +++ b/scripts/test @@ -47,7 +47,7 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then -v "$(pwd):/opt/src" \ --rm -t \ "raster-vision-${IMAGE_TYPE}" \ - coverage xml + coverage xml --omit=/opt/data/* --skip-empty ;; *) echo "Invalid argument. Run --help for usage." @@ -67,7 +67,7 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then ./scripts/integration_tests # Create new coverage reports - coverage xml + coverage xml --omit=/opt/data/* --skip-empty fi fi fi diff --git a/scripts/unit_tests b/scripts/unit_tests index 59124676f..aed7489f7 100755 --- a/scripts/unit_tests +++ b/scripts/unit_tests @@ -28,6 +28,7 @@ else if ! [ -x "$(command -v coverage)" ]; then python -m unittest discover -t "$SRC_DIR" tests -vf else - coverage run -m unittest discover -t "$SRC_DIR" tests -vf && coverage html + coverage run -m unittest discover -t "$SRC_DIR" tests -vf && \ + coverage html --omit=/opt/data/* --skip-empty --precision=2 fi fi diff --git a/tests/README.md b/tests/README.md index 871469254..31e61b1dc 100644 --- a/tests/README.md +++ b/tests/README.md @@ -50,7 +50,7 @@ coverage run -m unittest discover -t . tests -vf Generate an HTML report from the `.coverage` file: ```sh -coverage html +coverage html --omit=/opt/data/* --skip-empty --precision=2 ``` See `coverage help` for other available report formats.