summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe George <joe@zeroc.com>2018-04-09 14:45:01 -0400
committerJoe George <joe@zeroc.com>2018-04-09 14:45:01 -0400
commit0a37d62cd9ce62de708f685cfa0fc30058ab83ac (patch)
tree05d42719daf7b3ca0f919406b2f3ac407691ff94
parentFix typo (diff)
downloadice-0a37d62cd9ce62de708f685cfa0fc30058ab83ac.tar.bz2
ice-0a37d62cd9ce62de708f685cfa0fc30058ab83ac.tar.xz
ice-0a37d62cd9ce62de708f685cfa0fc30058ab83ac.zip
ICE-8813 - Skip some IceGrid tests when root user
-rw-r--r--cpp/test/IceGrid/admin/test.py3
-rw-r--r--cpp/test/IceGrid/allocation/test.py3
-rw-r--r--cpp/test/IceGrid/deployer/test.py19
-rw-r--r--cpp/test/IceGrid/distribution/test.py3
-rw-r--r--cpp/test/IceGrid/noRestartUpdate/test.py7
-rw-r--r--cpp/test/IceGrid/replicaGroup/test.py11
-rw-r--r--cpp/test/IceGrid/replication/test.py3
-rw-r--r--cpp/test/IceStorm/repgrid/test.py7
-rw-r--r--scripts/tests/IceGrid/simple.py23
9 files changed, 44 insertions, 35 deletions
diff --git a/cpp/test/IceGrid/admin/test.py b/cpp/test/IceGrid/admin/test.py
index 1da3c5a87f5..7c3c54af2d5 100644
--- a/cpp/test/IceGrid/admin/test.py
+++ b/cpp/test/IceGrid/admin/test.py
@@ -163,4 +163,5 @@ routerProps= lambda process, current: {
'IceSSL.VerifyPeer' : 1
}
-TestSuite(__file__, [ IceGridAdminTestCase() ], multihost=False)
+if os.getuid() != 0:
+ TestSuite(__file__, [ IceGridAdminTestCase() ], multihost=False)
diff --git a/cpp/test/IceGrid/allocation/test.py b/cpp/test/IceGrid/allocation/test.py
index 33326c144b2..5540e4d2d3f 100644
--- a/cpp/test/IceGrid/allocation/test.py
+++ b/cpp/test/IceGrid/allocation/test.py
@@ -8,4 +8,5 @@
#
# **********************************************************************
-TestSuite(__file__, [IceGridTestCase(exevars={ "verifier.dir": "verifier" })], runOnMainThread=True, multihost=False)
+if os.getuid() != 0:
+ TestSuite(__file__, [IceGridTestCase(exevars={ "verifier.dir": "verifier" })], runOnMainThread=True, multihost=False)
diff --git a/cpp/test/IceGrid/deployer/test.py b/cpp/test/IceGrid/deployer/test.py
index 6edccccfa1b..b9447197f04 100644
--- a/cpp/test/IceGrid/deployer/test.py
+++ b/cpp/test/IceGrid/deployer/test.py
@@ -10,12 +10,13 @@
clientProps=lambda process, current: { "TestDir" : current.getBuildDir("server") }
-TestSuite(__file__, [
- IceGridTestCase("without targets",
- icegridnode=IceGridNode(envs={ "MY_FOO" : 12 }),
- client=IceGridClient(props=clientProps)),
- IceGridTestCase("with targets",
- icegridnode=IceGridNode(envs={ "MY_FOO" : 12 }),
- client=IceGridClient(props=clientProps),
- targets=["moreservers", "moreservices", "moreproperties"])
-], libDirs=["testservice"], multihost=False)
+if os.getuid() != 0:
+ TestSuite(__file__, [
+ IceGridTestCase("without targets",
+ icegridnode=IceGridNode(envs={ "MY_FOO" : 12 }),
+ client=IceGridClient(props=clientProps)),
+ IceGridTestCase("with targets",
+ icegridnode=IceGridNode(envs={ "MY_FOO" : 12 }),
+ client=IceGridClient(props=clientProps),
+ targets=["moreservers", "moreservices", "moreproperties"])
+ ], libDirs=["testservice"], multihost=False)
diff --git a/cpp/test/IceGrid/distribution/test.py b/cpp/test/IceGrid/distribution/test.py
index bee8796a4cc..fd9077f3f3b 100644
--- a/cpp/test/IceGrid/distribution/test.py
+++ b/cpp/test/IceGrid/distribution/test.py
@@ -42,4 +42,5 @@ class IceGridDistributionTestCase(IceGridTestCase):
current.writeln("ok")
-TestSuite(__file__, [ IceGridDistributionTestCase() ], runOnMainThread=True, multihost=False)
+if os.getuid() != 0:
+ TestSuite(__file__, [ IceGridDistributionTestCase() ], runOnMainThread=True, multihost=False)
diff --git a/cpp/test/IceGrid/noRestartUpdate/test.py b/cpp/test/IceGrid/noRestartUpdate/test.py
index 0a1bc2530bb..42bae3880b5 100644
--- a/cpp/test/IceGrid/noRestartUpdate/test.py
+++ b/cpp/test/IceGrid/noRestartUpdate/test.py
@@ -21,6 +21,7 @@ clientProps = lambda process, current: {
"ServiceDir" : current.getBuildDir("testservice")
}
-TestSuite(__file__,
- [IceGridNoRestartUpdateTestCase(application=None, client=IceGridClient(props=clientProps))],
- multihost=False)
+if os.getuid() != 0:
+ TestSuite(__file__,
+ [IceGridNoRestartUpdateTestCase(application=None, client=IceGridClient(props=clientProps))],
+ multihost=False)
diff --git a/cpp/test/IceGrid/replicaGroup/test.py b/cpp/test/IceGrid/replicaGroup/test.py
index 9baebe08980..b4f3632b6f7 100644
--- a/cpp/test/IceGrid/replicaGroup/test.py
+++ b/cpp/test/IceGrid/replicaGroup/test.py
@@ -17,8 +17,9 @@ clientProps = {
"Ice.RetryIntervals" : "0 50 100 250"
}
-TestSuite(__file__,
- [IceGridTestCase(icegridregistry=[IceGridRegistryMaster(props=registryProps)],
- client=IceGridClient(props=clientProps))],
- libDirs=["registryplugin", "testservice"],
- multihost=False)
+if os.getuid() != 0:
+ TestSuite(__file__,
+ [IceGridTestCase(icegridregistry=[IceGridRegistryMaster(props=registryProps)],
+ client=IceGridClient(props=clientProps))],
+ libDirs=["registryplugin", "testservice"],
+ multihost=False)
diff --git a/cpp/test/IceGrid/replication/test.py b/cpp/test/IceGrid/replication/test.py
index 5cace6d5ee2..df9a7ce053c 100644
--- a/cpp/test/IceGrid/replication/test.py
+++ b/cpp/test/IceGrid/replication/test.py
@@ -10,4 +10,5 @@
clientProps = lambda process, current: { "ServerDir" : current.getBuildDir("server") }
-TestSuite(__file__, [ IceGridTestCase(client=IceGridClient(props=clientProps)) ], runOnMainThread=True, multihost=False)
+if os.getuid() != 0:
+ TestSuite(__file__, [ IceGridTestCase(client=IceGridClient(props=clientProps)) ], runOnMainThread=True, multihost=False)
diff --git a/cpp/test/IceStorm/repgrid/test.py b/cpp/test/IceStorm/repgrid/test.py
index 99795299d06..291be5cd54b 100644
--- a/cpp/test/IceStorm/repgrid/test.py
+++ b/cpp/test/IceStorm/repgrid/test.py
@@ -8,6 +8,7 @@
#
# **********************************************************************
-TestSuite(__file__, [ IceGridTestCase(icegridregistry=IceGridRegistryMaster(),
- client=IceGridClient()) ],
- runOnMainThread=True, multihost=False)
+if os.getuid() != 0:
+ TestSuite(__file__, [ IceGridTestCase(icegridregistry=IceGridRegistryMaster(),
+ client=IceGridClient()) ],
+ runOnMainThread=True, multihost=False)
diff --git a/scripts/tests/IceGrid/simple.py b/scripts/tests/IceGrid/simple.py
index d17567bfb7c..5b46ed37003 100644
--- a/scripts/tests/IceGrid/simple.py
+++ b/scripts/tests/IceGrid/simple.py
@@ -32,14 +32,15 @@ clientTraceProps = { "IceLocatorDiscovery.Trace.Lookup" : 3 }
outfilters = [ lambda x: re.sub("-! .* warning: .*failed to lookup locator.*\n", "", x),
lambda x: re.sub("^ .*\n", "", x) ]
-TestSuite(__name__, [
- IceGridTestCase("without deployment", application=None,
- icegridregistry=[IceGridRegistryMaster(props=registryProps, traceProps=registryTraceProps),
- IceGridRegistrySlave(1, props=registryProps, traceProps=registryTraceProps),
- IceGridRegistrySlave(2, props=registryProps, traceProps=registryTraceProps)],
- client=ClientServerTestCase(client=IceGridClient(props=clientProps,
- outfilters=outfilters,
- traceProps=clientTraceProps),
- server=IceGridServer(props=serverProps))),
- IceGridTestCase("with deployment", client=IceGridClient(args=["--with-deploy"]))
-], multihost=False)
+if os.getuid() != 0:
+ TestSuite(__name__, [
+ IceGridTestCase("without deployment", application=None,
+ icegridregistry=[IceGridRegistryMaster(props=registryProps, traceProps=registryTraceProps),
+ IceGridRegistrySlave(1, props=registryProps, traceProps=registryTraceProps),
+ IceGridRegistrySlave(2, props=registryProps, traceProps=registryTraceProps)],
+ client=ClientServerTestCase(client=IceGridClient(props=clientProps,
+ outfilters=outfilters,
+ traceProps=clientTraceProps),
+ server=IceGridServer(props=serverProps))),
+ IceGridTestCase("with deployment", client=IceGridClient(args=["--with-deploy"]))
+ ], multihost=False)