/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 591 by johnpye, Fri May 12 08:25:16 2006 UTC revision 593 by johnpye, Fri May 12 10:03:59 2006 UTC
# Line 45  opts.Add( Line 45  opts.Add(
45    
46  opts.Add(BoolOption(  opts.Add(BoolOption(
47      'GCOV'      'GCOV'
48      'Whether to enable coverage testing in object code'      , 'Whether to enable coverage testing in object code'
49      ,False      , False
50  ))  ))
51    
52  # Package linking option  # Package linking option
# Line 123  opts.Add( Line 123  opts.Add(
123    
124  # Build the test suite?  # Build the test suite?
125  opts.Add(BoolOption(  opts.Add(BoolOption(
126      'WITH_CUNIT_TESTS'      'WITH_CUNIT'
127      ,"Whether to build the CUnit tests. Default is off. If set to on,"      ,"Whether to build the CUnit tests. Default is off. If set to on,"
128          +" you must have CUnit installed somewhere that SCons can"          +" you must have CUnit installed somewhere that SCons can"
129          +" find it, or else use the CUNIT_* options to specify."          +" find it, or else use the CUNIT_* options to specify."
# Line 356  without_tcltk_reason = "disabled by opti Line 356  without_tcltk_reason = "disabled by opti
356  with_python = env.get('WITH_PYTHON')  with_python = env.get('WITH_PYTHON')
357  without_python_reason = "disabled by options/config.py"  without_python_reason = "disabled by options/config.py"
358    
359  with_cunit_tests = env.get('WITH_CUNIT_TESTS')  with_cunit = env.get('WITH_CUNIT')
360  without_cunit_reason = "not requested"  without_cunit_reason = "not requested"
361    
362  #print "SOLVERS:",env['WITH_SOLVERS']  #print "SOLVERS:",env['WITH_SOLVERS']
# Line 800  if not conf.CheckSwigVersion(): Line 800  if not conf.CheckSwigVersion():
800    
801  # CUnit  # CUnit
802    
803  if with_cunit_tests:  if with_cunit:
804      if not conf.CheckCUnit():      if not conf.CheckCUnit():
805          without_cunit_reason = 'CUnit not found'          without_cunit_reason = 'CUnit not found'
806    
# Line 1069  libascend = env.SharedLibrary('ascend',s Line 1069  libascend = env.SharedLibrary('ascend',s
1069  #-------------  #-------------
1070  # UNIT TESTS  # UNIT TESTS
1071    
1072  if with_cunit_tests:  if with_cunit:
1073      testdirs = ['general','solver','utilities']      testdirs = ['general','solver','utilities']
1074        testsrcs = []
1075      for testdir in testdirs:      for testdir in testdirs:
1076          path = 'base/generic/'+testdir+'/test/'          path = 'base/generic/'+testdir+'/test/'
1077          env.SConscript([path+'SConscript'],'env')          env.SConscript([path+'SConscript'],'env')
1078            testsrcs += [i.path for i in env['TESTSRCS_'+testdir.upper()]]
1079    
1080        #print "TESTSRCS =",testsrcs
1081            
1082      env.SConscript(['test/SConscript'],'env')      env.SConscript(['test/SConscript'],'env')
1083      env.SConscript(['base/generic/test/SConscript'],'env')      env.SConscript(['base/generic/test/SConscript'],'env')
1084        
1085        env.Alias('test',[env.Dir('test'),env.Dir('base/generic/test')])
1086            
1087  else:  else:
1088      print "Skipping... CUnit tests aren't being built:",without_cunit_reason      print "Skipping... CUnit tests aren't being built:",without_cunit_reason

Legend:
Removed from v.591  
changed lines
  Added in v.593

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22