source: anuga_validation/automated_validation_tests/validate_all.py @ 7666

Last change on this file since 7666 was 7652, checked in by ole, 14 years ago

Rolled Patong Validation into validate_all.py

File size: 1.7 KB
Line 
1"""Validate_all.py
2"""
3
4import os, time, sys
5
6
7#dirs_to_skip = ['.', 'okushiri_tank_validation_ver1', 'patong_beach_validation']
8dirs_to_skip = ['.', 'okushiri_tank_validation_ver1']
9validation_dirs_and_files = []
10
11
12for dirpath, dirnames, filenames in os.walk('.'):
13
14    if '.svn' in dirnames:
15        dirnames.remove('.svn')  # don't visit SVN directories
16
17    dir = os.path.split(dirpath)[-1]
18    if dir in dirs_to_skip:
19        #print 'Skipping %s' % dirpath
20        continue
21   
22    #print 'Searching dir', dirpath
23   
24
25    for filename in filenames:
26        if filename.startswith('validate') and filename.endswith('.py'):
27            #print 'Found %s in %s' %(filename, dirpath)
28            validation_dirs_and_files.append((dirpath, filename))           
29
30    # get repeatable order on different machines
31    validation_dirs_and_files.sort()
32
33
34print 
35print '---------------------------------------------------------'
36print 'Running all validation tests - some may take several days'
37print 'and some may require memory in the order of 8-16GB       '
38print '---------------------------------------------------------'
39
40print 'Validation test suites:'
41for path, filename in validation_dirs_and_files:
42     print '    ', os.path.join(path, filename)
43print
44print
45
46t0 = time.time()
47for path, filename in validation_dirs_and_files:
48    # print 'filename path', path, filename
49
50    os.chdir(path)
51    s = 'python %s' % filename
52    print s
53    os.system(s)
54   
55    # Back to parent directory
56    os.chdir(os.pardir)
57
58    # print 'current dir', os.getcwd()
59   
60print 'That took %.2f seconds in total' %(time.time()-t0)
61   
62
63           
64
65if sys.platform == 'win32':
66    raw_input('Press any key')
Note: See TracBrowser for help on using the repository browser.