summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/properties/run.py
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/properties/run.py')
-rwxr-xr-xcpp/test/Ice/properties/run.py33
1 files changed, 21 insertions, 12 deletions
diff --git a/cpp/test/Ice/properties/run.py b/cpp/test/Ice/properties/run.py
index 18f78f00db1..e0193967f47 100755
--- a/cpp/test/Ice/properties/run.py
+++ b/cpp/test/Ice/properties/run.py
@@ -17,25 +17,34 @@ 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 "can't find toplevel directory!"
-sys.path.append(os.path.join(path[0]))
-from scripts import *
+ raise RuntimeError("can't find toplevel directory!")
+sys.path.append(os.path.join(path[0], "scripts"))
+import TestUtil
client = os.path.join(os.getcwd(), "client")
#
# Write config
#
-configPath = u"./config/中国_client.config"
-
-TestUtil.createConfig(configPath,
- ["# Automatically generated by Ice test driver.",
- "Ice.Trace.Protocol=1",
- "Ice.Trace.Network=1",
- "Ice.ProgramName=PropertiesClient",
- "Config.Path=./config/中国_client.config"])
+if sys.version_info[0] == 2:
+ configPath = "./config/\xe4\xb8\xad\xe5\x9b\xbd_client.config".decode("utf-8")
+ TestUtil.createConfig(configPath,
+ ["# Automatically generated by Ice test driver.",
+ "Ice.Trace.Protocol=1",
+ "Ice.Trace.Network=1",
+ "Ice.ProgramName=PropertiesClient",
+ "Config.Path=./config/中国_client.config"])
+else:
+ configPath = "./config/\u4e2d\u56fd_client.config"
+ TestUtil.createConfig(configPath,
+ ["# Automatically generated by Ice test driver.",
+ "Ice.Trace.Protocol=1",
+ "Ice.Trace.Network=1",
+ "Ice.ProgramName=PropertiesClient",
+ "Config.Path=" + configPath],
+ "utf-8")
TestUtil.simpleTest(client)
if os.path.exists(configPath):
- os.remove(configPath) \ No newline at end of file
+ os.remove(configPath)