/[escript]/trunk/esysUtils/test/EsysException/SConscript
ViewVC logotype

Diff of /trunk/esysUtils/test/EsysException/SConscript

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

trunk/esysUtils/test/EsysException/SConstruct revision 241 by jgs, Mon Nov 28 06:14:47 2005 UTC trunk/esysUtils/test/EsysException/SConscript revision 425 by gross, Tue Jan 10 04:10:39 2006 UTC
# Line 1  Line 1 
1  # Scons configuration file for esysUtils unit tests  # Scons configuration file for esysUtils unit tests
2    esysroot=str(Dir('./../../../..').abspath)
3  import os  execfile(str(File(esysroot+"/scons/esys_options.py")))
 import sys  
   
 # ensure correct versions of python and scons  
   
 EnsurePythonVersion(2,3)  
 EnsureSConsVersion(0,96)  
   
 #  
 # set appropriate defaults for configuration variables  
   
 esysroot = Dir('#../../..')  
 usegcc = 0  
   
 #  
 # retreive command-line arguments if any  
   
 if ARGUMENTS.get('usegcc',0):  
   usegcc = 1  
   
 #  
 # 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 *  
4    
5  cxx_flags=cxx_flags_debug  cxx_flags=cxx_flags_debug
6    cc_flags=cc_flags_debug
7    
8  #  #
9  # print out build configuration for this module  # print out build configuration for this module
10    
11  print "####################################################"  print "Build configuration for module: EsysException unit tests"
 print "Build configuration for module: Bruce unit tests"  
 print "Build configuration for module: Bruce unit tests"  
 print "         dodebug:  1"  
 print "          usegcc: ", usegcc  
12  print "             cxx: ", cxx  print "             cxx: ", cxx
13  print "        platform: ", platform  print "       cxx_flags: ", cxx_flags
 print "        hostname: ", hostname  
 print "####################################################"  
14    
15  #  #
16  # do the actual build  # do the actual build
# Line 68  CppUnitTest_path = str(esysroot) + '/too Line 22  CppUnitTest_path = str(esysroot) + '/too
22  esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'  esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'
23  CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'  CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'
24    
25    esysUtils_lib = str(esysUtils_lib_path) + '/libesysUtils.a'
26    
27    install_dir = str(esysroot) + '/esysUtils/test'
28    
29  cpp_path = [esysexception_test_path,  cpp_path = [esysexception_test_path,
30              esysUtils_path,              esysUtils_path,
31              CppUnitTest_path]              CppUnitTest_path]
# Line 76  lib_path = [esysUtils_lib_path, Line 34  lib_path = [esysUtils_lib_path,
34              CppUnitTest_lib_path]              CppUnitTest_lib_path]
35    
36  libs = ['esysUtils',  libs = ['esysUtils',
37          'CppUnitTest',          'CppUnitTest']
38          'guide',  
39          'irc']  libs.extend(sys_libs)
40    
41  sources = ['EsysExceptionTestCase.cpp',  sources = ['EsysExceptionTestCase.cpp',
42             'EsysExceptionTest.cpp']             'EsysExceptionTest.cpp']
43    
44  target = 'EsysExceptionTest.exe'  target = 'EsysExceptionTest.exe'
45    
46    import os
47  esysexception_env = Environment(ENV = os.environ)  esysexception_env = Environment(ENV = os.environ)
48    
49  esysexception_env.Replace(CXX = cxx)  esysexception_env.Replace(CXX = cxx)
# Line 94  esysexception_env.Replace(LIBPATH = lib_ Line 53  esysexception_env.Replace(LIBPATH = lib_
53  esysexception_env.Replace(LIBS = libs)  esysexception_env.Replace(LIBS = libs)
54    
55  esysexception_test_exe = esysexception_env.Program(target, sources)  esysexception_test_exe = esysexception_env.Program(target, sources)
56    
57    Depends(esysexception_test_exe, esysUtils_lib)
58    
59    Alias("build_tests", esysexception_env.Install(install_dir, esysexception_test_exe))
60    
61    import scons_extensions
62    runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', single_source=True)
63    esysexception_env.Append(BUILDERS = {'RunUnitTest' : runUnitTest_builder});
64    
65    Alias("run_tests", esysexception_env.RunUnitTest(target))

Legend:
Removed from v.241  
changed lines
  Added in v.425

  ViewVC Help
Powered by ViewVC 1.1.26