source: trunk/anuga_core/test_all.py @ 9088

Last change on this file since 9088 was 9085, checked in by steve, 11 years ago

Adding anuga_1d to test all

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