Changeset f11d78d


Ignore:
Timestamp:
Sep 29, 2009, 8:45:41 PM (15 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, pitchshift, sampler, timestretch, yinfft+
Children:
7e114c8
Parents:
899dfd3
Message:

wscript: move test build rules from tests/src/wscript_build, use new unit test system

Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • wscript

    r899dfd3 rf11d78d  
    1212srcdir = '.'
    1313blddir = 'build'
    14 
    15 import UnitTest
    1614
    1715def init(opt):
     
    3634  opt.tool_options('compiler_cxx')
    3735  opt.tool_options('gnu_dirs')
    38   #opt.tool_options('UnitTest')
     36  # include locally patched version of UnitTest until upstream incorporates patch
     37  # see http://code.google.com/p/waf/issues/detail?id=542
     38  opt.tool_options('UnitTest', tooldir='.')
    3939
    4040def configure(conf):
     
    138138
    139139  # add sub directories
    140   bld.add_subdirs('src ext examples cpp tests/src')
     140  bld.add_subdirs('src ext examples cpp')
    141141  if bld.env['SWIG']:
    142142    if bld.env['PYTHON']:
     
    172172      'sounds/woodblock.aiff')
    173173
     174  # build and run the unit tests
     175  build_tests(bld)
     176  import UnitTest
     177  bld.add_post_fun(UnitTest.summary)
     178
    174179def shutdown(bld):
    175180  pass
    176181
    177 def check(bld):
    178   ut = UnitTest.unit_test()
    179   ut.change_to_testfile_dir = True
    180   ut.run()
    181   ut.print_results()
     182# loop over all *.c filenames in tests/src to build them all
     183# target name is filename.c without the .c
     184def build_tests(bld):
     185  for target_name in bld.path.ant_glob('tests/src/**/*.c').split():
     186    this_target = bld.new_task_gen(
     187        features = 'cprogram cc test',
     188        source = target_name,
     189        target = target_name.split('.')[0],
     190        includes = 'src',
     191        install_path = None,
     192        uselib_local = 'aubio')
     193    # phasevoc-jack also needs aubioext
     194    if target_name.endswith('test-phasevoc-jack.c'):
     195      this_target.includes = ['src', 'ext']
     196      this_target.uselib_local = ['aubio', 'aubioext']
Note: See TracChangeset for help on using the changeset viewer.