summaryrefslogtreecommitdiff
path: root/.coveragerc
diff options
context:
space:
mode:
authorTong Li <litong01@us.ibm.com>2013-09-25 17:40:27 -0400
committerGerrit Code Review <review@openstack.org>2013-09-30 10:52:34 +0000
commit50a7dcf4216e92d4c932300379c9c20bfcff712a (patch)
treedbe9687d189e1da5aec4cef9d80470d581ddd358 /.coveragerc
parentc535527048087d3f2237ba549f48b50ba59c723d (diff)
downloadceilometer-50a7dcf4216e92d4c932300379c9c20bfcff712a.tar.gz
add coverage config file to control module coverage report
Ceilometer copies oslo common code into its code stream. When run unit tests with coverage option, the overall test code coverage percentage is low due to the enclosure of the common libraries. Adding the coverage config file will exclude these modules in the code coverage report so that developers can easily see if new test cases has increased or decreased the code test coverage. to see the code coverage report, following the following steps: 1. In ceilometer root directory, execute the following command ./run-tests --coverage 2. Once the test run completed successfully, open up the follwoing file in your browser and scroll down to the bottom to see the total number. (this patch makes that number to be 90%) <ceilometer_root_dir>/cover/index.html To keep up with this effort, whenever you add new code, please run the test code with coverage option and make sure your new code and test won't decrease the total percentage. If it did, that means you may have new code un-tested :-) Change-Id: I277c243b6aadb0e8524915452326ed875e14ce9c
Diffstat (limited to '.coveragerc')
-rw-r--r--.coveragerc5
1 files changed, 5 insertions, 0 deletions
diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 00000000..6f415c5c
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,5 @@
+[report]
+# code copied from oslo openstack common code, we do not have
+# test cases particularly for these modules, excluding them
+# from coverage report
+omit = ceilometer/openstack/common/*.py