blob: a0e2ed1be86f60f0e91d7b51578a6c0095f73c8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
@echo off
REM This is a 4NT Batch file. To use, just type run_test and it will start the
REM server, wait for a second, and then start the client. At the end, it will
REM clean up.
setlocal
set nsiorfile=%temp%\qns_ior
set del=2
REM variables for parameters
set nsport=20002
set clport=20003
set svport=20004
set ffport=20005
set lcport=20006
set gfport=20007
set n=1
set leave=/C
set ior=0
set done=
:get_args
if %1 == /h goto is_h
if %1 == /? goto is_h
goto no_h
:is_h
echo run_test [/n num] [/leave] [/h] [/ns, /sv, /ff, /cl, /gf]
echo.
echo /n num -- runs the client num times
echo /leave -- leaves the servers running and their windows open
echo /h -- prints this information
echo /ns /sv /ff /cl /gf -- Runs only one of the executables
quit
:no_h
if not %1 == /ns goto no_ns
set done=quit
goto run_name_server
:no_ns
if not %1 == /sv goto no_sv
set done=quit
goto run_server
:no_sv
if not %1 == /ff goto no_ff
set done=quit
goto run_finder
:no_ff
if not %1 == /lc goto no_lc
set done=quit
goto run_lifecycle_service
:no_lc
if not %1 == /gf goto no_gf
set done=quit
goto run_generic_factory
:no_gf
if not %1 == /cl goto no_cl
set done=quit
goto run_client
:no_cl
if not %1 == /n goto no_n
set n=%2
shift
shift
goto get_args
:no_n
if not %1 == /leave goto no_leave
set leave=/K
shift
goto get_args
:no_leave
:run_name_server
REM Naming Service must have been built or else this will fail
start "Naming Service" %leave ..\..\orbsvcs\Naming_Service\Naming_Service.exe -ORBport %nsport -ORBobjrefstyle url -o %nsiorfile
rem -ORBnameserviceior %temp\qns_ior
%done
REM Delay some to let the Naming Service get set up
DELAY %del
:run_server
REM read in the IOR from the file
for %%d in (@%nsiorfile) do set ior=%%d
REM Start the server
start "Quoter Server" %leave server.exe -ORBport %svport -ORBobjrefstyle url -ORBnameserviceior %ior -ORBsvcconf server.conf
%done
REM Delay some to let the server get set up
DELAY %del
:run_finder
REM read in the IOR from the file
for %%d in (@%nsiorfile) do set ior=%%d
REM Start the factory finder
start "Quoter Factory Finder" %leave Factory_Finder.exe -ORBport %ffport -ORBobjrefstyle url -ORBnameserviceior %ior -ORBsvcconf svc.conf
%done
REM Delay some to let the Factory Finder get set up
DELAY %del
:run_lifecycle_service
REM read in the IOR from the file
REM for %%d in (@%nsiorfile) do set ior=%%d
REM Start the Lifecycle Service
REM start "Quoter LifeCycle Service" %leave LifeCycle_Service.exe -ORBport %lcport -ORBobjrefstyle url -ORBnameserviceior %ior -ORBsvcconf svc.conf
%done
REM Delay some to let the LifeCycle Service get set up
REM DELAY %del
:run_generic_factory
REM read in the IOR from the file
for %%d in (@%nsiorfile) do set ior=%%d
REM Start the factory finder
start "Quoter Generic Factory" %leave Generic_Factory.exe -ORBport %gfport -ORBobjrefstyle url -ORBnameserviceior %ior -ORBsvcconf svc.conf
%done
REM Delay some to let the Generic Factory get set up
DELAY %del
:run_client
REM read in the IOR from the file
for %%d in (@%nsiorfile) do set ior=%%d
REM And now start the client
for /l %x in (1,1,%n) do client.exe -ORBobjrefstyle url -ORBport %clport -ORBnameserviceior %ior -ORBsvcconf client.conf
%done
REM We don't really need to delete this
REM del %temp%\qns_ior
REM Remove any running servers
if %leave==/C activate "Naming Service" CLOSE
if %leave==/C activate "Quoter Server" CLOSE
if %leave==/C activate "Quoter Factory Finder" CLOSE
if %leave==/C activate "Quoter Generic Factory" CLOSE
endlocal
|