~ubuntu-branches/ubuntu/quantal/zeroc-ice/quantal

« back to all changes in this revision

Viewing changes to cpp/test/Glacier2/staticFiltering/run.py

  • Committer: Bazaar Package Importer
  • Author(s): Cleto Martin Angelina
  • Date: 2011-04-25 18:44:24 UTC
  • mfrom: (6.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110425184424-sep9i9euu434vq4c
Tags: 3.4.1-7
* Bug fix: "libdb5.1-java.jar was renamed to db.jar", thanks to Ondřej
  Surý (Closes: #623555).
* Bug fix: "causes noise in php5", thanks to Jayen Ashar (Closes:
  #623533).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/env python
2
2
# **********************************************************************
3
3
#
4
 
# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
 
4
# Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
5
5
#
6
6
# This copy of Ice is licensed to you under the terms described in the
7
7
# ICE_LICENSE file included in this distribution.
25
25
 
26
26
limitedTests = False
27
27
 
 
28
router = TestUtil.getGlacier2Router()
 
29
clientCmd = os.path.join(os.getcwd(), 'client')
 
30
serverCmd = os.path.join(os.getcwd(), 'server')
 
31
 
 
32
targets = []
 
33
if TestUtil.appverifier:
 
34
    targets = [serverCmd, clientCmd, router]
 
35
    TestUtil.setAppVerifierSettings(targets)
 
36
 
28
37
29
38
# Try and figure out what tests are reasonable with this host's
30
39
# configuration.
223
232
    print "WARNING: The network configuration for this host does not permit all "
224
233
    print "         tests to run correctly, some tests have been disabled."
225
234
 
226
 
router = os.path.join(TestUtil.getCppBinDir(), "glacier2router")
227
 
 
228
235
def pingProgress():
229
236
    sys.stdout.write('.')
230
237
    sys.stdout.flush()
272
279
    # these tests.
273
280
    #
274
281
 
275
 
    routerArgs = " --Ice.Config=" + os.path.join(os.getcwd(), "router.cfg") + \
276
 
          ' --Glacier2.Client.Endpoints="default -p 12347 -t 60000"' + \
277
 
          ' --Ice.Admin.Endpoints="tcp -h 127.0.0.1 -p 12348 -t 60000"' + \
 
282
    routerArgs = ' --Ice.Config="' + os.path.join(os.getcwd(), "router.cfg") + '"' + \
 
283
          ' --Glacier2.Client.Endpoints="default -p 12347"' + \
 
284
          ' --Ice.Admin.Endpoints="tcp -h 127.0.0.1 -p 12348"' + \
278
285
          ' --Ice.Admin.InstanceName=Glacier2' + \
279
286
          ' --Glacier2.CryptPasswords="'  + os.path.join(os.getcwd(), "passwords") + '"'
280
287
 
321
328
 
322
329
    if TestUtil.protocol != "ssl":
323
330
        serverConfig = file(os.path.join(os.getcwd(), "server.cfg"), "w")
324
 
        serverOptions = ' --Ice.Config=' + os.path.join(os.getcwd(), "server.cfg") + " " 
325
 
        serverConfig.write("BackendAdapter.Endpoints=tcp -p 12010 -t 20000\n")
 
331
        serverOptions = ' --Ice.Config="' + os.path.join(os.getcwd(), "server.cfg") + '" ' 
 
332
        serverConfig.write("BackendAdapter.Endpoints=tcp -p 12010\n")
326
333
        serverConfig.close()
327
334
    else:
328
335
        serverOptions = ""
329
336
 
330
 
    serverCmd = os.path.join(os.getcwd(), 'server')
331
337
    serverDriver = TestUtil.DriverConfig("server")
332
338
    if serverDriver.host == "127.0.0.1":
333
339
        serverDriver.host = None
342
348
    # The client is responsible for reporting success or failure. A test
343
349
    # failure will result in an assertion and the test will abort.
344
350
    #
345
 
    clientCmd = os.path.join(os.getcwd(), 'client')
346
351
    clientDriver = TestUtil.DriverConfig("client")
347
352
    if clientDriver.host == "127.0.0.1":
348
353
        clientDriver.host = None
349
354
    clientDriver.host = commonClientOptions
350
 
    clientArgs = " --Ice.Config=" + os.path.join(os.getcwd(), 'attack.cfg') + " "
 
355
    clientArgs = ' --Ice.Config="%s"' % os.path.join(os.getcwd(), 'attack.cfg')
351
356
    clientProc = TestUtil.startClient(clientCmd, clientArgs, clientDriver)
352
357
    clientProc.waitTestSuccess()
353
358
    serverProc.waitTestSuccess()
354
359
    starterProc.waitTestSuccess()
 
360
 
 
361
if TestUtil.appverifier:
 
362
    TestUtil.appVerifierAfterTestEnd(targets)