Change in vdsm[ovirt-3.6.1]: code coverage: change approach how to enable it
piotr.kliczewski at gmail.com
piotr.kliczewski at gmail.com
Mon Dec 21 11:29:45 UTC 2015
Piotr Kliczewski has uploaded a new change for review.
Change subject: code coverage: change approach how to enable it
......................................................................
code coverage: change approach how to enable it
Change-Id: I49d8de0fd7c329d19a80827a4c2fd26eb70e04be
Signed-off-by: Petr Balogh <pbalogh at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/49168
Continuous-Integration: Jenkins CI
Reviewed-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-by: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Tested-by: Nir Soffer <nsoffer at redhat.com>
(cherry picked from commit a037a21a7525054680845dd1b0e657d828a98893)
Reviewed-on: https://gerrit.ovirt.org/50263
Reviewed-by: Francesco Romani <fromani at redhat.com>
(cherry picked from commit 8bb3de903d47263a6f629f667e9f2ca628d742ee)
---
M lib/vdsm/config.py.in
M vdsm/vdsm
2 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/95/50795/1
diff --git a/lib/vdsm/config.py.in b/lib/vdsm/config.py.in
index 9cab004..ddaa784 100644
--- a/lib/vdsm/config.py.in
+++ b/lib/vdsm/config.py.in
@@ -406,6 +406,11 @@
('manhole_enable', 'false',
'Enable manhole debugging service (requires manhole package).'),
+ ('coverage_enable', 'false',
+ 'Enable code coverage (requires python-coverage package). '
+ 'false by default. Use environment file /etc/sysconfig/vdsm to '
+ 'set COVERAGE_PROCESS_START and COVERAGE_FILE variables.'),
+
]),
# Section: [gluster]
diff --git a/vdsm/vdsm b/vdsm/vdsm
index c9b6219..8f508d4 100755
--- a/vdsm/vdsm
+++ b/vdsm/vdsm
@@ -139,14 +139,9 @@
# plugin and we would like to print that out.
pass
- # Used to enable code coverage. On production machines
- # "coverage" should not exists and COVERAGE_PROCESS_START should not be
- # set.
- try:
+ if config.getboolean('devel', 'coverage_enable'):
import coverage
coverage.process_startup()
- except ImportError:
- pass
log = logging.getLogger('vds')
try:
--
To view, visit https://gerrit.ovirt.org/50795
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I49d8de0fd7c329d19a80827a4c2fd26eb70e04be
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6.1
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Petr Balogh <pbalogh at redhat.com>
More information about the vdsm-patches
mailing list