From 505b49aabd849c56adf4d97b97981e3d8d26b2a4 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Thu, 29 Nov 2018 14:27:49 +0100 Subject: [PATCH] [tests] create test sound from waf, add -DAUBIO_TESTS_SOURCE= --- tests/wscript_build | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/wscript_build b/tests/wscript_build index 45e83b8e..7712c3aa 100644 --- a/tests/wscript_build +++ b/tests/wscript_build @@ -7,6 +7,14 @@ uselib = ['aubio'] includes = ['../src', '.'] programs_sources = ctx.path.ant_glob('src/**/*.c') +test_sound_target = '44100Hz_44100f_sine441_stereo.wav' +test_sound_abspath = bld.path.get_bld().make_node(test_sound_target) + +bld(name='create_test_source', + rule='python ${SRC} ${TGT}', + source='create_test_source.py', + target=test_sound_target) + for source_file in programs_sources: target = os.path.basename(os.path.splitext(str(source_file))[0]) bld(features = 'c cprogram test', @@ -15,5 +23,6 @@ for source_file in programs_sources: includes = includes, use = uselib, install_path = None, - defines = 'AUBIO_UNSTABLE_API=1', + defines = ['AUBIO_UNSTABLE_API=1', + 'AUBIO_TESTS_SOURCE=\"{}\"'.format(test_sound_abspath)] ) -- 2.11.0