source: tests/wscript_build @ ee0c4d50

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5
Last change on this file since ee0c4d50 was 60384e9, checked in by Paul Brossier <piem@piem.org>, 6 years ago

[tests] [win] workaround to escape backslashes

  • Property mode set to 100644
File size: 960 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# workaround to double escape backslash characters on windows
13test_sound_abspath = str(test_sound_abspath).replace('\\', '\\\\')
14
15bld(name='create_tests_source',
16    rule='python ${SRC} ${TGT}',
17    source='create_tests_source.py',
18    target=test_sound_target)
19
20for source_file in programs_sources:
21    target = os.path.basename(os.path.splitext(str(source_file))[0])
22    bld(features = 'c cprogram test',
23            source = source_file,
24            target = target,
25            includes = includes,
26            use = uselib,
27            install_path = None,
28            defines = ['AUBIO_UNSTABLE_API=1',
29                        'AUBIO_TESTS_SOURCE={}'.format(test_sound_abspath)]
30       )
Note: See TracBrowser for help on using the repository browser.