Changeset 242e923


Ignore:
Timestamp:
Nov 29, 2018, 6:38:41 PM (6 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:
f9204ac
Parents:
0de816c
Message:

[tests] make sure unit tests run after sound file is created

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/wscript_build

    r0de816c r242e923  
    1313test_sound_abspath = str(test_sound_abspath).replace('\\', '\\\\')
    1414
    15 bld(name='create_tests_source',
     15b = bld(name='create_tests_source',
    1616    rule='python ${SRC} ${TGT}',
    1717    source='create_tests_source.py',
    1818    target=test_sound_target)
     19# use post() to create the task, keep a reference to it
     20b.post()
     21create_tests_source = b.tasks[0]
    1922
    2023for source_file in programs_sources:
    2124    target = os.path.basename(os.path.splitext(str(source_file))[0])
    22     bld(features = 'c cprogram test',
     25    a = bld(features = 'c cprogram test',
    2326            source = source_file,
    2427            target = target,
     
    2932                        'AUBIO_TESTS_SOURCE={}'.format(test_sound_abspath)]
    3033       )
     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.