/[escript]/branches/arrayview_from_1695_trunk/esysUtils/test/SConscript
ViewVC logotype

Diff of /branches/arrayview_from_1695_trunk/esysUtils/test/SConscript

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

trunk/esysUtils/test/EsysException/SConstruct revision 197 by jgs, Tue Nov 22 02:01:35 2005 UTC trunk/esysUtils/test/EsysException/SConscript revision 682 by robwdcock, Mon Mar 27 02:43:09 2006 UTC
# Line 1  Line 1 
 esysroot = None  
   
1  Import('*')  Import('*')
2    # FIXME: This whole test should be refactored into the directory above as esysUtils_UnitTest so it is the same as the other modules
3    
4  import os  program_name = 'EsysExceptionTest'
 import string  
   
 if esysroot == None:  
   esysroot = Dir('#../../..')  
5    
6  ##### these will enventually be loaded from an external config file ########  local_env=env.Copy()
7    
8  cxx_flags = '-O0 -openmp -openmp_report0 -tpp2 -ansi -ansi_alias -no-gcc -fpic -w1'  local_env.Append(LIBS=['esysUtils', 'CppUnitTest', sys_libs])
9    
10  ############################################################################  src_dir = local_env.Dir('.').srcnode().abspath
11    
12  esysexception_test_path = str(esysroot) + '/esysUtils/test/EsysException'  import os
13  esysUtils_path = str(esysroot) + '/esysUtils/inc'  filenames = os.listdir(src_dir)
14  CppUnitTest_path = str(esysroot) + '/tools/CppUnitTest/inc'  sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
   
 esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'  
 CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'  
   
 cpp_path = [esysexception_test_path,  
             esysUtils_path,  
             CppUnitTest_path]  
15    
16  lib_path = [esysUtils_lib_path,  local_env.Append(CPPPATH = ['#/tools/CppUnitTest/inc',])
             CppUnitTest_lib_path]  
17    
18  libs = ['esysUtils',  program = local_env.Program(program_name, sources)
         'CppUnitTest',  
         'guide',  
         'irc']  
19    
20  sources = ['EsysExceptionTestCase.cpp',  Depends(program, dep_lib)
            'EsysExceptionTest.cpp']  
21    
22  target = 'EsysExceptionTest.exe'  # TODO: Need to decide on how the library paths etc are going to be handled
23    # TODO: For now just install the program to the same location as the libraries so things can run at least
24    test_install = local_env.Install(libinstall, program)
25    
26  esysexception_env = Environment(ENV = os.environ)  #Add Unit Test to target alias
27    
28  esysexception_env.Replace(CXX = 'icc')  env.Alias('build_tests', test_install)
 esysexception_env.Replace(CC = 'icc')  
 esysexception_env.Replace(CXXFLAGS = cxx_flags)  
 esysexception_env.Replace(CCFLAGS = cxx_flags)  
 esysexception_env.Replace(CPPPATH = cpp_path)  
 esysexception_env.Replace(LIBPATH = lib_path)  
 esysexception_env.Replace(LIBS = libs)  
29    
30  esysexception_test_exe = esysexception_env.Program(target, sources)  # run the tests - but only if test_targets are stale
31    local_env.RunUnitTest(program_name)
32    test_targets = os.path.splitext(program_name)[0]+'.passed'
33    Alias("run_tests", test_targets)

Legend:
Removed from v.197  
changed lines
  Added in v.682

  ViewVC Help
Powered by ViewVC 1.1.26