[7288] | 1 | from anuga.utilities.data_audit_wrapper import IP_verified |
---|
| 2 | from tempfile import mktemp |
---|
| 3 | |
---|
| 4 | import os |
---|
| 5 | |
---|
| 6 | buildroot = os.getcwd() |
---|
| 7 | |
---|
| 8 | os.chdir('source') |
---|
| 9 | os.chdir('anuga') |
---|
| 10 | |
---|
[7460] | 11 | print 'Changing to', os.getcwd() # This is now different from buildroot |
---|
| 12 | #execfile('test_all.py') |
---|
[7288] | 13 | |
---|
| 14 | |
---|
[7460] | 15 | os.chdir('..') |
---|
| 16 | os.chdir('pymetis') |
---|
| 17 | print 'Changing to', os.getcwd() |
---|
| 18 | #execfile('test_all.py') |
---|
[7288] | 19 | |
---|
[7460] | 20 | os.chdir('..') |
---|
| 21 | os.chdir('anuga_parallel') |
---|
| 22 | print 'Changing to', os.getcwd() |
---|
| 23 | #execfile('test_all.py') |
---|
| 24 | |
---|
[7288] | 25 | print |
---|
| 26 | print '************************** NOTE *************************************' |
---|
| 27 | print 'If all unit tests passed you should run the suite of validation tests' |
---|
| 28 | print 'Go to the directory anuga_validation/automated_validation_tests' |
---|
| 29 | print 'and run' |
---|
| 30 | print ' python validate_all.py' |
---|
| 31 | print |
---|
| 32 | print 'These tests will take a few hours and will verify that ANUGA' |
---|
| 33 | print 'produces the physical results expected.' |
---|
| 34 | print '*********************************************************************' |
---|
| 35 | |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | # Temporary bail out |
---|
| 39 | import sys; sys.exit() |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | #--------------------------- |
---|
| 43 | # IP Data Audit (in source/anuga directory as well) |
---|
| 44 | #--------------------------- |
---|
| 45 | |
---|
| 46 | # Create temporary area for svn to export source files |
---|
| 47 | # FIXME (Ole): It would be good to make sure these files |
---|
| 48 | # are exactly the same as those walked over by the |
---|
| 49 | # release script: create_distribution. |
---|
| 50 | # |
---|
| 51 | # Come to think of it - this is probably not the best |
---|
| 52 | # place for this check. It may have to move up one level. |
---|
| 53 | # What do you all think? |
---|
| 54 | |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | temp_dir = mktemp() |
---|
| 58 | |
---|
| 59 | print 'Temp dir', temp_dir |
---|
| 60 | os.mkdir(temp_dir) |
---|
| 61 | |
---|
| 62 | # Get the ANUGA core source files |
---|
| 63 | s = 'svn export . %s%sanuga' %(temp_dir, os.sep) |
---|
| 64 | print s |
---|
| 65 | os.system(s) |
---|
| 66 | |
---|
| 67 | print 'Verifying data IP' |
---|
| 68 | if not IP_verified(temp_dir): |
---|
| 69 | msg = 'Files have not been verified for IP.\n' |
---|
| 70 | msg += 'Each data file must have a license file with it.' |
---|
| 71 | raise Exception, msg |
---|
| 72 | |
---|
| 73 | |
---|
| 74 | |
---|
| 75 | |
---|
| 76 | |
---|
| 77 | |
---|