diff options
author | David Robillard <d@drobilla.net> | 2009-10-23 17:30:11 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-10-23 17:30:11 +0000 |
commit | 8340dcdd57ec32c9a5b59e2058740d5607f95521 (patch) | |
tree | 6f37c0f70985d4e75a3bb0d16cc516dfc307c397 /libs/evoral/wscript | |
parent | 49a6e300c38b4f4aad69177e023812bef8fda4b5 (diff) |
Unit test code coverage using lcov.
git-svn-id: svn://localhost/ardour2/branches/3.0@5892 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/evoral/wscript')
-rw-r--r-- | libs/evoral/wscript | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/libs/evoral/wscript b/libs/evoral/wscript index 41b93a084d..b03e182d51 100644 --- a/libs/evoral/wscript +++ b/libs/evoral/wscript @@ -70,9 +70,7 @@ def build(bld): libsmf.uselib = 'GLIB' libsmf.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') - # Library - obj = bld.new_task_gen('cxx', 'shlib') - obj.source = ''' + lib_source = ''' src/Control.cpp src/ControlList.cpp src/ControlSet.cpp @@ -84,17 +82,36 @@ def build(bld): src/SMF.cpp src/Sequence.cpp ''' + + # Library + obj = bld.new_task_gen('cxx', 'shlib') + obj.source = lib_source obj.export_incdirs = ['.'] - obj.includes = ['.', './src'] - obj.name = 'libevoral' - obj.target = 'evoral' - obj.uselib = 'GLIBMM GTHREAD SMF' - obj.uselib_local = 'libsmf' - obj.vnum = EVORAL_LIB_VERSION - obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') - - # Unit tests + obj.includes = ['.', './src'] + obj.name = 'libevoral' + obj.target = 'evoral' + obj.uselib = 'GLIBMM GTHREAD SMF' + obj.uselib_local = 'libsmf' + obj.vnum = EVORAL_LIB_VERSION + obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') + if bld.env['BUILD_TESTS'] and bld.env['HAVE_CPPUNIT']: + # Static library (for unit test code coverage) + obj = bld.new_task_gen('cxx', 'staticlib') + obj.source = lib_source + obj.source = lib_source + obj.export_incdirs = ['.'] + obj.includes = ['.', './src'] + obj.name = 'libevoral_static' + obj.target = 'evoral_static' + obj.uselib = 'GLIBMM GTHREAD SMF' + obj.uselib_local = 'libsmf' + obj.vnum = EVORAL_LIB_VERSION + obj.install_path = '' + obj.ccflags = [ '-fprofile-arcs', '-ftest-coverage' ] + obj.cxxflags = [ '-fprofile-arcs', '-ftest-coverage' ] + + # Unit tests obj = bld.new_task_gen('cxx', 'program') obj.source = ''' test/SequenceTest.cpp @@ -102,10 +119,13 @@ def build(bld): test/testrunner.cpp ''' obj.includes = ['.', './src'] - obj.uselib_local = 'libevoral' + obj.uselib_local = 'libevoral_static' obj.uselib = 'CPPUNIT' + obj.libs = 'gcov' obj.target = 'run-tests' obj.install_path = '' + obj.ccflags = [ '-fprofile-arcs', '-ftest-coverage' ] + obj.cxxflags = [ '-fprofile-arcs', '-ftest-coverage' ] def shutdown(): autowaf.shutdown() |