/[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 branches/arrayview_from_1695_trunk/esysUtils/test/SConscript revision 1696 by jfenwick, Mon Aug 11 03:33:40 2008 UTC
# Line 1  Line 1 
 esysroot = None  
   
1  Import('*')  Import('*')
2    
3  import os  program_name = 'EsysExceptionTest'
 import string  
   
 if esysroot == None:  
   esysroot = Dir('#../../..')  
4    
5  ##### these will enventually be loaded from an external config file ########  local_env=env.Copy()
6    
7  cxx_flags = '-O0 -openmp -openmp_report0 -tpp2 -ansi -ansi_alias -no-gcc -fpic -w1'  src_dir = local_env.Dir('.').srcnode().abspath
8    
9  ############################################################################  import os
10    # get the relevant file names:
11  esysexception_test_path = str(esysroot) + '/esysUtils/test/EsysException'  src_dir = local_env.Dir('.').srcnode().abspath
12  esysUtils_path = str(esysroot) + '/esysUtils/inc'  filenames = [ x for x in os.listdir(src_dir) if os.path.splitext(x)[1] in [".h", ".c", ".cpp"] ]
 CppUnitTest_path = str(esysroot) + '/tools/CppUnitTest/inc'  
   
 esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'  
 CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'  
13    
14  cpp_path = [esysexception_test_path,  sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
             esysUtils_path,  
             CppUnitTest_path]  
15    
16  lib_path = [esysUtils_lib_path,  local_env.Append(LIBS=[ 'esysUtils', 'CppUnitTest', sys_libs] + mpi_libs)
             CppUnitTest_lib_path]  
17    
18  libs = ['esysUtils',  program = local_env.Program(program_name, sources)
         'CppUnitTest',  
         'guide',  
         'irc']  
19    
20  sources = ['EsysExceptionTestCase.cpp',  #Add Unit Test to target alias
            'EsysExceptionTest.cpp']  
21    
22  target = 'EsysExceptionTest.exe'  env.Alias('build_tests', program)
23    
24  esysexception_env = Environment(ENV = os.environ)  # run the tests - but only if test_targets are stale
25    local_env.RunUnitTest(program_name)
26    test_targets = os.path.splitext(program_name)[0]+'.passed'
27    Alias("run_tests", test_targets)
28    
29  esysexception_env.Replace(CXX = 'icc')  release_srcfiles = [ env.File("SConscript"), ]
30  esysexception_env.Replace(CC = 'icc')  release_testfiles = [ env.File(x) for x in  filenames ]
31  esysexception_env.Replace(CXXFLAGS = cxx_flags)  env.Zip(src_zipfile, release_srcfiles)
32  esysexception_env.Replace(CCFLAGS = cxx_flags)  env.Tar(src_tarfile, release_srcfiles)
33  esysexception_env.Replace(CPPPATH = cpp_path)  env.Zip(test_zipfile, release_testfiles)
34  esysexception_env.Replace(LIBPATH = lib_path)  env.Tar(test_tarfile, release_testfiles)
 esysexception_env.Replace(LIBS = libs)  
35    
 esysexception_test_exe = esysexception_env.Program(target, sources)  

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

  ViewVC Help
Powered by ViewVC 1.1.26