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

Diff of /trunk/weipa/test/SConscript

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

revision 3596 by caltinay, Thu Nov 11 23:26:52 2010 UTC revision 3597 by caltinay, Thu Sep 15 06:03:17 2011 UTC
# Line 11  Line 11 
11  #  #
12  ########################################################  ########################################################
13    
14    
15  Import('*')  Import('*')
16  local_env = env.Clone()  local_env = env.Clone()
17    
18  # get the test source file names  if local_env['cppunit']:
19  sources = Glob('*.cpp')+Glob('*.c')      # get the test source file names
20  testname='weipa_UnitTest'      sources = Glob('*.cpp')+Glob('*.c')
21        testname='weipa_UnitTest'
22  # build the executable  
23  local_env.Append(LIBS=['weipa', 'escript', 'dudley', 'finley', 'CppUnitTest'])      # build the executable
24  if local_env['silo']:      local_env.Append(LIBS=['weipa', 'escript', 'dudley', 'finley']+env['cppunit_libs'])
25    local_env.Append(CPPDEFINES = ['USE_SILO'])      if local_env['silo']:
26    local_env.AppendUnique(LIBS = [env['silo_libs']])          local_env.Append(CPPDEFINES = ['USE_SILO'])
27  program = local_env.Program(testname, sources)          local_env.AppendUnique(LIBS = [env['silo_libs']])
28        program = local_env.Program(testname, sources)
29  # run the tests - but only if test_targets are stale  
30  local_env.RunUnitTest(testname)      # run the tests - but only if test_targets are stale
31        local_env.RunUnitTest(testname)
32  # add unit test to target alias  
33  Alias('build_tests', program)      # add unit test to target alias
34  Alias("run_tests", testname+'.passed')      Alias('build_tests', program)
35        Alias("run_tests", testname+'.passed')
36    
37        # add a group of tests
38        from grouptest import *
39        tgroup=GroupTest("$BINRUNNER ", (), "", "$BUILD_DIR/weipa/test", ('./'+testname,))
40        TestGroups.append(tgroup)
41    
42  # configure python unit tests  # configure python unit tests
43  local_env.SConscript(dirs = ['#/weipa/test/python'], variant_dir='python', duplicate=0)  local_env.SConscript(dirs = ['#/weipa/test/python'], variant_dir='python', duplicate=0)
44    
 # add a group of tests  
 from grouptest import *  
 tgroup=GroupTest("$BINRUNNER ", (), "", "$BUILD_DIR/weipa/test", ('./'+testname,))  
 TestGroups.append(tgroup)  
   

Legend:
Removed from v.3596  
changed lines
  Added in v.3597

  ViewVC Help
Powered by ViewVC 1.1.26