/[escript]/trunk/pycad/test/python/SConscript
ViewVC logotype

Diff of /trunk/pycad/test/python/SConscript

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

revision 1704 by trankine, Fri Jan 11 07:45:58 2008 UTC revision 1705 by ksteube, Thu Aug 14 05:56:40 2008 UTC
# Line 1  Line 1 
1    #
2    # $Id$
3    #
4    #######################################################
5    #
6    #           Copyright 2003-2007 by ACceSS MNRF
7    #       Copyright 2007 by University of Queensland
8    #
9    #                http://esscc.uq.edu.au
10    #        Primary Business: Queensland, Australia
11    #  Licensed under the Open Software License version 3.0
12    #     http://www.opensource.org/licenses/osl-3.0.php
13    #
14    #######################################################
15    #
16    
17    import os
18  Import('*')  Import('*')
19  local_env=env.Copy()  
20    local_env = clone_env(env)
21    
22  src_dir = local_env.Dir('.').srcnode().abspath  src_dir = local_env.Dir('.').srcnode().abspath
 import os  
23  filenames = os.listdir(src_dir)  filenames = os.listdir(src_dir)
24  #  #
25  # files defining tests but are not running by itself:  # files defining tests but are not running by itself:
# Line 14  testdata_dir = [x for x in filenames if Line 32  testdata_dir = [x for x in filenames if
32  #  #
33  #  files defining test runs (passing in a release)  #  files defining test runs (passing in a release)
34  #  #
35  testruns = [x for x in filenames if x.startswith('run_') and os.path.splitext(x)[1] in ['.py'] ]  testruns = []
36    testruns += ['run_pycad_test.py']
37  #  #
38  # files defining tests run locally (not as part of a release)  # files defining tests run locally (not as part of a release)
39  #  #
# Line 36  local_env['ENV']['ESCRIPT_WORKDIR']=env. Line 55  local_env['ENV']['ESCRIPT_WORKDIR']=env.
55  env.Alias('local_py_tests',[os.path.splitext(x)[0]+'.passed' for x in alltestruns])  env.Alias('local_py_tests',[os.path.splitext(x)[0]+'.passed' for x in alltestruns])
56  env.Alias('py_tests', [os.path.splitext(x)[0]+'.passed' for x in testruns ])  env.Alias('py_tests', [os.path.splitext(x)[0]+'.passed' for x in testruns ])
57    
 # get all the python files in the release tar file  
 release_pyfiles = [ env.File("SConscript"), ]  
 release_datafiles=[]  # FIXIT: is there a better way?  
 for d in testdata_dir:  
    release_datafiles+=[ d+"/"+x for x in os.listdir(local_env.Dir(d).srcnode().abspath) if not x.startswith('.')]  
 release_testfiles = [ env.File(x) for x in testfiles + testruns ] + [ env.File(x) for x in release_datafiles ]  
 env.Zip(src_zipfile, release_pyfiles)  
 env.Tar(src_tarfile, release_pyfiles)  
 env.Zip(test_zipfile, release_testfiles)  
 env.Tar(test_tarfile, release_testfiles)  
   
58  #  #
59  # run all tests:  # run all tests:
60  #  #
61  program = local_env.RunPyUnitTest(alltestruns)  program = local_env.RunPyUnitTest(alltestruns)
62    
63  Depends(program, pyinstall)  Depends(program, local_env['pyinstall'])
64  Depends(program, dep_lib)  Depends(program, dep_lib)
65  Depends(program, 'build_py_tests')  Depends(program, 'build_py_tests')

Legend:
Removed from v.1704  
changed lines
  Added in v.1705

  ViewVC Help
Powered by ViewVC 1.1.26