当前位置: 首页>>代码示例>>Python>>正文


Python IceGridAdmin.iceGridTest方法代码示例

本文整理汇总了Python中IceGridAdmin.iceGridTest方法的典型用法代码示例。如果您正苦于以下问题:Python IceGridAdmin.iceGridTest方法的具体用法?Python IceGridAdmin.iceGridTest怎么用?Python IceGridAdmin.iceGridTest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IceGridAdmin的用法示例。


在下文中一共展示了IceGridAdmin.iceGridTest方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Copyright

# 需要导入模块: import IceGridAdmin [as 别名]
# 或者: from IceGridAdmin import iceGridTest [as 别名]
# Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************

import os, sys

path = [ ".", "..", "../..", "../../..", "../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
    path = [os.path.join(head, p) for p in path]
path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
if len(path) == 0:
    raise RuntimeError("can't find toplevel directory!")
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil, IceGridAdmin

#
# Don't use a slave registry for this test. This can lead to race
# conditions when resolving endpoints of round-robin replica groups if
# the slave didn't fully load the servers at the time of the client
# invocation
#
IceGridAdmin.nreplicas=0

IceGridAdmin.registryOptions += " --Ice.Plugin.RegistryPlugin=RegistryPlugin:createRegistryPlugin"

IceGridAdmin.iceGridTest("application.xml", "--Ice.RetryIntervals=\"0 50 100 250\"", "icebox.exe='%s'" % TestUtil.getIceBox())
开发者ID:pedia,项目名称:zeroc-ice,代码行数:32,代码来源:run.py

示例2: print

# 需要导入模块: import IceGridAdmin [as 别名]
# 或者: from IceGridAdmin import iceGridTest [as 别名]
    + r" --IceGrid.Registry.DynamicRegistration"
    + r" --IceGrid.Registry.SessionFilters"
    + r" --IceGrid.Registry.AdminSessionFilters"
    + r' --IceGrid.Registry.PermissionsVerifier="ClientPermissionsVerifier"'
    + r' --IceGrid.Registry.AdminPermissionsVerifier="AdminPermissionsVerifier:tcp -p 12002"'
    + r' --IceGrid.Registry.SSLPermissionsVerifier="SSLPermissionsVerifier"'
    + r' --IceGrid.Registry.AdminSSLPermissionsVerifier="SSLPermissionsVerifier"'
)

bindir = TestUtil.getCppBinDir()
testdir = os.getcwd()
serverdir = TestUtil.getTestDirectory("server")

IceGridAdmin.iceGridTest(
    "application.xml",
    '--IceBinDir="%s" --TestDir="%s" --ServerDir="%s"' % (bindir, testdir, serverdir),
    "properties-override='%s' server.dir=\"%s\"" % (IceGridAdmin.iceGridNodePropertiesOverride(), serverdir),
)

verifierProc.waitTestSuccess()

print("Running test with 1.0 encoding...")

sys.stdout.write("starting admin permissions verifier... ")
verifierProc = TestUtil.startServer(verifier, config=TestUtil.DriverConfig("server"))
print("ok")

IceGridAdmin.iceGridTest(
    "application.xml",
    '--Ice.Default.EncodingVersion=1.0 --IceBinDir="%s" --TestDir="%s" --ServerDir="%s"' % (bindir, testdir, serverdir),
    "properties-override='%s' server.dir=\"%s\"" % (IceGridAdmin.iceGridNodePropertiesOverride(), serverdir),
开发者ID:Crysty-Yui,项目名称:ice,代码行数:33,代码来源:run.py

示例3: len

# 需要导入模块: import IceGridAdmin [as 别名]
# 或者: from IceGridAdmin import iceGridTest [as 别名]
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************

import os, sys

path = [ ".", "..", "../..", "../../..", "../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
    path = [os.path.join(head, p) for p in path]
path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
if len(path) == 0:
    raise RuntimeError("can't find toplevel directory!")
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil, IceGridAdmin

# Test IceGrid discovery with multiple replicas
IceGridAdmin.nreplicas=2

testdir = os.path.join(os.getcwd(),)
#
# Test client/server without on demand activation.
#
IceGridAdmin.iceGridClientServerTest("", "--TestAdapter.Endpoints=default --TestAdapter.AdapterId=TestAdapter")

#
# Test client/server with on demand activation.
#
IceGridAdmin.iceGridTest("simple_server.xml", "--with-deploy",
                         "server.dir='%s'" %  TestUtil.getTestDirectory("server"))
开发者ID:465060874,项目名称:ice,代码行数:32,代码来源:run.py

示例4: print

# 需要导入模块: import IceGridAdmin [as 别名]
# 或者: from IceGridAdmin import iceGridTest [as 别名]
sys.stdout.write("starting admin permissions verifier... ")
verifierProc = TestUtil.startServer(os.path.join(os.getcwd(), "verifier"), config=TestUtil.DriverConfig("server"))
print("ok")

IceGridAdmin.registryOptions += \
                             r' --IceGrid.Registry.DynamicRegistration' + \
                             r' --IceGrid.Registry.SessionFilters' + \
                             r' --IceGrid.Registry.AdminSessionFilters' + \
                             r' --IceGrid.Registry.PermissionsVerifier="ClientPermissionsVerifier"' + \
                             r' --IceGrid.Registry.AdminPermissionsVerifier="AdminPermissionsVerifier:tcp -p 12002"'+ \
                             r' --IceGrid.Registry.SSLPermissionsVerifier="SSLPermissionsVerifier"' + \
                             r' --IceGrid.Registry.AdminSSLPermissionsVerifier="SSLPermissionsVerifier"'

IceGridAdmin.iceGridTest("application.xml",
    '--IceBinDir="%s" --TestDir="%s"' % (TestUtil.getCppBinDir(), os.getcwd()),
    'properties-override=\'%s\'' % IceGridAdmin.iceGridNodePropertiesOverride())

verifierProc.waitTestSuccess()

print("Running test with 1.0 encoding...")

sys.stdout.write("starting admin permissions verifier... ")
verifierProc = TestUtil.startServer(os.path.join(os.getcwd(), "verifier"), config=TestUtil.DriverConfig("server"))
print("ok")

IceGridAdmin.iceGridTest("application.xml",
    '--Ice.Default.EncodingVersion=1.0 --IceBinDir="%s" --TestDir="%s"' % (TestUtil.getCppBinDir(), os.getcwd()),
    'properties-override=\'%s\'' % IceGridAdmin.iceGridNodePropertiesOverride())

verifierProc.waitTestSuccess()
开发者ID:Jonavin,项目名称:ice,代码行数:32,代码来源:run.py

示例5: open

# 需要导入模块: import IceGridAdmin [as 别名]
# 或者: from IceGridAdmin import iceGridTest [as 别名]
  [ "updated/dir1/file2", "dummy-file2-updated!"],
  [ "updated/dir2/file3", "dummy-file3"],
  [ "updated/dir2/file4", "dummy-file4"],
]


print "creating IcePatch2 data directory...",
if not os.path.exists(datadir):
    os.mkdir(datadir)
else:
    IceGridAdmin.cleanDbDir(datadir)

for [file, content] in files:
    file = os.path.join(datadir, file)
    if not os.path.exists(os.path.dirname(file)):
        os.makedirs(os.path.dirname(file))
    f = open(file, 'w')    
    f.write(content)
    f.close()

icepatch2Calc(datadir, "original")
icepatch2Calc(datadir, "updated")
print "ok"

IceGridAdmin.iceGridTest(name, "application.xml", "")

IceGridAdmin.cleanDbDir(datadir)
os.rmdir(datadir)

sys.exit(0)
开发者ID:updowndown,项目名称:myffff,代码行数:32,代码来源:run.py

示例6: len

# 需要导入模块: import IceGridAdmin [as 别名]
# 或者: from IceGridAdmin import iceGridTest [as 别名]
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************

import os, sys

path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../..", "../../../../../..",
         "../../../../../../..", "../../../../../../../..", "../../../../../../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
    path = [os.path.join(head, p) for p in path]
path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
if len(path) == 0:
    raise RuntimeError("can't find toplevel directory!")
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil, IceGridAdmin

# Test IceGrid discovery with multiple replicas
IceGridAdmin.nreplicas=2 

#
# Test client/server without on demand activation.
#
IceGridAdmin.iceGridClientServerTest("", "--TestAdapter.Endpoints=default --TestAdapter.AdapterId=TestAdapter")

#
# Test client/server with on demand activation.
#
IceGridAdmin.iceGridTest("simple_server.xml", "--with-deploy")
开发者ID:bjarnescottlee,项目名称:ice,代码行数:32,代码来源:run.py

示例7: Copyright

# 需要导入模块: import IceGridAdmin [as 别名]
# 或者: from IceGridAdmin import iceGridTest [as 别名]
#!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************

import os, sys

path = [ ".", "..", "../..", "../../..", "../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
    path = [os.path.join(head, p) for p in path]
path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
if len(path) == 0:
    raise RuntimeError("can't find toplevel directory!")
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil, IceGridAdmin

IceGridAdmin.iceGridTest("application.xml", 
                         "",
                         "properties-override='%s'" % IceGridAdmin.iceGridNodePropertiesOverride())
开发者ID:2008hatake,项目名称:zeroc-ice,代码行数:27,代码来源:run.py

示例8: Copyright

# 需要导入模块: import IceGridAdmin [as 别名]
# 或者: from IceGridAdmin import iceGridTest [as 别名]
#
# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************

import os, sys

path = [ ".", "..", "../..", "../../..", "../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
    path = [os.path.join(head, p) for p in path]
path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
if len(path) == 0:
    raise RuntimeError("can't find toplevel directory!")
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil, IceGridAdmin

TestUtil.addAdditionalBinDirectories([os.path.join(os.getcwd(), TestUtil.getTestDirectory("testservice"))])
serverDir = os.path.join(os.getcwd(), TestUtil.getTestDirectory("server"))
os.environ["MY_FOO"] = "12"
IceGridAdmin.iceGridTest("application.xml", '--TestDir="%s"' % serverDir, ("icebox.exe='%s' server.dir='%s'" %
                         (TestUtil.getIceBox(), serverDir)))

# Tests with targets
IceGridAdmin.iceGridTest("application.xml", '-t --TestDir="%s"' % serverDir,
                         ("icebox.exe='%s' server.dir='%s' moreservers moreservices moreproperties" %
                         (TestUtil.getIceBox(), serverDir)))
开发者ID:465060874,项目名称:ice,代码行数:32,代码来源:run.py

示例9:

# 需要导入模块: import IceGridAdmin [as 别名]
# 或者: from IceGridAdmin import iceGridTest [as 别名]
testdir = os.path.join(toplevel, "test", name)

node1Dir = os.path.join(testdir, "db", "node-1")
if not os.path.exists(node1Dir):
    os.mkdir(node1Dir)
else:
    IceGridAdmin.cleanDbDir(node1Dir)

print "starting admin permissions verifier...",
serverCmd = os.path.join(testdir, "verifier") + TestUtil.commonServerOptions + TestUtil.defaultHost
if TestUtil.debug:
    print "(" + serverCmd + ")",
verifierPipe = os.popen(serverCmd + " 2>&1")
TestUtil.getServerPid(verifierPipe)
TestUtil.getAdapterReady(verifierPipe)
print "ok"

IceGridAdmin.registryOptions += \
                             r' --IceGrid.Registry.DynamicRegistration' + \
                             r' --IceGrid.Registry.PermissionsVerifier="ClientPermissionsVerifier"' + \
                             r' --IceGrid.Registry.AdminPermissionsVerifier="AdminPermissionsVerifier:tcp -p 12002"'+ \
                             r' --IceGrid.Registry.SSLPermissionsVerifier="SSLPermissionsVerifier"'

IceGridAdmin.iceGridTest(name, "application.xml", \
                         "--IceDir=\"" + toplevel + "\" --TestDir=\"" + testdir + "\"", \
                         '\\"properties-override=' + TestUtil.clientServerOptions.replace("--", "") + '\\"')

status = TestUtil.closePipe(verifierPipe)

sys.exit(0)
开发者ID:updowndown,项目名称:myffff,代码行数:32,代码来源:run.py

示例10: open

# 需要导入模块: import IceGridAdmin [as 别名]
# 或者: from IceGridAdmin import iceGridTest [as 别名]
  [ "updated/rootfile", "rootfile-updated!" ],
  [ "updated/dir1/file2", "dummy-file2-updated!"],
  [ "updated/dir2/file3", "dummy-file3"],
  [ "updated/dir2/file4", "dummy-file4"],
]


sys.stdout.write("creating IcePatch2 data directory... ")
sys.stdout.flush()
if not os.path.exists(datadir):
    os.mkdir(datadir)
else:
    IceGridAdmin.cleanDbDir(datadir)

for [file, content] in files:
    file = os.path.join(datadir, file)
    if not os.path.exists(os.path.dirname(file)):
        os.makedirs(os.path.dirname(file))
    f = open(file, 'w')
    f.write(content)
    f.close()

icepatch2Calc(datadir, "original")
icepatch2Calc(datadir, "updated")
print("ok")

IceGridAdmin.iceGridTest("application.xml", "", "server.dir='%s'" % TestUtil.getTestDirectory("server"))

IceGridAdmin.cleanDbDir(datadir)
os.rmdir(datadir)
开发者ID:465060874,项目名称:ice,代码行数:32,代码来源:run.py

示例11: len

# 需要导入模块: import IceGridAdmin [as 别名]
# 或者: from IceGridAdmin import iceGridTest [as 别名]
import os, sys

path = [ ".", "..", "../..", "../../..", "../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
    path = [os.path.join(head, p) for p in path]
path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
if len(path) == 0:
    raise RuntimeError("can't find toplevel directory!")
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil, IceGridAdmin

#
# Don't use a slave registry for this test. This can lead to race
# conditions when resolving endpoints of round-robin replica groups if
# the slave didn't fully load the servers at the time of the client
# invocation
#
IceGridAdmin.nreplicas=0

IceGridAdmin.registryOptions += " --Ice.Plugin.RegistryPlugin=RegistryPlugin:createRegistryPlugin"
IceGridAdmin.registryOptions += " --IceGrid.Registry.DynamicRegistration"


TestUtil.addAdditionalBinDirectories([os.path.join(os.getcwd(), TestUtil.getTestDirectory("registryplugin"))])
TestUtil.addAdditionalBinDirectories([os.path.join(os.getcwd(), TestUtil.getTestDirectory("testservice"))])

IceGridAdmin.iceGridTest("application.xml",
    "--Ice.RetryIntervals=\"0 50 100 250\"", "icebox.exe='%s' server.dir='%s'" % (TestUtil.getIceBox(), TestUtil.getTestDirectory("server")))
开发者ID:BlackHoleJet,项目名称:ice,代码行数:31,代码来源:run.py

示例12: Copyright

# 需要导入模块: import IceGridAdmin [as 别名]
# 或者: from IceGridAdmin import iceGridTest [as 别名]
#!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************

import os, sys

for toplevel in [".", "..", "../..", "../../..", "../../../.."]:
    toplevel = os.path.normpath(toplevel)
    if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")):
        break
else:
    raise "can't find toplevel directory!"

sys.path.append(os.path.join(toplevel, "config"))
import TestUtil
import IceGridAdmin

name = os.path.join("IceGrid", "activation")

IceGridAdmin.iceGridTest(name, "application.xml", "", \
                         ' \\"properties-override=' + TestUtil.clientServerOptions.replace("--", "") + '\\"')
sys.exit(0)
开发者ID:updowndown,项目名称:myffff,代码行数:30,代码来源:run.py

示例13: RuntimeError

# 需要导入模块: import IceGridAdmin [as 别名]
# 或者: from IceGridAdmin import iceGridTest [as 别名]
    raise RuntimeError("can't find toplevel directory!")
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil, IceGridAdmin

os.environ["MY_FOO"] = "12"

if TestUtil.isDarwin():
    #
    # On OS X, make sure to also run the IceBox services in 32bits mode if
    # x64 isn't specified and the service is built for 32bits.
    #
    iceBox = os.path.join(os.getcwd(), "iceboxwrapper")
    iceBoxWrapper = open(iceBox, "w")
    if TestUtil.x64:
        iceBoxWrapper.write("#!/bin/sh\narch -x86_64 " + TestUtil.getIceBox() + " \"[email protected]\"\n")
    else:
        iceBoxWrapper.write("#!/bin/sh\narch -i386 -x86_64 " + TestUtil.getIceBox() + " \"[email protected]\"\n")
    iceBoxWrapper.close()
    os.chmod(iceBox, 0o700)
else:
    iceBox = TestUtil.getIceBox()

IceGridAdmin.iceGridTest("application.xml", '--TestDir="%s"' % os.getcwd(), "icebox.exe='%s'" % iceBox)

# Tests with targets
IceGridAdmin.iceGridTest("application.xml", '-t --TestDir="%s"' % os.getcwd(),
                         "icebox.exe='%s' moreservers moreservices moreproperties" % iceBox)

if TestUtil.isDarwin():
    os.unlink("iceboxwrapper")
开发者ID:2008hatake,项目名称:zeroc-ice,代码行数:32,代码来源:run.py

示例14: len

# 需要导入模块: import IceGridAdmin [as 别名]
# 或者: from IceGridAdmin import iceGridTest [as 别名]
if len(path) == 0:
    raise RuntimeError("can't find toplevel directory!")
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil, IceStormUtil, IceGridAdmin

targets = []
if TestUtil.appverifier:
    targets = [TestUtil.getIceBox()]
    TestUtil.setAppVerifierSettings(targets, cwd = os.getcwd())

#
# Remove IceStorm databases possibly left from SQL run.
#
for filename in [os.path.join("db", f) for f in os.listdir("db") if f.endswith(".db")]:
    os.remove(filename)

variables = "icebox.exe='%s'" % TestUtil.getIceBox()

#
# Don't use a slave registry for this test.
#
IceGridAdmin.nreplicas=0

#
# Test client/server without on demand activation.
#
IceGridAdmin.iceGridTest("application.xml", "", variables)

if TestUtil.appverifier:
    TestUtil.appVerifierAfterTestEnd(targets, cwd = os.getcwd())
开发者ID:pedia,项目名称:zeroc-ice,代码行数:32,代码来源:run.py

示例15: len

# 需要导入模块: import IceGridAdmin [as 别名]
# 或者: from IceGridAdmin import iceGridTest [as 别名]
path = [ ".", "..", "../..", "../../..", "../../../.." ]
head = os.path.dirname(sys.argv[0])
if len(head) > 0:
    path = [os.path.join(head, p) for p in path]
path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
if len(path) == 0:
    raise RuntimeError("can't find toplevel directory!")
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil, IceGridAdmin

name = os.path.join("IceGrid", "noRestartUpdate")

node1Dir = os.path.join(os.getcwd(), "db", "node-1")
if not os.path.exists(node1Dir):
    os.mkdir(node1Dir)
else:
    IceGridAdmin.cleanDbDir(node1Dir)

node2Dir = os.path.join(os.getcwd(), "db", "node-2")
if not os.path.exists(node2Dir):
    os.mkdir(node2Dir)
else:
    IceGridAdmin.cleanDbDir(node2Dir)

nodeOverrideOptions = '--IceBinDir="%s" --TestDir="%s" --NodePropertiesOverride="%s Ice.ServerIdleTime=0 Ice.PrintProcessId=0 Ice.PrintAdapterReady=0"' % (
    TestUtil.getCppBinDir("cpp"),
    os.getcwd(),
    TestUtil.getCommandLine("", TestUtil.DriverConfig("server")).replace("--", ""))

IceGridAdmin.iceGridTest("", nodeOverrideOptions)
开发者ID:Jonavin,项目名称:ice,代码行数:32,代码来源:run.py


注:本文中的IceGridAdmin.iceGridTest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。