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

Last change on this file since 1843 was 1843, checked in by yushan, 22 months ago

XIOS test suite : delete unnecessary files

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