コード例 #1
0
                             r' --Ice.Warn.Dispatch=0' + \
                             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"'
コード例 #2
0
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, IceStormUtil, IceGridAdmin

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


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())
コード例 #3
0
ファイル: run.py プロジェクト: pedia/zeroc-ice
# 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())
コード例 #4
0
#
# **********************************************************************

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.addLdPath(os.getcwd())

serverdir = os.path.join(os.getcwd(), TestUtil.getTestDirectory("server"))
variables = (
    "properties-override='%s' icegridnode.exe='%s' icegridregistry.exe='%s' server.dir='%s'"
    % (IceGridAdmin.iceGridNodePropertiesOverride(), TestUtil.getIceGridNode(),
       TestUtil.getIceGridRegistry(), serverdir))

IceGridAdmin.iceGridTest(
    "application.xml",
    '--IceDir="%s" --ServerDir="%s"' % (TestUtil.toplevel, serverdir),
    variables)
コード例 #5
0
ファイル: run.py プロジェクト: 465060874/ice
# 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"))
コード例 #6
0
    ["original/dir2/file3", "dummy-file3"],
    ["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")

IceGridAdmin.cleanDbDir(datadir)
os.rmdir(datadir)
コード例 #7
0
ファイル: run.py プロジェクト: stick/zeroc-ice
# 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

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() +
                            " \"$@\"\n")
    else:
        iceBoxWrapper.write("#!/bin/sh\narch -i386 -x86_64 " +
                            TestUtil.getIceBox() + " \"$@\"\n")
    iceBoxWrapper.close()
    os.chmod(iceBox, 0o700)
else:
    iceBox = TestUtil.getIceBox()

IceGridAdmin.iceGridTest("application.xml",
                         "--Ice.RetryIntervals=\"0 50 100 250\"",
                         "icebox.exe='%s'" % iceBox)

if TestUtil.isDarwin():
    os.unlink("iceboxwrapper")
コード例 #8
0
ファイル: run.py プロジェクト: sk163/ice-1
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")
コード例 #9
0
ファイル: run.py プロジェクト: 465060874/ice
  [ "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)
コード例 #10
0
ファイル: run.py プロジェクト: chizon/myffff
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", "deployer")
testdir = os.path.join(toplevel, "test", name)

TestUtil.addLdPath(testdir)

iceBox = TestUtil.getIceBox(testdir)

IceGridAdmin.iceGridTest(name, "application.xml", "--TestDir=\"" + testdir + "\"", \
                         '"icebox.exe=' + TestUtil.getIceBox(testdir) + '"')

# Tests with targets
IceGridAdmin.iceGridTest(name, "application.xml", "-t --TestDir=\"" + testdir + "\"", \
                         "icebox.exe=" + TestUtil.getIceBox(testdir) + \
                         " moreservers moreservices moreproperties")

sys.exit(0)
コード例 #11
0
ファイル: run.py プロジェクト: BlackHoleJet/ice
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")))
コード例 #12
0
    ["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)
コード例 #13
0
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"))
コード例 #14
0
ファイル: run.py プロジェクト: zhoushiyi/ice
#
# 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)))
コード例 #15
0
ファイル: run.py プロジェクト: stick/zeroc-ice
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"' %
コード例 #16
0
ファイル: run.py プロジェクト: updowndown/myffff
  [ "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)
コード例 #17
0
ファイル: run.py プロジェクト: zhoushiyi/ice
# **********************************************************************
#
# 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

IceGridAdmin.iceGridTest(
    "application.xml",
    applicationOptions=(
        "properties-override='%s' icegridnode.exe='%s' server.dir='%s'" %
        (IceGridAdmin.iceGridNodePropertiesOverride(),
         TestUtil.getIceGridNode(), TestUtil.getTestDirectory("server"))))
コード例 #18
0
ファイル: run.py プロジェクト: sk163/ice-1
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", "update")

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" ' % (TestUtil.getCppBinDir(), os.getcwd()) + \
    '--NodePropertiesOverride=\"%s Ice.ServerIdleTime=0 Ice.PrintProcessId=0 Ice.PrintAdapterReady=0\"' % \
    IceGridAdmin.iceGridNodePropertiesOverride()

IceGridAdmin.iceGridTest("", nodeOverrideOptions)
コード例 #19
0
ファイル: run.py プロジェクト: pedia/zeroc-ice
#!/usr/bin/env python
# **********************************************************************
#
# 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

IceGridAdmin.iceGridTest("application.xml", "", "properties-override='%s' icegridnode.exe='%s'" % 
	(IceGridAdmin.iceGridNodePropertiesOverride(), TestUtil.getIceGridNode()))
コード例 #20
0
[ "updated/rootfile", "rootfile-updated!" ],
[ "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)
コード例 #21
0
ファイル: run.py プロジェクト: chizon/myffff
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)
コード例 #22
0
#!/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())
コード例 #23
0
ファイル: run.py プロジェクト: 2008hatake/zeroc-ice
#!/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())
コード例 #24
0
ファイル: run.py プロジェクト: Crysty-Yui/ice
    + 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),
コード例 #25
0
#!/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)
コード例 #26
0
ファイル: run.py プロジェクト: 465060874/ice
#!/usr/bin/env python
# **********************************************************************
#
# 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

IceGridAdmin.iceGridTest("application.xml", applicationOptions = "server.dir='%s' verifier.dir='%s'" %
        (TestUtil.getTestDirectory("server"), TestUtil.getTestDirectory("verifier")))
コード例 #27
0
ファイル: run.py プロジェクト: 465060874/ice
#!/usr/bin/env python
# **********************************************************************
#
# 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.addLdPath(os.getcwd())

serverdir = os.path.join(os.getcwd(), TestUtil.getTestDirectory("server"))
variables = ("properties-override='%s' icegridnode.exe='%s' icegridregistry.exe='%s' server.dir='%s'" %
			 (IceGridAdmin.iceGridNodePropertiesOverride(), TestUtil.getIceGridNode(), TestUtil.getIceGridRegistry(), serverdir))

IceGridAdmin.iceGridTest("application.xml", '--IceDir="%s" --ServerDir="%s"' % (TestUtil.toplevel, serverdir),
                         variables)
コード例 #28
0
ファイル: run.py プロジェクト: 2008hatake/zeroc-ice
#!/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")
コード例 #29
0
ファイル: run.py プロジェクト: 2008hatake/zeroc-ice
    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() + " \"$@\"\n")
    else:
        iceBoxWrapper.write("#!/bin/sh\narch -i386 -x86_64 " + TestUtil.getIceBox() + " \"$@\"\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")
コード例 #30
0
ファイル: run.py プロジェクト: stick/zeroc-ice
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.addLdPath(os.getcwd())

if TestUtil.sqlType != None and TestUtil.sqlType != "QSQLITE":
    print("*** This test only supports Freeze or SQLite databases")
    sys.exit(0)

variables = "properties-override='%s'" % IceGridAdmin.iceGridNodePropertiesOverride(
)

if TestUtil.sqlType != None:
    variables += " db-plugin=IceGridSqlDB:createSqlDB"
else:
    variables += " db-plugin=IceGridFreezeDB:createFreezeDB"

IceGridAdmin.iceGridTest(
    "application.xml",
    '--IceDir="%s" --TestDir="%s"' % (TestUtil.toplevel, os.getcwd()),
    variables)
コード例 #31
0
ファイル: run.py プロジェクト: chizon/myffff
# **********************************************************************
#
# 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", "replicaGroup")
testdir = os.path.join(toplevel, "test", name)

TestUtil.addLdPath(testdir)

IceGridAdmin.iceGridTest(name, "application.xml", "--Ice.RetryIntervals=\"0 50 100 250\"", \
                         "icebox.exe=" + TestUtil.getIceBox(testdir))
sys.exit(0)
コード例 #32
0
ファイル: run.py プロジェクト: pedia/zeroc-ice
# 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

TestUtil.addLdPath(os.getcwd())

variables = "properties-override='%s' icegridnode.exe='%s' icegridregistry.exe='%s'" % (
    IceGridAdmin.iceGridNodePropertiesOverride(),
    TestUtil.getIceGridNode(),
    TestUtil.getIceGridRegistry(),
)

IceGridAdmin.iceGridTest(
    "application.xml", '--IceDir="%s" --TestDir="%s"' % (TestUtil.toplevel, os.getcwd()), variables
)
コード例 #33
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")))
コード例 #34
0
ファイル: run.py プロジェクト: pedia/zeroc-ice
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())
コード例 #35
0
ファイル: run.py プロジェクト: Jonavin/ice
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()
コード例 #36
0
ファイル: run.py プロジェクト: bjarnescottlee/ice
# 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")
コード例 #37
0
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() +
                            " \"$@\"\n")
    else:
        iceBoxWrapper.write("#!/bin/sh\narch -i386 -x86_64 " +
                            TestUtil.getIceBox() + " \"$@\"\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")
コード例 #38
0
ファイル: run.py プロジェクト: Jonavin/ice
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)
コード例 #39
0
ファイル: run.py プロジェクト: 465060874/ice
#!/usr/bin/env python
# **********************************************************************
#
# 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

IceGridAdmin.iceGridTest("application.xml",
    applicationOptions = ("properties-override='%s' icegridnode.exe='%s' server.dir='%s'" %
	                     (IceGridAdmin.iceGridNodePropertiesOverride(),
                          TestUtil.getIceGridNode(),
                          TestUtil.getTestDirectory("server"))))