summaryrefslogtreecommitdiff
path: root/scripts/TestUtil.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/TestUtil.py')
-rwxr-xr-xscripts/TestUtil.py36
1 files changed, 28 insertions, 8 deletions
diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py
index 202e33d4cca..3737f60b251 100755
--- a/scripts/TestUtil.py
+++ b/scripts/TestUtil.py
@@ -34,6 +34,7 @@ sqlPort = None
sqlUser = None
sqlPassword = None
serviceDir = None
+compact = False
def isCygwin():
# The substring on sys.platform is required because some cygwin
@@ -312,6 +313,7 @@ def run(tests, root = False):
--sql-user=<user> Set SQL user name.
--sql-passwd=<passwd> Set SQL password.
--service-dir=<dir> Where to locate services for builds without service support.
+ --compact Ice for .NET uses the Compact Framework.
"""
sys.exit(2)
@@ -321,7 +323,7 @@ def run(tests, root = False):
"debug", "protocol=", "compress", "valgrind", "host=", "serialize", "continue",
"ipv6", "no-ipv6", "ice-home=", "cross=", "x64", "script", "env", "sql-type=",
"sql-db=", "sql-host=", "sql-port=", "sql-user=", "sql-passwd=", "service-dir=",
- "appverifier"])
+ "appverifier", "compact"])
except getopt.GetoptError:
usage()
@@ -335,6 +337,7 @@ def run(tests, root = False):
arg = ""
script = False
noipv6 = False
+ compact = "--compact" in opts
filters = []
for o, a in opts:
@@ -368,13 +371,17 @@ def run(tests, root = False):
elif o == "--protocol":
if a not in ( "ssl", "tcp"):
usage()
- if mono and getDefaultMapping() == "cs" and a == "ssl":
- print "SSL is not supported with mono"
- sys.exit(1)
+ if getDefaultMapping() == "cs" and a == "ssl":
+ if mono:
+ print "SSL is not supported with mono"
+ sys.exit(1)
+ if compact:
+ print "SSL is not supported with the Compact Framework"
+ sys.exit(1)
if o in ( "--cross", "--protocol", "--host", "--debug", "--compress", "--valgrind", "--serialize", "--ipv6", \
"--ice-home", "--x64", "--env", "--sql-type", "--sql-db", "--sql-host", "--sql-port", "--sql-user", \
- "--sql-passwd", "--service-dir", "--appverifier"):
+ "--sql-passwd", "--service-dir", "--appverifier", "--compact"):
arg += " " + o
if len(a) > 0:
arg += " " + a
@@ -432,7 +439,7 @@ def run(tests, root = False):
expanded.append([ ( "%s/test/%s" % (lang, test), a, []) for test in crossTests if not (test == "Ice/background" and (lang == "cs" or c == "cs"))])
# Add ssl & compress for the operations test.
- if mono and c == "cs": # Don't add the ssl tests for mono.
+ if (compact or mono) and c == "cs": # Don't add the ssl tests.
continue
a = "--cross=%s --protocol=ssl --compress" % c
expanded.append([("%s/test/Ice/operations" % lang, a, [])])
@@ -747,6 +754,7 @@ class DriverConfig:
global sqlUser
global sqlPassword
global serviceDir
+ global compact
self.lang = getDefaultMapping()
self.protocol = protocol
self.compress = compress
@@ -765,6 +773,7 @@ class DriverConfig:
self.sqlUser = sqlUser
self.sqlPassword = sqlPassword
self.serviceDir = serviceDir
+ self.compact = compact
def argsToDict(argumentString, results):
"""Converts an argument string to dictionary"""
@@ -1078,7 +1087,6 @@ def appVerifierAfterTestEnd(targets, cwd=os.getcwd()):
verifier = spawn(cmd, cwd=cwd)
verifier.expect(matchAppVerifierSuccess(), -1)
-
def getMirrorDir(base, mapping):
"""Get the mirror directory for the current test in the given mapping."""
lang = getDefaultMapping()
@@ -1387,6 +1395,7 @@ def processCmdLine():
--sql-user=<user> Set SQL user name.
--sql-passwd=<passwd> Set SQL password.
--service-dir=<dir> Where to locate services for builds without service support.
+ --compact Ice for .NET uses the Compact Framework.
"""
sys.exit(2)
@@ -1394,7 +1403,7 @@ def processCmdLine():
opts, args = getopt.getopt(
sys.argv[1:], "", ["debug", "trace=", "protocol=", "compress", "valgrind", "host=", "serialize", "ipv6", \
"ice-home=", "x64", "cross=", "env", "sql-type=", "sql-db=", "sql-host=", "sql-port=", \
- "sql-user=", "sql-passwd=", "service-dir=", "appverifier"])
+ "sql-user=", "sql-passwd=", "service-dir=", "appverifier", "compact"])
except getopt.GetoptError:
usage()
@@ -1489,6 +1498,9 @@ def processCmdLine():
elif o == "--service-dir":
global serviceDir
serviceDir = a
+ elif o == "--compact":
+ global compact
+ compact = True
if len(args) > 0:
usage()
@@ -1559,6 +1571,14 @@ def runTests(start, expanded, num = 0, script = False):
print "%s*** test not supported with compression%s" % (prefix, suffix)
continue
+ if args.find("compact") != -1 and "nocompact" in config:
+ print "%s*** test not supported with Compact Framework%s" % (prefix, suffix)
+ continue
+
+ if args.find("compact") == -1 and "compact" in config:
+ print "%s*** test requires Compact Framework%s" % (prefix, suffix)
+ continue
+
if isVista() and "novista" in config:
print "%s*** test not supported under Vista%s" % (prefix, suffix)
continue