Import('tests_env') import sys, os sys.path +=['../../libs'] from buildtools.include_rename import update_includes from buildtools.file_retriever import FileRetriever import shelve header_db = shelve.open( '../../libs/header.db' ) if not os.path.exists('src') : os.mkdir('src') if not os.path.exists('include') : os.mkdir('include') folders = ['UnitTests','UnitTests/CommonHelpers','FunctionalTests/CommonHelpers','FunctionalTests/FlowControlTests','FunctionalTests/ProcessingTests'] blacklist = ['TestRunnerQt','TestMIDIIO','TestOnsetDetector','TestSpectralPeakDetect','TestSMSAnalysis','TestAudioFileIn'] if sys.platform == 'win32' : blacklist.append( 'OSC.+') file_retriever = FileRetriever( '../../../test', folders, blacklist ) file_retriever.out_inc = 'include' print "Retrieving files and changing includes...", file_retriever.scan() for filename in file_retriever.headers : update_includes( header_db, filename ) for filename in file_retriever.sources : update_includes( header_db, filename ) print "ok" tests_env.Append( CPPPATH=['include'] ) if sys.platform != 'win32' : tests_env.Append(CCFLAGS='-include CLAM/preinclude.hxx') functional_tests = tests_env.Program( 'FunctionalTests', file_retriever.sources ) if sys.platform == 'win32' : tests_env.MSVSProject( target = 'FunctionalTests' + tests_env['MSVSPROJECTSUFFIX'], srcs = file_retriever.sources, incs = file_retriever.headers, buildtarget = functional_tests, variant = 'Release' ) test_alias = Alias( 'run_functional_tests', [functional_tests], functional_tests[0].abspath ) AlwaysBuild( test_alias )