/[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 676 by robwdcock, Sun Mar 26 10:13:34 2006 UTC trunk/finley/test/SConscript revision 3982 by jfenwick, Fri Sep 21 03:23:22 2012 UTC
# Line 1  Line 1 
 Import('*')  
   
 program_name = 'finley_UnitTest'  
   
 local_env=env.Copy()  
1    
2  src_dir = local_env.Dir('.').srcnode().abspath  ##############################################################################
3    #
4    # Copyright (c) 2003-2012 by University of Queensland
5    # http://www.uq.edu.au
6    #
7    # Primary Business: Queensland, Australia
8    # Licensed under the Open Software License version 3.0
9    # http://www.opensource.org/licenses/osl-3.0.php
10    #
11    # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12    # Development since 2012 by School of Earth Sciences
13    #
14    ##############################################################################
15    
 import os  
 filenames = os.listdir(src_dir)  
 sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]  
16    
17  local_env.Append(LIBS=[ python_lib, boost_lib, 'finley', 'escript', 'paso', 'esysUtils', 'CppUnitTest', scsl_libs, mkl_libs, umf_libs, sys_libs])  Import('*')
18    local_env = env.Clone()
 program = local_env.Program(program_name, sources)  
   
 #Add Unit Test to target alias  
19    
20  env.Alias('build_tests', program)  if local_env['cppunit']:
21        # get the test source file names
22        sources = Glob('*.cpp')+Glob('*.c')
23        testname='finley_UnitTest'
24    
25        # build the executable
26        local_env.Append(LIBS=['finley', 'escript', 'paso', 'esysUtils']+env['cppunit_libs'])
27        program = local_env.Program(testname, sources)
28    
29        # run the tests - but only if test_targets are stale
30        local_env.RunUnitTest(testname)
31    
32        # add unit test to target alias
33        Alias('build_tests', program)
34        Alias("run_tests", testname+'.passed')
35    
36        # add a group of tests
37        from grouptest import *
38        tgroup=GroupTest("$BINRUNNER ", (), "", "$BUILD_DIR/finley/test", ('./'+testname,))
39        TestGroups.append(tgroup)
40    
41  # run the tests - but only if test_targets are stale  # configure python unit tests
42  local_env.RunUnitTest(program_name)  local_env.SConscript(dirs = ['#/finley/test/python'], variant_dir='python', duplicate=0, exports=['py_wrapper_lib'])
 test_targets = os.path.splitext(program_name)[0]+'.passed'  
 Alias("run_tests", test_targets)  
43    
 local_env.SConscript(dirs = ['#/finley/test/python'], build_dir='python', duplicate=0)  

Legend:
Removed from v.676  
changed lines
  Added in v.3982

  ViewVC Help
Powered by ViewVC 1.1.26