diff options
author | David Robillard <d@drobilla.net> | 2011-01-19 18:51:23 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-01-19 18:51:23 +0000 |
commit | 012704dc8ac981a95c1a0efaa92629d43e9a9dcb (patch) | |
tree | f70757df5623d8dee6731c2ecbae8221c2224146 /autowaf.py | |
parent | a6d0764facb5c8111d7c0c38a1ff82d9e38ddbfb (diff) | |
download | autowaf-012704dc8ac981a95c1a0efaa92629d43e9a9dcb.tar.gz autowaf-012704dc8ac981a95c1a0efaa92629d43e9a9dcb.tar.bz2 autowaf-012704dc8ac981a95c1a0efaa92629d43e9a9dcb.zip |
Support varying source directory layout (should have been in previous commit, oops).
git-svn-id: http://svn.drobilla.net/autowaf@24 e2e4594f-ea7b-45dc-bc5a-5f5301e603aa
Diffstat (limited to 'autowaf.py')
-rw-r--r-- | autowaf.py | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -392,10 +392,13 @@ def build_version_files(header_path, source_path, domain, major, minor, micro): return None -def run_tests(ctx, appname, tests, desired_status=0): +def run_tests(ctx, appname, tests, desired_status=0, dirs=['./src']): orig_dir = os.path.abspath(os.curdir) failures = 0 - base = '.' + base = '.' + diropts = '' + for i in dirs: + diropts += ' -d ' + i top_level = (len(ctx.stack_path) > 1) if top_level: @@ -410,7 +413,7 @@ def run_tests(ctx, appname, tests, desired_status=0): lcov_log = open('lcov.log', 'w') try: # Clear coverage data - subprocess.call('lcov -d ./src -z'.split(), + subprocess.call(('lcov %s -z' % diropts).split(), stdout=lcov_log, stderr=lcov_log) except: lcov = False @@ -433,7 +436,7 @@ def run_tests(ctx, appname, tests, desired_status=0): if lcov: # Generate coverage data coverage_lcov = open('coverage.lcov', 'w') - subprocess.call(('lcov -c -d ./src -b ' + base).split(), + subprocess.call(('lcov -c %s -b %s' % (diropts, base)).split(), stdout=coverage_lcov, stderr=lcov_log) coverage_lcov.close() |