Bug 1064895

Summary: [ patch ] - enable running of test suite through python-coverage
Product: Red Hat Enterprise Linux 7 Reporter: Alexander Todorov <atodorov>
Component: python-blivetAssignee: mulhern <amulhern>
Status: CLOSED CURRENTRELEASE QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: high    
Version: 7.0CC: amulhern
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-blivet-0.18.26-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 10:04:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1065422, 1065431, 1065437, 1065443    
Bug Blocks: 782468    
Attachments:
Description Flags
blivet + coverage patch none

Description Alexander Todorov 2014-02-13 13:54:48 UTC
Created attachment 862789 [details]
blivet + coverage patch

Patch tested on master and f20-branch. Please push to Rawhide as well.

Comment 2 mulhern 2014-02-14 16:15:37 UTC
I'm working with other test suite issues so think I should pick this one up, too.

Comment 3 mulhern 2014-02-18 20:21:24 UTC
acked.

Comment 4 mulhern 2014-02-19 15:28:21 UTC
Fixed In Version: python-blivet-0.18.26-1

Comment 6 Alexander Todorov 2014-03-19 14:45:08 UTC
# make coverage
...
======================================================================
ERROR: udev_test (unittest.loader.ModuleImportFailure)
----------------------------------------------------------------------
ImportError: Failed to import test module: udev_test
Traceback (most recent call last):
  File "/usr/lib64/python2.7/unittest/loader.py", line 252, in _find_tests
    module = self._get_module_from_name(name)
  File "/usr/lib64/python2.7/unittest/loader.py", line 230, in _get_module_from_name
    __import__(name)
  File "/root/blivet-0.18.33/tests/udev_test.py", line 4, in <module>
    import mock
ImportError: No module named mock



# coverage report
Name                               Stmts   Miss Branch BrMiss  Cover
--------------------------------------------------------------------
blivet/__init__                     1757   1734    938    936     1%
tests/action_test                    450    448     14     14     1%
tests/formats_test/__init__            0      0      0      0   100%
tests/formats_test/labeling_test      95     92     20     20     3%
tests/formats_test/selinux_test       62     57      2      2     8%
tests/partitioning_test               55     53      2      2     4%
tests/sanity_check_test               21     19      2      2     9%
tests/size_test                       70     68     14     14     2%
tests/tsort_test                      37     35      6      6     5%
tests/udev_test                      101     99     12     12     2%
--------------------------------------------------------------------
TOTAL                               2648   2605   1010   1008     1%




The particular issue of having a make target to execute the test suite under python-coverage has been verified with python-blivet-0.18.33-1.el7. However python-mock is not available in the RHEL 7 repos. I will open another bug for that.

Comment 7 Ludek Smid 2014-06-13 10:04:51 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.