source: tests/wscript_build @ 64d534d

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5
Last change on this file since 64d534d was 505b49a, checked in by Paul Brossier <piem@piem.org>, 5 years ago

[tests] create test sound from waf, add -DAUBIO_TESTS_SOURCE=

  • Property mode set to 100644
File size: 833 bytes
Line 
1# vim:set syntax=python:
2
3import os.path
4
5uselib = ['aubio']
6
7includes = ['../src', '.']
8programs_sources = ctx.path.ant_glob('src/**/*.c')
9
10test_sound_target = '44100Hz_44100f_sine441_stereo.wav'
11test_sound_abspath = bld.path.get_bld().make_node(test_sound_target)
12
13bld(name='create_test_source',
14    rule='python ${SRC} ${TGT}',
15    source='create_test_source.py',
16    target=test_sound_target)
17
18for source_file in programs_sources:
19    target = os.path.basename(os.path.splitext(str(source_file))[0])
20    bld(features = 'c cprogram test',
21            source = source_file,
22            target = target,
23            includes = includes,
24            use = uselib,
25            install_path = None,
26            defines = ['AUBIO_UNSTABLE_API=1',
27                        'AUBIO_TESTS_SOURCE=\"{}\"'.format(test_sound_abspath)]
28       )
Note: See TracBrowser for help on using the repository browser.