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

Diff of /trunk/finley/test/SConscript

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

branches/ROBW_XPLATFORM/finley/test/SConscript revision 649 by robwdcock, Fri Mar 24 06:07:07 2006 UTC trunk/finley/test/SConscript revision 2881 by jfenwick, Thu Jan 28 02:03:15 2010 UTC
# Line 1  Line 1 
 Import('*')  
   
 program_name = 'finley_UnitTest'  
1    
2  local_env=env.Copy()  ########################################################
3    #
4    # Copyright (c) 2003-2010 by University of Queensland
5    # Earth Systems Science Computational Center (ESSCC)
6    # http://www.uq.edu.au/esscc
7    #
8    # Primary Business: Queensland, Australia
9    # Licensed under the Open Software License version 3.0
10    # http://www.opensource.org/licenses/osl-3.0.php
11    #
12    ########################################################
13    
 local_env.Append(LIBS=[ python_lib, boost_lib, 'finleycpp', 'escriptcpp', 'paso', 'esysUtils', 'CppUnitTest', scsl_libs, mkl_libs, umf_libs, sys_libs])  
   
 src_dir = local_env.Dir('.').srcnode().abspath  
14    
15  import os  import os
16  filenames = os.listdir(src_dir)  Import('*')
 sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]  
17    
18  program = local_env.Program(program_name, sources)  local_env = clone_env(env_mpi)
19    
20  Depends(program, dep_lib)  # get the relevant file names:
21    src_dir = local_env.Dir('.').srcnode().abspath
22    filenames = [ x for x in os.listdir(src_dir) if os.path.splitext(x)[1] in [".h", ".c", ".cpp"] ]
23    
24  # TODO: Need to decide on how the library paths etc are going to be handled  sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
 # TODO: For now just install the program to the same location as the libraries so things can run at least  
 test_install = local_env.Install(libinstall, program)  
25    
26  #Add Unit Test to target alias  local_env.Append(LIBS=['finley', 'escript', 'paso', 'esysUtils', 'CppUnitTest'] + env['sys_libs'])
27    
28  env.Alias('build_tests', test_install)  # compile test
29    program = local_env.Program('finley_UnitTest', sources)
30    env.Alias('build_tests', program)
31    
32  # run the tests - but only if test_targets are stale  # run the tests - but only if test_targets are stale
33  local_env.RunUnitTest(program_name)  local_env.RunUnitTest('finley_UnitTest')
34  test_targets = os.path.splitext(program_name)[0]+'.passed'  test_targets = os.path.splitext('finley_UnitTest')[0]+'.passed'
35  Alias("run_tests", test_targets)  Alias("run_tests", test_targets)
36    
37    local_env.SConscript(dirs = ['#/finley/test/python'], build_dir='python', duplicate=0)
38    
39    # Add a group of tests
40    from grouptest import *
41    tgroup=GroupTest("$BINRUNNER ", (),"","$BUILD_DIR/finley/test",('./finley_UnitTest',))
42    TestGroups.append(tgroup)

Legend:
Removed from v.649  
changed lines
  Added in v.2881

  ViewVC Help
Powered by ViewVC 1.1.26