From 3aaca2e3395ab88170ef4704c6dde652a9e9479d Mon Sep 17 00:00:00 2001 From: Andrey Kurilin Date: Tue, 26 May 2015 19:01:09 -0700 Subject: [PATCH] Improvement of cover script *.pyc files break cover-script for situations like: some/module.py -> some.py So we should remove all *.pyc files before launching `testr --coverage` Change-Id: Ica22a3cd1a26d27c01f314a48a7cd49a529552eb --- tests/ci/cover.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ci/cover.sh b/tests/ci/cover.sh index 8f97a490..209511c4 100755 --- a/tests/ci/cover.sh +++ b/tests/ci/cover.sh @@ -28,7 +28,7 @@ uncommited=$(git status --porcelain | grep -v "^??") git checkout HEAD^ baseline_report=$(mktemp -t rally_coverageXXXXXXX) -python setup.py testr --coverage --testr-args="$*" +find . -type f -name "*.pyc" -delete && python setup.py testr --coverage --testr-args="$*" coverage report > $baseline_report baseline_missing=$(awk 'END { print $3 }' $baseline_report) @@ -38,7 +38,7 @@ git checkout - # Generate and save coverage report current_report=$(mktemp -t rally_coverageXXXXXXX) -python setup.py testr --coverage --testr-args="$*" +find . -type f -name "*.pyc" -delete && python setup.py testr --coverage --testr-args="$*" coverage report > $current_report current_missing=$(awk 'END { print $3 }' $current_report)