source: trunk/anuga_core/test_all.py @ 8780

Last change on this file since 8780 was 8779, checked in by steve, 11 years ago

Just changed test_all to remove comment to run validation tests

File size: 2.4 KB
Line 
1from anuga.utilities.data_audit_wrapper import IP_verified
2from tempfile import mktemp
3
4import os
5
6buildroot = os.getcwd()
7
8os.chdir('source')
9os.chdir('anuga')
10print
11print '======================= anuga tests ================================='   
12print 'Changing to', os.getcwd() # This is now different from buildroot   
13execfile('test_all.py')
14
15
16# Try to run parallel tests if pypar is installed
17
18try:
19    import pypar
20    os.chdir(buildroot)
21    os.chdir('source')
22    os.chdir('anuga_parallel')
23    print
24    print '===================== anuga_parallel tests =========================='
25    print 'Changing to', os.getcwd()
26    execfile('test_all.py')
27except:
28    print 'anuga_parallel tests not run as pypar not installed'
29
30
31
32
33
34
35# FIXME SR 20130327: Just commenting out this comment to run the validation tests.
36# We are currently undating the automated validation tests, so at present this point to
37# something which most people do get as part of the download. We will update and
38# point them to the new anuga_validation_tests in future.
39"""
40print
41print '************************** NOTE *************************************'
42print 'If all unit tests passed you should run the suite of validation tests'
43print 'Go to the directory anuga_validation/automated_validation_tests'
44print 'and run'
45print '    python validate_all.py'
46print
47print 'These tests will take a few hours and will verify that ANUGA'
48print 'produces the physical results expected.'
49print '*********************************************************************'
50"""
51
52
53# Temporary bail out
54import sys; sys.exit() 
55
56
57#---------------------------
58# IP Data Audit (in source/anuga directory as well)
59#---------------------------
60
61# Create temporary area for svn to export source files
62# FIXME (Ole): It would be good to make sure these files
63# are exactly the same as those walked over by the
64# release script: create_distribution.
65#
66# Come to think of it - this is probably not the best
67# place for this check. It may have to move up one level.
68# What do you all think?
69
70
71
72temp_dir = mktemp()
73
74print 'Temp dir', temp_dir
75os.mkdir(temp_dir)
76
77# Get the ANUGA core source files
78s = 'svn export . %s%sanuga' %(temp_dir, os.sep) 
79print s
80os.system(s)
81
82print 'Verifying data IP'
83if not IP_verified(temp_dir):
84    msg = 'Files have not been verified for IP.\n'
85    msg += 'Each data file must have a license file with it.'
86    raise Exception, msg
87
88
89
90
91
92   
Note: See TracBrowser for help on using the repository browser.