Ignore:
Timestamp:
Nov 29, 2018, 7:19:52 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
Children:
3821415
Parents:
c0ce78f (diff), 2cf905f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'feature/c_tests'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/wscript_build

    rc0ce78f r8968ea7  
    88programs_sources = ctx.path.ant_glob('src/**/*.c')
    99
     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
     15b = bld(name='create_tests_source',
     16    rule='python ${SRC} ${TGT}',
     17    source='create_tests_source.py',
     18    target=test_sound_target)
     19# use post() to create the task, keep a reference to it
     20b.post()
     21create_tests_source = b.tasks[0]
     22
    1023for source_file in programs_sources:
    1124    target = os.path.basename(os.path.splitext(str(source_file))[0])
    12     bld(features = 'c cprogram test',
     25    a = bld(features = 'c cprogram test',
    1326            source = source_file,
    1427            target = target,
     
    1629            use = uselib,
    1730            install_path = None,
    18             defines = 'AUBIO_UNSTABLE_API=1',
     31            defines = ['AUBIO_UNSTABLE_API=1',
     32                        'AUBIO_TESTS_SOURCE={}'.format(test_sound_abspath)]
    1933       )
     34    a.post()
     35    # make sure the unit_test task runs *after* the source is created
     36    a.tasks[-1].set_run_after(create_tests_source)
Note: See TracChangeset for help on using the changeset viewer.