source: XIOS/trunk/xios_test_suite/TEST_SUITE/config.py @ 1806

Last change on this file since 1806 was 1806, checked in by ymipsl, 22 months ago

XIOS test suite : files for test suite runs

YM

  • Property svn:executable set to *
File size: 1.4 KB
Line 
1import os
2import sys
3
4from default_param import *
5from user_param import *
6
7def main():
8       
9        f=open("param.def", "w")
10
11        f.write("&params_run\n")
12        f.write('nb_proc_atm = ' + repr(NumberClients) + '\n')
13        f.write('duration = ' + repr(Duration) + '\n')
14        f.write('/\n\n')
15
16        f.close()
17
18
19        f=open("all_param.def", "w")
20
21        f.write("&params_run\n")
22        f.write('UsingServer2 = ' + repr(UsingServer2) + '\n')
23        f.write('RatioServer2 = ' + repr(RatioServer2) + '\n')
24        f.write('NumberPoolsServer2 = ' + repr(NumberPoolsServer2) + '\n')
25        f.write('NumberClients = ' + repr(NumberClients) + '\n')
26        f.write('NumberServers = ' + repr(NumberServers) + '\n')
27        f.write('Duration = ' + repr(Duration) + '\n')
28        f.write('ATMdomain = ' + repr(ATMdomain) + '\n')
29        f.write('/\n\n')
30
31        f.close()
32
33
34        nb_proc = NumberClients+NumberServers
35
36        filein = open("../iodef.xml.template", "r")
37        fileout = open("iodef.xml", "w") #this iodef.xml has defined variables, it is not the template
38        for line in filein:
39                if 'xios::nbplSrv2' in line:    line = line.replace("xios::nbplSrv2", repr(NumberPoolsServer2))
40                if 'xios::usingSrv2' in line:   line = line.replace("xios::usingSrv2", UsingServer2)
41                if 'xios::ratioSrv2' in line:   line=line.replace("xios::ratioSrv2", repr(RatioServer2))
42                if 'atm::domain' in line:       line=line.replace("atm::domain", ATMdomain)
43                fileout.write(line)
44               
45
46        filein.close()
47        fileout.close()
48
49
50        print >>sys.stderr, nb_proc
51
52
53
54if __name__== "__main__":
55  main()
Note: See TracBrowser for help on using the repository browser.