[SCons] Udated coverage testing to include the Cython module

Also, exclude the code in the 'test' and 'test_problems' directories from the
coverage statistics.
This commit is contained in:
Ray Speth 2013-01-11 22:56:52 +00:00
parent d75bf72e65
commit 89406c2410
2 changed files with 6 additions and 2 deletions

View file

@ -84,6 +84,9 @@ if localenv['OS'] == 'Windows':
compilerOpt = ' --compiler=mingw32'
else:
compilerOpt = ''
if '-fprofile-arcs' in localenv['CCFLAGS']:
localenv['py_extra_compiler_args'] = repr(['-fprofile-arcs', '-ftest-coverage'])
localenv['py_extra_link_args'] = repr(['-fprofile-arcs', '-ftest-coverage'])
dataFiles = localenv.RecursiveInstall('#interfaces/cython/cantera/data',
'#build/data')

View file

@ -66,8 +66,9 @@ def collect():
# Filter to remove non-Cantera code
subprocess.call(['lcov',
'-o', 'coverage.info',
'-r', 'coverage-raw.info',
'/usr/include/*', '*/ext/*'])
'-e', 'coverage-raw.info',
os.getcwd() + '/include/*',
os.getcwd() + '/src/*'])
os.remove('coverage-raw.info')
def genhtml():