source: XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_axis_algo/Config.py @ 1706

Last change on this file since 1706 was 1706, checked in by yushan, 2 years ago

Generic_testcase : add a bash script for launching tests in different sub-folders (test_function, test_axis_algo). Generate a status report test_report.txt for all tests

  • Property svn:executable set to *
File size: 1.2 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('UsingServer2 = ' + UsingServer2 + '\n')
13        f.write('RatioServer2 = ' + repr(RatioServer2) + '\n')
14        f.write('NumberPoolsServer2 = ' + repr(NumberPoolsServer2) + '\n')
15        f.write('nb_proc_atm = ' + repr(NumberClients) + '\n')
16        f.write('NumberServers = ' + repr(NumberServers) + '\n')
17        f.write('duration = ' + repr(Duration) + '\n')
18        f.write('/\n\n')
19
20        f.close()
21
22        nb_proc = NumberClients+NumberServers
23
24        filein = open("iodef.xml", "r")
25        fileout = open("iodef.xml.tmp", "w")
26        for line in filein:
27                if 'number_pools_server2' in line:
28                        fileout.write( "        <variable id=\"number_pools_server2\" type=\"int\">"+repr(NumberPoolsServer2)+"</variable>\n")
29                elif 'using_server2' in line:
30                        fileout.write( "        <variable id=\"using_server2\" type=\"bool\">"+UsingServer2+"</variable>\n")
31                elif 'ratio_server2' in line:
32                        fileout.write( "        <variable id=\"ratio_server2\" type=\"int\">"+repr(RatioServer2)+"</variable>\n")
33                else:
34                        fileout.write(line)
35
36        filein.close()
37        fileout.close()
38        os.rename("iodef.xml.tmp", "iodef.xml")
39
40
41        print >>sys.stderr, nb_proc
42
43
44
45if __name__== "__main__":
46  main()
Note: See TracBrowser for help on using the repository browser.