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

Diff of /trunk/finley/test/SConscript

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

revision 3596 by jfenwick, Mon Oct 11 01:48:14 2010 UTC revision 3597 by caltinay, Thu Sep 15 06:03:17 2011 UTC
# Line 11  Line 11 
11  #  #
12  ########################################################  ########################################################
13    
14    
15  Import('*')  Import('*')
16  local_env = env.Clone()  local_env = env.Clone()
17    
18  # get the test source file names  if local_env['cppunit']:
19  sources = Glob('*.cpp')+Glob('*.c')      # get the test source file names
20  testname='finley_UnitTest'      sources = Glob('*.cpp')+Glob('*.c')
21        testname='finley_UnitTest'
22  # build the executable  
23  local_env.Append(LIBS=['finley', 'escript', 'paso', 'esysUtils', 'CppUnitTest'])      # build the executable
24  program = local_env.Program(testname, sources)      local_env.Append(LIBS=['finley', 'escript', 'paso', 'esysUtils']+env['cppunit_libs'])
25        program = local_env.Program(testname, sources)
26  # run the tests - but only if test_targets are stale  
27  local_env.RunUnitTest(testname)      # run the tests - but only if test_targets are stale
28        local_env.RunUnitTest(testname)
29  # add unit test to target alias  
30  Alias('build_tests', program)      # add unit test to target alias
31  Alias("run_tests", testname+'.passed')      Alias('build_tests', program)
32        Alias("run_tests", testname+'.passed')
33    
34        # add a group of tests
35        from grouptest import *
36        tgroup=GroupTest("$BINRUNNER ", (), "", "$BUILD_DIR/finley/test", ('./'+testname,))
37        TestGroups.append(tgroup)
38    
39  # configure python unit tests  # configure python unit tests
40  local_env.SConscript(dirs = ['#/finley/test/python'], variant_dir='python', duplicate=0, exports=['py_wrapper_lib'])  local_env.SConscript(dirs = ['#/finley/test/python'], variant_dir='python', duplicate=0, exports=['py_wrapper_lib'])
41    
 # add a group of tests  
 from grouptest import *  
 tgroup=GroupTest("$BINRUNNER ", (), "", "$BUILD_DIR/finley/test", ('./'+testname,))  
 TestGroups.append(tgroup)  
   

Legend:
Removed from v.3596  
changed lines
  Added in v.3597

  ViewVC Help
Powered by ViewVC 1.1.26