File: SConscript

package info (click to toggle)
clam 1.4.0-5.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 17,780 kB
  • sloc: cpp: 92,499; python: 9,721; ansic: 1,602; xml: 444; sh: 239; makefile: 153; perl: 54; asm: 15
file content (78 lines) | stat: -rw-r--r-- 3,038 bytes parent folder | download | duplicates (2)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/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('.'),
	os.path.join('CommonHelpers'),
	os.path.join('ControlsTests'),
	os.path.join('DescriptorsTests'),
	os.path.join('DynamicTypeTests'),
	os.path.join('FactoryTest'),
	os.path.join('FlowControlTests'),
	os.path.join('NonComponentData'),
	os.path.join('PortsTest'),
	os.path.join('ProcessingBaseTests'),
	os.path.join('ProcessingDataTests'),
	os.path.join('ProcessingsTests'),
	os.path.join('StandardTests'),
	os.path.join('TonalAnalysis'),
	os.path.join('ToolsTests'),
	os.path.join('XmlTests'),
	os.path.join('VisualizationTests'),
	]

blacklist = [
	os.path.join('.','TestRunnerQt.cxx'),
	os.path.join('FactoryTest','PolymorphicTest.cxx'),
	os.path.join('ProcessingsTests','AudioMixerTest.cxx'), # Uses old fashioned idioms that don't compil
	os.path.join('TonalAnalysis','ChordCorrelatorTest.cxx'), # recognized labels not the current ones
	os.path.join('TonalAnalysis','ChordExtractorTest.cxx'), # last too long
	os.path.join('DescriptorsTests','ProofOfConceptTest.cxx'), # Fails always because FFT size, should be rewritten and moved to functional tests
	]
if 'crossmingw' in env['TOOLS'] :
	# They lauch exceptions unsuported in crossmingw until upgrade
	blacklist += [
	os.path.join('DescriptorsTests','DescriptionXmlTest.cxx'),
	os.path.join('DescriptorsTests','SpectralDescriptorsTest.cxx'),
	os.path.join('DescriptorsTests','SpectralPeakDescriptorsTest.cxx'),
	os.path.join('ProcessingBaseTests','ProcessingTest.cxx'), # this one just don't notice the exception
	os.path.join('NonComponentData','FlagsTest.cxx'),
	os.path.join('FlowControlTests','NetworkTest.cxx'),
	os.path.join('DynamicTypeTests','DynamicTypeBasicTest.cxx'),
	os.path.join('XmlTests','LibXmlDomDocumentHandlerTest.cxx'),
	os.path.join('XmlTests','LibXmlDomReaderTest.cxx'),
	os.path.join('XmlTests','XercesDom2ClamObjectsTest.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) 


unit_tests = env.Program( 'UnitTests', sources )
test_alias = Alias( 'run_unit_tests', [unit_tests], unit_tests[0].abspath )
AlwaysBuild( test_alias )

# Workaround to have only some unit-tests in a separate executable
#simple_test = [ 'TestRunnerConsole.cxx',
                #'TypedControlsTests/TypedControlsTests.cxx' ]
#simple_unit_tests = env.Program( 'simpleUnitTest', simple_test )
#simple_unit_tests_alias = Alias( 'simple_unit_tests', [simple_unit_tests], simple_unit_tests[0].abspath )
#AlwaysBuild( simple_unit_tests )