source: trunk/anuga_core/test_all.py @ 8967

Last change on this file since 8967 was 8949, checked in by steve, 11 years ago

Just a test committing from NCI

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