/[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 3259 by jfenwick, Mon Oct 11 01:48:14 2010 UTC
# Line 1  Line 1 
 Import('*')  
   
 program_name = 'finley_UnitTest'  
   
 local_env=env.Copy()  
   
 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  
1    
2  import os  ########################################################
3  filenames = os.listdir(src_dir)  #
4  sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]  # 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    
14  program = local_env.Program(program_name, sources)  Import('*')
15    local_env = env.Clone()
 Depends(program, dep_lib)  
   
 # TODO: Need to decide on how the library paths etc are going to be handled  
 # 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)  
   
 #Add Unit Test to target alias  
16    
17  env.Alias('build_tests', test_install)  # get the test source file names
18    sources = Glob('*.cpp')+Glob('*.c')
19    testname='finley_UnitTest'
20    
21    # build the executable
22    local_env.Append(LIBS=['finley', 'escript', 'paso', 'esysUtils', 'CppUnitTest'])
23    program = local_env.Program(testname, sources)
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(program_name)  local_env.RunUnitTest(testname)
27  test_targets = os.path.splitext(program_name)[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    # configure python unit tests
33    local_env.SConscript(dirs = ['#/finley/test/python'], variant_dir='python', duplicate=0, exports=['py_wrapper_lib'])
34    
35    # add a group of tests
36    from grouptest import *
37    tgroup=GroupTest("$BINRUNNER ", (), "", "$BUILD_DIR/finley/test", ('./'+testname,))
38    TestGroups.append(tgroup)
39    

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

  ViewVC Help
Powered by ViewVC 1.1.26