diff options
Diffstat (limited to 'java/test/Ice/properties/run.py')
-rwxr-xr-x | java/test/Ice/properties/run.py | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/java/test/Ice/properties/run.py b/java/test/Ice/properties/run.py index 22f2a9903a9..92ff1bec700 100755 --- a/java/test/Ice/properties/run.py +++ b/java/test/Ice/properties/run.py @@ -17,25 +17,35 @@ 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 # # Write config # -configPath = u"./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.createConfig(configPath, - ["# Automatically generated by Ice test driver.", - "Ice.Trace.Protocol=1", - "Ice.Trace.Network=1", - "Ice.ProgramName=PropertiesClient", - "Config.Path=./config/中国_client.config"]) - -print "starting client...", +sys.stdout.write("starting client... ") +sys.stdout.flush() clientProc = TestUtil.startClient("test.Ice.properties.Client",startReader=False) -print "ok" +print("ok") clientProc.startReader() clientProc.waitTestSuccess() |