/[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 246 by jgs, Tue Nov 29 04:27:00 2005 UTC trunk/esysUtils/test/EsysException/SConscript revision 468 by jgs, Wed Jan 25 06:50:39 2006 UTC
# Line 1  Line 1 
1  # Scons configuration file for esysUtils unit tests  # Scons configuration file for esysUtils unit tests
2    
 import os  
 import sys  
   
 # ensure correct versions of python and scons  
   
 EnsurePythonVersion(2,3)  
 EnsureSConsVersion(0,96)  
   
3  #  #
4  # set appropriate defaults for configuration variables  # set appropriate defaults for configuration variables
5    
6  esysroot = Dir('#../../..')  esysroot=str(Dir('./../../../..').abspath)
7  usegcc = 0  execfile(str(File(esysroot+"/scons/esys_options.py")))
 options = None  
   
 #  
 # retreive command-line arguments if any  
   
 if ARGUMENTS.get('usegcc',0):  
   usegcc = 1  
   
 if ARGUMENTS.get('options',0):  
   options = ARGUMENTS.get('options',0)  
   
 #  
 # determine platform  
   
 env = Environment(ENV = os.environ)  
 platform = env['PLATFORM']  
   
 #  
 # determine hostname  
   
 hostname = os.environ['HOSTNAME']  
   
 #  
 # load configuration settings  
   
 options_dir = str(esysroot) + '/scons'  
 sys.path.append(options_dir)  
   
 if hostname=='ess':  
   from ess_options import *  
   
 if usegcc==1:  
   from gcc_options import *  
   
 if options!=None:  
   exec "from " + options + " import *"  
8    
9  cxx_flags=cxx_flags_debug  cxx_flags=cxx_flags_debug
10    
11  #  #
12  # print out build configuration for this module  # print out build configuration for this module
13    
 print "####################################################"  
14  print "Build configuration for module: EsysException unit tests"  print "Build configuration for module: EsysException unit tests"
 print "         dodebug:  1"  
 print "          usegcc: ", usegcc  
15  print "             cxx: ", cxx  print "             cxx: ", cxx
16  print "        platform: ", platform  print "       cxx_flags: ", cxx_flags
 print "        hostname: ", hostname  
 print "####################################################"  
17    
18  #  #
19  # do the actual build  # do the actual build
20    
21  esysexception_test_path = str(esysroot) + '/esysUtils/test/EsysException'  esysexception_test_path = str(esysroot) + '/esysUtils/test/EsysException'
22  esysUtils_path = str(esysroot) + '/esysUtils/inc'  esysUtils_path = str(esysroot) + '/esysUtils/src'
23  CppUnitTest_path = str(esysroot) + '/tools/CppUnitTest/inc'  CppUnitTest_path = str(esysroot) + '/tools/CppUnitTest/inc'
24    
25  esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'  esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'
26  CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'  CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'
27    
28    esysUtils_lib = str(esysUtils_lib_path) + '/libesysUtils.a'
29    
30    install_dir = str(esysroot) + '/esysUtils/test'
31    
32  cpp_path = [esysexception_test_path,  cpp_path = [esysexception_test_path,
33              esysUtils_path,              esysUtils_path,
34              CppUnitTest_path]              CppUnitTest_path]
# Line 82  lib_path = [esysUtils_lib_path, Line 37  lib_path = [esysUtils_lib_path,
37              CppUnitTest_lib_path]              CppUnitTest_lib_path]
38    
39  libs = ['esysUtils',  libs = ['esysUtils',
40          'CppUnitTest',          'CppUnitTest']
41          'guide',  
42          'irc']  libs.extend(sys_libs)
43    
44  sources = ['EsysExceptionTestCase.cpp',  sources = ['EsysExceptionTestCase.cpp',
45             'EsysExceptionTest.cpp']             'EsysExceptionTest.cpp']
46    
47  target = 'EsysExceptionTest.exe'  target = 'EsysExceptionTest.exe'
48    
49    import os
50  esysexception_env = Environment(ENV = os.environ)  esysexception_env = Environment(ENV = os.environ)
51    
52  esysexception_env.Replace(CXX = cxx)  esysexception_env.Replace(CXX = cxx)
# Line 100  esysexception_env.Replace(LIBPATH = lib_ Line 56  esysexception_env.Replace(LIBPATH = lib_
56  esysexception_env.Replace(LIBS = libs)  esysexception_env.Replace(LIBS = libs)
57    
58  esysexception_test_exe = esysexception_env.Program(target, sources)  esysexception_test_exe = esysexception_env.Program(target, sources)
59    
60    Depends(esysexception_test_exe, esysUtils_lib)
61    
62    Alias("build_tests", esysexception_env.Install(install_dir, esysexception_test_exe))
63    
64    import scons_extensions
65    runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', single_source=True)
66    esysexception_env.Append(BUILDERS = {'RunUnitTest' : runUnitTest_builder});
67    
68    Alias("run_tests", esysexception_env.RunUnitTest(target))

Legend:
Removed from v.246  
changed lines
  Added in v.468

  ViewVC Help
Powered by ViewVC 1.1.26