/[escript]/trunk/escript/test/DataFactory/SConscript
ViewVC logotype

Contents of /trunk/escript/test/DataFactory/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 455 - (show annotations)
Tue Jan 24 04:36:54 2006 UTC (13 years, 5 months ago) by jgs
File size: 2199 byte(s)
minor comment and formatting changes

1 # Scons configuration file for DataFactory unit tests
2
3 #
4 # set appropriate defaults for configuration variables
5
6 esysroot=str(Dir('./../../../..').abspath)
7 execfile(str(File(esysroot+"/scons/esys_options.py")))
8
9 cxx_flags=cxx_flags_debug
10
11 print "Build configuration for module: DataFactory unit tests"
12 print " cxx: ", cxx
13 print " cxx_flags: ", cxx_flags
14
15 #
16 # do the actual build
17
18 datafactory_test_path = str(esysroot) + '/escript/test/DataFactory'
19 escript_path = str(esysroot) + '/escript/inc'
20 esysUtils_path = str(esysroot) + '/esysUtils/inc'
21 CppUnitTest_path = str(esysroot) + '/tools/CppUnitTest/inc'
22
23 esys_lib_path = str(esysroot) + '/lib'
24 esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'
25 CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'
26
27 escript_lib = str(esys_lib_path) + '/libescriptcpp.so'
28
29 install_dir = str(esysroot) + '/escript/test'
30
31 cpp_path = [datafactory_test_path,
32 escript_path,
33 esysUtils_path,
34 CppUnitTest_path,
35 python_path,
36 boost_path]
37
38 lib_path = [esys_lib_path,
39 esysUtils_lib_path,
40 CppUnitTest_lib_path,
41 python_lib_path,
42 boost_lib_path]
43
44 libs = ['escriptcpp',
45 'esysUtils',
46 'CppUnitTest',
47 str(python_lib),
48 str(boost_lib),
49 'dl',
50 'util']
51
52 libs.extend(sys_libs)
53
54 sources = ['DataFactoryTestCase.cpp',
55 'DataFactoryTest.cpp']
56
57 target = 'DataFactoryTest.exe'
58
59 import os
60 datafactory_env = Environment(ENV = os.environ)
61
62 datafactory_env.Replace(CXX = cxx)
63 datafactory_env.Replace(CXXFLAGS = cxx_flags)
64 datafactory_env.Replace(CPPPATH = cpp_path)
65 datafactory_env.Replace(LIBPATH = lib_path)
66 datafactory_env.Replace(LIBS = libs)
67
68 datafactory_test_exe = datafactory_env.Program(target, sources)
69
70 Depends(datafactory_test_exe, escript_lib)
71
72 Alias("build_tests", datafactory_env.Install(install_dir, datafactory_test_exe))
73
74 import scons_extensions
75 runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', single_source=True)
76 datafactory_env.Append(BUILDERS = {'RunUnitTest' : runUnitTest_builder});
77
78 Alias("run_tests", datafactory_env.RunUnitTest(target))

  ViewVC Help
Powered by ViewVC 1.1.26