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