Skip to content

Commit

Permalink
Merge "Fix api-lib unittests by removing the reduntant coverage repor…
Browse files Browse the repository at this point in the history
…t generation within the test class, we are already generating coverage report using subunit."
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Aug 6, 2015
2 parents 2910c9a + c801f2d commit f1eeb4e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env.Alias('controller/test', [
'controller/src/query_engine:test',
'controller/src/schema:test',
'controller/src/xmpp:test',
'controller/src/api-lib:test',
'controller/src/config/api-server:test',
'controller/src/config/schema-transformer:test',
])
Expand Down
1 change: 1 addition & 0 deletions ci_unittests.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"scons_test_targets" : [
"controller/src/config/svc_monitor:test",
"controller/src/config/schema-transformer:test",
"controller/src/api-lib:test",
"controller/src/config/api-server:test"
],
"misc_test_targets" : [ ]
Expand Down
2 changes: 2 additions & 0 deletions src/api-lib/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,6 @@ test_depends = ['/config/common/dist/cfgm_common-0.1dev.tar.gz']
env.Depends(test_cmd, [env['TOP']+x for x in test_depends])
env.Depends(cov_cmd, [env['TOP']+x for x in test_depends])

env.Alias('test', test_cmd)
env.Alias('controller/src/api-lib:test', test_cmd)
env.Alias('controller/src/api-lib:coverage', cov_cmd)
7 changes: 0 additions & 7 deletions src/api-lib/tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import sys
import socket
from pprint import pformat
import coverage
import fixtures
import testtools
from testtools import content, content_type
Expand Down Expand Up @@ -40,10 +39,6 @@ def _add_request_detail(self, op, url, headers=None, query_params=None,

def setUp(self):
super(TestCase, self).setUp()
global cov_handle
if not cov_handle:
cov_handle = coverage.coverage(source=['../../../../build/debug/api-lib/vnc_api'])
cov_handle.start()
setup_flexmock()

httpretty.enable()
Expand All @@ -59,8 +54,6 @@ def setUp(self):
def tearDown(self):
httpretty.disable()
httpretty.reset()
cov_handle.stop()
cov_handle.report(file=open('covreport.txt', 'w'))
super(TestCase, self).tearDown()
# end tearDown
# end TestCommon

0 comments on commit f1eeb4e

Please sign in to comment.