/[escript]/trunk/esysUtils/test/SConscript
ViewVC logotype

Diff of /trunk/esysUtils/test/SConscript

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

revision 3258 by jfenwick, Thu Jan 28 02:03:15 2010 UTC revision 3259 by jfenwick, Mon Oct 11 01:48:14 2010 UTC
# Line 11  Line 11 
11  #  #
12  ########################################################  ########################################################
13    
   
 import os  
14  Import('*')  Import('*')
15    local_env = env.Clone()
16    
17  local_env = clone_env(env_mpi)  # get the test source file names
18    sources = Glob('*.cpp')+Glob('*.c')
19  src_dir = local_env.Dir('.').srcnode().abspath  testname='EsysExceptionTest'
20    
21  # get the relevant file names:  # build the executable
22  src_dir = local_env.Dir('.').srcnode().abspath  local_env.Append(LIBS=['esysUtils', 'CppUnitTest'])
23  filenames = [ x for x in os.listdir(src_dir) if os.path.splitext(x)[1] in [".h", ".c", ".cpp"] ]  program = local_env.Program(testname, sources)
   
 sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]  
   
 local_env.Append(LIBS=[ 'esysUtils', 'CppUnitTest', env['sys_libs']])  
   
 program = local_env.Program('EsysExceptionTest', sources)  
   
 #Add Unit Test to target alias  
   
 env.Alias('build_tests', program)  
24    
25  # run the tests - but only if test_targets are stale  # run the tests - but only if test_targets are stale
26  local_env.RunUnitTest('EsysExceptionTest')  local_env.RunUnitTest(testname)
27  test_targets = os.path.splitext('EsysExceptionTest')[0]+'.passed'  
28  Alias("run_tests", test_targets)  # add unit test to target alias
29    Alias('build_tests', program)
30    Alias("run_tests", testname+'.passed')
31    
32  # Add a group of tests  # add a group of tests
33  from grouptest import *  from grouptest import *
34  tgroup=GroupTest("$BINRUNNER ", (),"","$BUILD_DIR/esysUtils/test",('./EsysExceptionTest',))  tgroup=GroupTest("$BINRUNNER ", (), "", "$BUILD_DIR/esysUtils/test", ('./'+testname,))
35  TestGroups.append(tgroup)  TestGroups.append(tgroup)
36    

Legend:
Removed from v.3258  
changed lines
  Added in v.3259

  ViewVC Help
Powered by ViewVC 1.1.26