Changeset 5016


Ignore:
Timestamp:
Feb 8, 2008, 5:46:27 PM (17 years ago)
Author:
ole
Message:

Added IP tracking to test_all and updated create_distribution

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/abstract_2d_finite_volumes/util.py

    r5011 r5016  
    366366    # NOTE (Ole): Caching Interpolation function is too slow as
    367367    # the very long parameters need to be hashed.
    368 
    369 
    370368
    371369
  • anuga_core/test_all.py

    r4802 r5016  
     1from anuga.utilities.data_audit import IP_verified
     2from tempfile import mktemp
     3
    14import os
    25
     
    912
    1013execfile('test_all.py')
     14
     15
     16
     17#---------------------------
     18# IP Data Audit (in source/anuga directory as well)
     19#---------------------------
     20
     21#-----------------------------------------------------
     22# Create temporary area for svn to export source files
     23#-----------------------------------------------------
     24temp_dir = mktemp()
     25
     26print 'Temp dir', temp_dir
     27os.mkdir(temp_dir)
     28
     29
     30#--------------------------------
     31# Get the ANUGA core source files
     32#--------------------------------
     33s = 'svn export . %s%sanuga' %(temp_dir, os.sep)
     34print s
     35os.system(s)
     36
     37
     38
     39print 'Verifying data IP'
     40if not IP_verified(temp_dir):
     41    msg = 'Files have not been verified for IP.\n'
     42    msg += 'Each data file must have a license file with it.'
     43    raise Exception, msg
     44
     45
    1146
    1247print
  • create_distribution.py

    r4939 r5016  
    2828from anuga.abstract_2d_finite_volumes.util import get_revision_number
    2929from anuga.abstract_2d_finite_volumes.util import store_version_info
    30 from anuga.anuga_config import major_revision
    31 
    32 from anuga.utilities.data_audit import identify_data_files
    33 
     30from anuga.config import major_revision
     31
     32from anuga.utilities.data_audit import IP_verified
    3433
    3534if platform == 'win32':
     
    7877# Get the ANUGA core source files
    7978#--------------------------------
    80 s = 'svn export -r %d anuga_core/source/anuga %s/anuga' %(svn_revision,
    81                                                           distro_dir)
    82 print s
    83 system(s)
     79s = 'svn export -r %d --quiet anuga_core/source/anuga %s/anuga' %(svn_revision,
     80                                                                  distro_dir)
     81print s
     82system(s)
     83
     84#-----------------------------
     85# Get validation_files as well
     86#-----------------------------
     87s = 'mkdir %s/anuga_validation' %distro_dir
     88system(s)
     89
     90s = 'svn export -r %d --quiet anuga_validation/okushiri_2005 %s/anuga_validation/okushiri'\
     91    %(svn_revision, distro_dir)
     92print s
     93system(s)
     94
     95s = 'svn export -r %d --quiet anuga_validation/solitary_waves %s/anuga_validation/solitary_waves'\
     96    %(svn_revision, distro_dir)
     97print s
     98system(s)
     99
     100s = 'svn export -r %d --quiet anuga_validation/automated_validation_tests %s/anuga_validation/automated_validation_tests'\
     101    %(svn_revision, distro_dir)
     102print s
     103system(s)
     104
     105# FIXME: Other validations in here as they appear!
     106
     107
     108#---------------------------
     109# Get demos from user manual
     110#---------------------------
     111s = 'svn export -r %d --quiet anuga_core/documentation/user_manual/demos %s/anuga_demos'\
     112    %(svn_revision, distro_dir)
     113print s
     114system(s)
     115
    84116
    85117# Store file with revision info for use with get_revision_number
     
    87119
    88120
    89 #-----------------------------
    90 # Get validation_files as well
    91 #-----------------------------
    92 s = 'mkdir %s/anuga_validation' %distro_dir
    93 system(s)
    94 
    95 s = 'svn export anuga_validation/okushiri_2005 %s/anuga_validation/okushiri'\
    96     %(distro_dir)
    97 print s
    98 system(s)
    99 
    100 s = 'svn export anuga_validation/solitary_waves %s/anuga_validation/solitary_waves'\
    101     %(distro_dir)
    102 print s
    103 system(s)
    104 
    105 s = 'svn export anuga_validation/automated_validation_tests %s/anuga_validation/automated_validation_tests'\
    106     %(distro_dir)
    107 print s
    108 system(s)
    109 
    110 # FIXME: Other validations in here as they appear!
    111 
    112 
    113 #---------------------------
    114 # Get demos from user manual
    115 #---------------------------
    116 s = 'svn export anuga_core/documentation/user_manual/demos %s/anuga_demos'\
    117     %(distro_dir)
    118 print s
    119 system(s)
    120 
    121 
    122 identify_data_files(distro_dir)
     121#---------------------------
     122# IP Data Audit
     123#---------------------------
     124print 'Verifying data IP'
     125if not IP_verified(distro_dir):
     126    msg = 'Files have not been verified for IP.\n'
     127    msg += 'Each data file must have a license file with it.'
     128    raise Exception, msg
    123129
    124130
Note: See TracChangeset for help on using the changeset viewer.