1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
#!/usr/bin/python
Import('env')
import sys, os, glob
def scanFiles(pattern, paths) :
files = []
for path in paths :
files+=glob.glob(os.path.join(path,pattern))
return files
def recursiveDirs(root) :
return filter( (lambda a : a.rfind( ".svn")==-1 ), [ a[0] for a in os.walk(root)] )
def unique(list) :
return dict.fromkeys(list).keys()
folders = [
os.path.join('..','UnitTests'),
os.path.join('..','UnitTests','CommonHelpers'),
os.path.join('CommonHelpers'),
os.path.join('FlowControlTests'),
os.path.join('ProcessingTests'),
# os.path.join('Applications','MIRTests'),
]
blacklist = [
os.path.join('..','UnitTests','TestRunnerQt.cxx'),
os.path.join('ProcessingTests','TestMIDIIO.cxx'),
os.path.join('ProcessingTests','TestOnsetDetector.cxx'),
os.path.join('ProcessingTests','TestSpectralPeakDetect.cxx'),
os.path.join('ProcessingTests','TestSMSAnalysis.cxx'),
]
if 'crossmingw' in env['TOOLS'] or 'mingw' in env['TOOLS']:
blacklist += [
# use exceptions not supported by hardy mingw (they use sjlj)
os.path.join('ProcessingTests','TestControlTraces.cxx'),
os.path.join('ProcessingTests','TestMultiChannelAudioFileReader.cxx'),
os.path.join('ProcessingTests','TestMultiChannelAudioFileWriter.cxx'),
]
#folders = [ os.path.join('..','..','..','test', folder) for folder in folders ]
#blacklist = [ os.path.join('..','..','..','test', blacksheep) for blacksheep in blacklist ]
sources = scanFiles('*.cxx', folders)
headers = scanFiles('*.hxx', folders)
for blacksheep in blacklist :
sources.remove(blacksheep)
if sys.platform != 'win32' :
env.Append( CPPPATH=['include'] )
functional_tests = env.Program( 'FunctionalTests', sources )
test_alias = Alias( 'run_functional_tests', [functional_tests], functional_tests[0].abspath )
AlwaysBuild( test_alias )
|