diff options
author | Bernard Normier <bernard@zeroc.com> | 2009-01-23 17:07:21 -0500 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2009-01-23 17:07:21 -0500 |
commit | 2380e089401d048490da23bc6d71e5687bafbe47 (patch) | |
tree | 6d97052d1f93bc2bafcd7fd1a9ebe103544b6cad /py | |
parent | Fixed permissions (diff) | |
parent | 3.3.1 third-party updates (diff) | |
download | ice-2380e089401d048490da23bc6d71e5687bafbe47.tar.bz2 ice-2380e089401d048490da23bc6d71e5687bafbe47.tar.xz ice-2380e089401d048490da23bc6d71e5687bafbe47.zip |
Merge branch 'R3_3_branch' of cvs:/home/git/ice into R3_3_branch
Conflicts:
java/resources/IceGridAdmin/icegridadmin_content_dyn.html
java/resources/IceGridAdmin/icegridadmin_content_static.html
Diffstat (limited to 'py')
252 files changed, 540 insertions, 583 deletions
diff --git a/py/CHANGES b/py/CHANGES index 0708fec7709..f3324cf3189 100644 --- a/py/CHANGES +++ b/py/CHANGES @@ -357,7 +357,7 @@ Changes since version 3.0.1 Changes since version 3.0.0 --------------------------- -- Fixed a bug where Ice plugin command line options were not parsed. +- Fixed a bug where Ice plug-in command line options were not parsed. - Fixed a bug in the Slice parser that caused problems if an included file contained white space in the file name. diff --git a/py/Makefile b/py/Makefile index f217a1784cf..dda8aa9622d 100644 --- a/py/Makefile +++ b/py/Makefile @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/Makefile.mak b/py/Makefile.mak index 679d8afbb30..4d0ef93a2e7 100644 --- a/py/Makefile.mak +++ b/py/Makefile.mak @@ -1,6 +1,6 @@ # **********************************************************************
#
-# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+# Copyright (c) 2003-2009 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.
diff --git a/py/allDemos.py b/py/allDemos.py index b8b3855bdc6..5829ada88a7 100755 --- a/py/allDemos.py +++ b/py/allDemos.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -17,8 +17,8 @@ for toplevel in [".", "..", "../..", "../../..", "../../../.."]: else: raise "can't find toplevel directory!" -sys.path.append(os.path.join(toplevel, "demoscript")) -import Util +sys.path.append(os.path.join(toplevel)) +from demoscript import Util # # List of all basic demos. diff --git a/py/allTests.py b/py/allTests.py index b603ffae41d..d7c78b41dd7 100755 --- a/py/allTests.py +++ b/py/allTests.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -12,13 +12,13 @@ import os, sys, re, getopt for toplevel in [".", "..", "../..", "../../..", "../../../.."]: toplevel = os.path.abspath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): + if os.path.exists(os.path.join(toplevel, "scripts", "TestUtil.py")): break else: raise "can't find toplevel directory!" -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil +sys.path.append(os.path.join(toplevel)) +from scripts import * # # List of all basic tests. diff --git a/py/config/Make.rules b/py/config/Make.rules index 6aeff2a7155..581fb676631 100644 --- a/py/config/Make.rules +++ b/py/config/Make.rules @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/config/Make.rules.Darwin b/py/config/Make.rules.Darwin index 065a0330aa6..3e1a038077c 100644 --- a/py/config/Make.rules.Darwin +++ b/py/config/Make.rules.Darwin @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -12,7 +12,7 @@ # # -# We require Python to be built as a Framework for the IcePy plugin. +# We require Python to be built as a Framework for the IcePy plug-in. # ifneq ($(PYTHON_HOME),) ifeq ($(shell test ! -f $(PYTHON_HOME)/Python && echo 0),0) diff --git a/py/config/Make.rules.mak b/py/config/Make.rules.mak index 74ec825d897..45337d19696 100644 --- a/py/config/Make.rules.mak +++ b/py/config/Make.rules.mak @@ -1,6 +1,6 @@ # **********************************************************************
#
-# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+# Copyright (c) 2003-2009 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.
@@ -41,8 +41,12 @@ PYTHON_HOME = C:\Python25 # is located in a different location.
#
!if "$(CPP_COMPILER)" == "VC60" && "$(STLPORT_HOME)" == ""
+!if "$(THIRDPARTY_HOME)" != ""
+STLPORT_HOME = $(THIRDPARTY_HOME)
+!else
STLPORT_HOME = C:\Ice-$(VERSION)-ThirdParty-VC60
!endif
+!endif
#
# For VC80 and VC80 Express it is necessary to set the location of the
diff --git a/py/demo/Glacier2/callback/Callback.ice b/py/demo/Glacier2/callback/Callback.ice index cf88e72cb89..f6eb62c7fc9 100644 --- a/py/demo/Glacier2/callback/Callback.ice +++ b/py/demo/Glacier2/callback/Callback.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/demo/Glacier2/callback/Client.py b/py/demo/Glacier2/callback/Client.py index 5da3faf35a9..226daff7395 100755 --- a/py/demo/Glacier2/callback/Client.py +++ b/py/demo/Glacier2/callback/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Glacier2/callback/Server.py b/py/demo/Glacier2/callback/Server.py index 14f2241196f..889d71b95c8 100755 --- a/py/demo/Glacier2/callback/Server.py +++ b/py/demo/Glacier2/callback/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Glacier2/callback/SessionServer.py b/py/demo/Glacier2/callback/SessionServer.py index f4e79c5ebe2..0931a8096be 100755 --- a/py/demo/Glacier2/callback/SessionServer.py +++ b/py/demo/Glacier2/callback/SessionServer.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Glacier2/callback/expect.py b/py/demo/Glacier2/callback/expect.py index 1d3bca23f2d..fa2a2c64f20 100755 --- a/py/demo/Glacier2/callback/expect.py +++ b/py/demo/Glacier2/callback/expect.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/async/Client.py b/py/demo/Ice/async/Client.py index 33550214814..00aec3329f9 100755 --- a/py/demo/Ice/async/Client.py +++ b/py/demo/Ice/async/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/async/Hello.ice b/py/demo/Ice/async/Hello.ice index 8eedeac8c76..f3bbe38d5b0 100644 --- a/py/demo/Ice/async/Hello.ice +++ b/py/demo/Ice/async/Hello.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. @@ -19,7 +19,7 @@ exception RequestCanceledException interface Hello { - ["ami", "amd"] void sayHello(int delay) + ["ami", "amd"] idempotent void sayHello(int delay) throws RequestCanceledException; void shutdown(); diff --git a/py/demo/Ice/async/Server.py b/py/demo/Ice/async/Server.py index 94b26b6ae6f..5398c6927df 100755 --- a/py/demo/Ice/async/Server.py +++ b/py/demo/Ice/async/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/async/expect.py b/py/demo/Ice/async/expect.py index d6ea344c3ca..0109de4866f 100755 --- a/py/demo/Ice/async/expect.py +++ b/py/demo/Ice/async/expect.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/bidir/Callback.ice b/py/demo/Ice/bidir/Callback.ice index 27946b05bf5..e3b812b06f6 100644 --- a/py/demo/Ice/bidir/Callback.ice +++ b/py/demo/Ice/bidir/Callback.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/bidir/Client.py b/py/demo/Ice/bidir/Client.py index 916431c60ad..52a96649001 100755 --- a/py/demo/Ice/bidir/Client.py +++ b/py/demo/Ice/bidir/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/bidir/Server.py b/py/demo/Ice/bidir/Server.py index 4d030437966..85611dcad91 100755 --- a/py/demo/Ice/bidir/Server.py +++ b/py/demo/Ice/bidir/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/bidir/expect.py b/py/demo/Ice/bidir/expect.py index 582bfe9e35f..acffb047d30 100755 --- a/py/demo/Ice/bidir/expect.py +++ b/py/demo/Ice/bidir/expect.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/callback/Callback.ice b/py/demo/Ice/callback/Callback.ice index c6c54eea561..464d203ddf9 100644 --- a/py/demo/Ice/callback/Callback.ice +++ b/py/demo/Ice/callback/Callback.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/callback/Client.py b/py/demo/Ice/callback/Client.py index ec81b51ce5f..394ce69ba08 100755 --- a/py/demo/Ice/callback/Client.py +++ b/py/demo/Ice/callback/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/callback/Server.py b/py/demo/Ice/callback/Server.py index 62c06708ded..bc1b3233b95 100755 --- a/py/demo/Ice/callback/Server.py +++ b/py/demo/Ice/callback/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/callback/expect.py b/py/demo/Ice/callback/expect.py index 4f0959657d5..92d0dbd96db 100755 --- a/py/demo/Ice/callback/expect.py +++ b/py/demo/Ice/callback/expect.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/converter/Client.py b/py/demo/Ice/converter/Client.py index c05f8f31ec8..94030f2322e 100755 --- a/py/demo/Ice/converter/Client.py +++ b/py/demo/Ice/converter/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -97,7 +97,7 @@ try: communicator1 = Ice.initialize(sys.argv, initData) # - # Clear plugin, so no converter + # Clear plug-in, so no converter # initData.properties.setProperty("Ice.Plugin.StringConverter", "") communicator2 = Ice.initialize(sys.argv, initData) diff --git a/py/demo/Ice/converter/Greet.ice b/py/demo/Ice/converter/Greet.ice index 174faa5e1c2..888baa2cbf9 100644 --- a/py/demo/Ice/converter/Greet.ice +++ b/py/demo/Ice/converter/Greet.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/converter/README b/py/demo/Ice/converter/README index a008b1b9d39..c07047da017 100644 --- a/py/demo/Ice/converter/README +++ b/py/demo/Ice/converter/README @@ -1,4 +1,4 @@ -This demo illustrates how to use a string converter plugin with Ice +This demo illustrates how to use a string converter plug-in with Ice for Python. In this demo, the client represents an application that uses ISO-Latin-1 as its character set, while the server uses UTF-8. diff --git a/py/demo/Ice/converter/Server.py b/py/demo/Ice/converter/Server.py index 88f6d9fb9a2..f3b101c1b0c 100755 --- a/py/demo/Ice/converter/Server.py +++ b/py/demo/Ice/converter/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/converter/expect.py b/py/demo/Ice/converter/expect.py index 0900123a7a5..ca2c5c5bb9d 100755 --- a/py/demo/Ice/converter/expect.py +++ b/py/demo/Ice/converter/expect.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/hello/Client.py b/py/demo/Ice/hello/Client.py index d7c60aecc24..7a2b657770c 100755 --- a/py/demo/Ice/hello/Client.py +++ b/py/demo/Ice/hello/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/hello/Hello.ice b/py/demo/Ice/hello/Hello.ice index 11b714f01c8..bcaed6ad877 100644 --- a/py/demo/Ice/hello/Hello.ice +++ b/py/demo/Ice/hello/Hello.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. @@ -15,7 +15,7 @@ module Demo interface Hello { - ["cpp:const"] idempotent void sayHello(int delay); + idempotent void sayHello(int delay); void shutdown(); }; diff --git a/py/demo/Ice/hello/Server.py b/py/demo/Ice/hello/Server.py index 47e7a070736..c88afa82718 100755 --- a/py/demo/Ice/hello/Server.py +++ b/py/demo/Ice/hello/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/hello/expect.py b/py/demo/Ice/hello/expect.py index faa492cf983..2939ab8f224 100755 --- a/py/demo/Ice/hello/expect.py +++ b/py/demo/Ice/hello/expect.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -22,9 +22,9 @@ sys.path.append(path[0]) from demoscript import * from demoscript.Ice import hello -server = Util.spawn('Server.py --Ice.PrintAdapterReady') +server = Util.spawn('Server.py --Ice.PrintAdapterReady --Ice.Warn.Connections=0') server.expect('.* ready') -client = Util.spawn('Client.py') +client = Util.spawn('Client.py --Ice.Warn.Connections=0') client.expect('.*==>') hello.run(client, server) diff --git a/py/demo/Ice/latency/Client.py b/py/demo/Ice/latency/Client.py index 070ae035460..91f5baff3b9 100755 --- a/py/demo/Ice/latency/Client.py +++ b/py/demo/Ice/latency/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/latency/Latency.ice b/py/demo/Ice/latency/Latency.ice index 3a6bdad87ce..d4d6c02743f 100644 --- a/py/demo/Ice/latency/Latency.ice +++ b/py/demo/Ice/latency/Latency.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/latency/Server.py b/py/demo/Ice/latency/Server.py index 7573dc6ab3a..d32991814f8 100755 --- a/py/demo/Ice/latency/Server.py +++ b/py/demo/Ice/latency/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/latency/expect.py b/py/demo/Ice/latency/expect.py index d1f542d1255..a95504f4330 100755 --- a/py/demo/Ice/latency/expect.py +++ b/py/demo/Ice/latency/expect.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/minimal/Client.py b/py/demo/Ice/minimal/Client.py index ed67bb276e6..d1b45a84a13 100755 --- a/py/demo/Ice/minimal/Client.py +++ b/py/demo/Ice/minimal/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/minimal/Hello.ice b/py/demo/Ice/minimal/Hello.ice index 71cff05a221..6cd2473fc45 100644 --- a/py/demo/Ice/minimal/Hello.ice +++ b/py/demo/Ice/minimal/Hello.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/minimal/Server.py b/py/demo/Ice/minimal/Server.py index d5aaea47dd7..bb0ea18eb3d 100755 --- a/py/demo/Ice/minimal/Server.py +++ b/py/demo/Ice/minimal/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/minimal/expect.py b/py/demo/Ice/minimal/expect.py index c61b791ec61..99a91e242f2 100755 --- a/py/demo/Ice/minimal/expect.py +++ b/py/demo/Ice/minimal/expect.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/session/Client.py b/py/demo/Ice/session/Client.py index 102d5fcf9b3..3e154e2a14d 100755 --- a/py/demo/Ice/session/Client.py +++ b/py/demo/Ice/session/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/session/Server.py b/py/demo/Ice/session/Server.py index 3d0c916b86f..853835d5782 100755 --- a/py/demo/Ice/session/Server.py +++ b/py/demo/Ice/session/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/session/Session.ice b/py/demo/Ice/session/Session.ice index 1ef9d6ece54..dc1ca46fb15 100644 --- a/py/demo/Ice/session/Session.ice +++ b/py/demo/Ice/session/Session.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/session/expect.py b/py/demo/Ice/session/expect.py index 93dd93fd8db..2c956bf3829 100755 --- a/py/demo/Ice/session/expect.py +++ b/py/demo/Ice/session/expect.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/throughput/Client.py b/py/demo/Ice/throughput/Client.py index 9a557757b40..11ff6f922ea 100755 --- a/py/demo/Ice/throughput/Client.py +++ b/py/demo/Ice/throughput/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/throughput/Server.py b/py/demo/Ice/throughput/Server.py index 8986a632358..2565fb9c905 100755 --- a/py/demo/Ice/throughput/Server.py +++ b/py/demo/Ice/throughput/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/throughput/Throughput.ice b/py/demo/Ice/throughput/Throughput.ice index 9fd7decd49d..f61512e4e7a 100644 --- a/py/demo/Ice/throughput/Throughput.ice +++ b/py/demo/Ice/throughput/Throughput.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/throughput/expect.py b/py/demo/Ice/throughput/expect.py index f3d199c74cc..c1da9f34a28 100755 --- a/py/demo/Ice/throughput/expect.py +++ b/py/demo/Ice/throughput/expect.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/value/Client.py b/py/demo/Ice/value/Client.py index 94ac920ac85..e5b89c773da 100755 --- a/py/demo/Ice/value/Client.py +++ b/py/demo/Ice/value/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/value/Printer.py b/py/demo/Ice/value/Printer.py index 68c6c2c647a..bd92c647c2c 100755 --- a/py/demo/Ice/value/Printer.py +++ b/py/demo/Ice/value/Printer.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/value/Server.py b/py/demo/Ice/value/Server.py index cd4e4e160bd..4c0a366a77c 100755 --- a/py/demo/Ice/value/Server.py +++ b/py/demo/Ice/value/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/Ice/value/Value.ice b/py/demo/Ice/value/Value.ice index aa35ff3c6da..fe8aefd3e22 100644 --- a/py/demo/Ice/value/Value.ice +++ b/py/demo/Ice/value/Value.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. @@ -35,7 +35,7 @@ exception DerivedPrinterException DerivedPrinter derived; }; -class Initial +interface Initial { Simple getSimple(); void getPrinter(out Printer impl, out Printer* proxy); diff --git a/py/demo/Ice/value/expect.py b/py/demo/Ice/value/expect.py index 5c2908e19ce..a9e3cd4d229 100755 --- a/py/demo/Ice/value/expect.py +++ b/py/demo/Ice/value/expect.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/IceGrid/simple/Client.py b/py/demo/IceGrid/simple/Client.py index a85d79fb303..2a07ef82471 100755 --- a/py/demo/IceGrid/simple/Client.py +++ b/py/demo/IceGrid/simple/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/IceGrid/simple/Hello.ice b/py/demo/IceGrid/simple/Hello.ice index b30e06e02fc..4b123a06908 100644 --- a/py/demo/IceGrid/simple/Hello.ice +++ b/py/demo/IceGrid/simple/Hello.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/demo/IceGrid/simple/Server.py b/py/demo/IceGrid/simple/Server.py index 55f93a09378..4760a35a8ba 100755 --- a/py/demo/IceGrid/simple/Server.py +++ b/py/demo/IceGrid/simple/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/IceGrid/simple/application.xml b/py/demo/IceGrid/simple/application.xml index 8f5bc098ef2..281b1a49a72 100644 --- a/py/demo/IceGrid/simple/application.xml +++ b/py/demo/IceGrid/simple/application.xml @@ -1,7 +1,7 @@ <!-- ********************************************************************** - Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. + Copyright (c) 2003-2009 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. diff --git a/py/demo/IceGrid/simple/application_with_replication.xml b/py/demo/IceGrid/simple/application_with_replication.xml index 1dde092b862..e22cbda3090 100644 --- a/py/demo/IceGrid/simple/application_with_replication.xml +++ b/py/demo/IceGrid/simple/application_with_replication.xml @@ -1,7 +1,7 @@ <!-- ********************************************************************** - Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. + Copyright (c) 2003-2009 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. diff --git a/py/demo/IceGrid/simple/application_with_template.xml b/py/demo/IceGrid/simple/application_with_template.xml index f01f5e10141..a4020d11d47 100644 --- a/py/demo/IceGrid/simple/application_with_template.xml +++ b/py/demo/IceGrid/simple/application_with_template.xml @@ -1,7 +1,7 @@ <!-- ********************************************************************** - Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. + Copyright (c) 2003-2009 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. diff --git a/py/demo/IceGrid/simple/expect.py b/py/demo/IceGrid/simple/expect.py index d957ff598b6..b93a7e1b115 100755 --- a/py/demo/IceGrid/simple/expect.py +++ b/py/demo/IceGrid/simple/expect.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/IceStorm/clock/Clock.ice b/py/demo/IceStorm/clock/Clock.ice index 284e39a1630..d4a526884cf 100644 --- a/py/demo/IceStorm/clock/Clock.ice +++ b/py/demo/IceStorm/clock/Clock.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/demo/IceStorm/clock/Publisher.py b/py/demo/IceStorm/clock/Publisher.py index 131476c52e2..f1d5eb67d8d 100755 --- a/py/demo/IceStorm/clock/Publisher.py +++ b/py/demo/IceStorm/clock/Publisher.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/IceStorm/clock/Subscriber.py b/py/demo/IceStorm/clock/Subscriber.py index 3a9d283ade4..568469020db 100755 --- a/py/demo/IceStorm/clock/Subscriber.py +++ b/py/demo/IceStorm/clock/Subscriber.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/IceStorm/clock/expect.py b/py/demo/IceStorm/clock/expect.py index 75e81d4be1e..1879ee50131 100755 --- a/py/demo/IceStorm/clock/expect.py +++ b/py/demo/IceStorm/clock/expect.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/book/printer/Client.py b/py/demo/book/printer/Client.py index f7eb87d372b..12cae4f6c1c 100755 --- a/py/demo/book/printer/Client.py +++ b/py/demo/book/printer/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/book/printer/Printer.ice b/py/demo/book/printer/Printer.ice index 3034d48d42e..f48d35d699f 100644 --- a/py/demo/book/printer/Printer.ice +++ b/py/demo/book/printer/Printer.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/demo/book/printer/Server.py b/py/demo/book/printer/Server.py index 6106adfa732..78a3728d1e1 100755 --- a/py/demo/book/printer/Server.py +++ b/py/demo/book/printer/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/book/printer/expect.py b/py/demo/book/printer/expect.py index a058bf62d47..5d8c1b27d7e 100755 --- a/py/demo/book/printer/expect.py +++ b/py/demo/book/printer/expect.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/book/simple_filesystem/Client.py b/py/demo/book/simple_filesystem/Client.py index e43544e2c69..d0442c64262 100755 --- a/py/demo/book/simple_filesystem/Client.py +++ b/py/demo/book/simple_filesystem/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/book/simple_filesystem/Filesystem.ice b/py/demo/book/simple_filesystem/Filesystem.ice index 9a828640802..0cf8dcc7b1b 100644 --- a/py/demo/book/simple_filesystem/Filesystem.ice +++ b/py/demo/book/simple_filesystem/Filesystem.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/demo/book/simple_filesystem/Server.py b/py/demo/book/simple_filesystem/Server.py index feccab79534..ea408b2fbbd 100755 --- a/py/demo/book/simple_filesystem/Server.py +++ b/py/demo/book/simple_filesystem/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/demo/book/simple_filesystem/expect.py b/py/demo/book/simple_filesystem/expect.py index 4bafe575e4b..af83e24e622 100755 --- a/py/demo/book/simple_filesystem/expect.py +++ b/py/demo/book/simple_filesystem/expect.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/makebindist.py b/py/makebindist.py index 287157c598f..8ff686047cd 100755 --- a/py/makebindist.py +++ b/py/makebindist.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Communicator.cpp b/py/modules/IcePy/Communicator.cpp index a8267dae0a0..223cfcde993 100644 --- a/py/modules/IcePy/Communicator.cpp +++ b/py/modules/IcePy/Communicator.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. @@ -183,7 +183,7 @@ communicatorInit(CommunicatorObject* self, PyObject* args, PyObject* /*kwds*/) // // Remaining command line options are passed to the communicator - // as an argument vector in case they contain plugin properties. + // as an argument vector in case they contain plug-in properties. // int argc = static_cast<int>(seq.size()); char** argv = new char*[argc + 1]; @@ -453,6 +453,10 @@ communicatorStringToProxy(CommunicatorObject* self, PyObject* args) try { proxy = (*self->communicator)->stringToProxy(str); + if(proxy) + { + return createProxy(proxy, *self->communicator); + } } catch(const Ice::Exception& ex) { @@ -460,7 +464,8 @@ communicatorStringToProxy(CommunicatorObject* self, PyObject* args) return 0; } - return createProxy(proxy, *self->communicator); + Py_INCREF(Py_None); + return Py_None; } #ifdef WIN32 @@ -515,6 +520,10 @@ communicatorPropertyToProxy(CommunicatorObject* self, PyObject* args) try { proxy = (*self->communicator)->propertyToProxy(str); + if(proxy) + { + return createProxy(proxy, *self->communicator); + } } catch(const Ice::Exception& ex) { @@ -522,7 +531,8 @@ communicatorPropertyToProxy(CommunicatorObject* self, PyObject* args) return 0; } - return createProxy(proxy, *self->communicator); + Py_INCREF(Py_None); + return Py_None; } #ifdef WIN32 @@ -857,7 +867,8 @@ communicatorGetImplicitContext(CommunicatorObject* self) if(implicitContext == 0) { - return 0; + Py_INCREF(Py_None); + return Py_None; } return createImplicitContext(implicitContext); diff --git a/py/modules/IcePy/Communicator.h b/py/modules/IcePy/Communicator.h index 41ed55df5b6..39765660071 100644 --- a/py/modules/IcePy/Communicator.h +++ b/py/modules/IcePy/Communicator.h @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Config.h b/py/modules/IcePy/Config.h index 962d72ecbb3..c316f0a0b81 100644 --- a/py/modules/IcePy/Config.h +++ b/py/modules/IcePy/Config.h @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Connection.cpp b/py/modules/IcePy/Connection.cpp index 3d6ddf0f1e8..3bf3e761639 100644 --- a/py/modules/IcePy/Connection.cpp +++ b/py/modules/IcePy/Connection.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Connection.h b/py/modules/IcePy/Connection.h index daf47d9af2e..6ed5ed112a8 100644 --- a/py/modules/IcePy/Connection.h +++ b/py/modules/IcePy/Connection.h @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Current.cpp b/py/modules/IcePy/Current.cpp index 455c17f6e5e..3d5b8159a47 100644 --- a/py/modules/IcePy/Current.cpp +++ b/py/modules/IcePy/Current.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Current.h b/py/modules/IcePy/Current.h index 89f63d11805..a8292c87fcb 100644 --- a/py/modules/IcePy/Current.h +++ b/py/modules/IcePy/Current.h @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/ImplicitContext.cpp b/py/modules/IcePy/ImplicitContext.cpp index a06d56ecea8..114ffeeeeb8 100644 --- a/py/modules/IcePy/ImplicitContext.cpp +++ b/py/modules/IcePy/ImplicitContext.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/ImplicitContext.h b/py/modules/IcePy/ImplicitContext.h index d251a92f0d9..e678b9422fb 100644 --- a/py/modules/IcePy/ImplicitContext.h +++ b/py/modules/IcePy/ImplicitContext.h @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Init.cpp b/py/modules/IcePy/Init.cpp index 78578402fe5..2fb191f7d8b 100644 --- a/py/modules/IcePy/Init.cpp +++ b/py/modules/IcePy/Init.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Logger.cpp b/py/modules/IcePy/Logger.cpp index 0fd41e46cd3..ff556c3cd29 100644 --- a/py/modules/IcePy/Logger.cpp +++ b/py/modules/IcePy/Logger.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Logger.h b/py/modules/IcePy/Logger.h index 224dcc6be97..9e69f5dcab7 100644 --- a/py/modules/IcePy/Logger.h +++ b/py/modules/IcePy/Logger.h @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Makefile b/py/modules/IcePy/Makefile index 71792595c7f..b6425902a36 100644 --- a/py/modules/IcePy/Makefile +++ b/py/modules/IcePy/Makefile @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Makefile.mak b/py/modules/IcePy/Makefile.mak index 726fc475f9a..4fbb4b28c50 100644 --- a/py/modules/IcePy/Makefile.mak +++ b/py/modules/IcePy/Makefile.mak @@ -1,6 +1,6 @@ # **********************************************************************
#
-# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+# Copyright (c) 2003-2009 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.
diff --git a/py/modules/IcePy/ObjectAdapter.cpp b/py/modules/IcePy/ObjectAdapter.cpp index 22b4258b81e..efd8b2164b2 100644 --- a/py/modules/IcePy/ObjectAdapter.cpp +++ b/py/modules/IcePy/ObjectAdapter.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/ObjectAdapter.h b/py/modules/IcePy/ObjectAdapter.h index cde8024035d..32b582fc3ae 100644 --- a/py/modules/IcePy/ObjectAdapter.h +++ b/py/modules/IcePy/ObjectAdapter.h @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/ObjectFactory.cpp b/py/modules/IcePy/ObjectFactory.cpp index 9f5043fc5ab..cfc87158368 100644 --- a/py/modules/IcePy/ObjectFactory.cpp +++ b/py/modules/IcePy/ObjectFactory.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/ObjectFactory.h b/py/modules/IcePy/ObjectFactory.h index d335a53ac5c..b4c2c6348c0 100644 --- a/py/modules/IcePy/ObjectFactory.h +++ b/py/modules/IcePy/ObjectFactory.h @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Operation.cpp b/py/modules/IcePy/Operation.cpp index a112e6273d9..9dfaf051504 100644 --- a/py/modules/IcePy/Operation.cpp +++ b/py/modules/IcePy/Operation.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. @@ -1127,8 +1127,15 @@ IcePy::SyncTypedInvocation::invoke(PyObject* args) else { PyObject* ret = PyTuple_GET_ITEM(results.get(), 0); - Py_INCREF(ret); - return ret; + if(!ret) + { + return 0; + } + else + { + Py_INCREF(ret); + return ret; + } } } } diff --git a/py/modules/IcePy/Operation.h b/py/modules/IcePy/Operation.h index c2cddc86be1..89a78c1f568 100644 --- a/py/modules/IcePy/Operation.h +++ b/py/modules/IcePy/Operation.h @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Properties.cpp b/py/modules/IcePy/Properties.cpp index 8f237a242c9..64fc441b8b8 100644 --- a/py/modules/IcePy/Properties.cpp +++ b/py/modules/IcePy/Properties.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Properties.h b/py/modules/IcePy/Properties.h index 13e2ae3d9fa..40651693fc6 100644 --- a/py/modules/IcePy/Properties.h +++ b/py/modules/IcePy/Properties.h @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Proxy.cpp b/py/modules/IcePy/Proxy.cpp index 451ed2ab2b2..40128d8756d 100644 --- a/py/modules/IcePy/Proxy.cpp +++ b/py/modules/IcePy/Proxy.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. @@ -2152,6 +2152,8 @@ IcePy::initProxy(PyObject* module) PyObject* IcePy::createProxy(const Ice::ObjectPrx& proxy, const Ice::CommunicatorPtr& communicator, PyObject* type) { + assert(proxy); + if(!type) { PyTypeObject* proxyType = &ProxyType; // Necessary to prevent GCC's strict-alias warnings. diff --git a/py/modules/IcePy/Proxy.h b/py/modules/IcePy/Proxy.h index b82bba36cda..0d79395f2c0 100644 --- a/py/modules/IcePy/Proxy.h +++ b/py/modules/IcePy/Proxy.h @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Slice.cpp b/py/modules/IcePy/Slice.cpp index 51d9067b97f..119fb3030c3 100644 --- a/py/modules/IcePy/Slice.cpp +++ b/py/modules/IcePy/Slice.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Slice.h b/py/modules/IcePy/Slice.h index cde2a45cd89..c6d091f762d 100644 --- a/py/modules/IcePy/Slice.h +++ b/py/modules/IcePy/Slice.h @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/ThreadNotification.cpp b/py/modules/IcePy/ThreadNotification.cpp index 2f8bf48aa43..e07d2882d81 100644 --- a/py/modules/IcePy/ThreadNotification.cpp +++ b/py/modules/IcePy/ThreadNotification.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/ThreadNotification.h b/py/modules/IcePy/ThreadNotification.h index 68de40ee085..466e7dbdc53 100644 --- a/py/modules/IcePy/ThreadNotification.h +++ b/py/modules/IcePy/ThreadNotification.h @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Types.cpp b/py/modules/IcePy/Types.cpp index 42294cfee75..8acbde2cea8 100644 --- a/py/modules/IcePy/Types.cpp +++ b/py/modules/IcePy/Types.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Types.h b/py/modules/IcePy/Types.h index 2dfa9aceabc..d10284f9506 100644 --- a/py/modules/IcePy/Types.h +++ b/py/modules/IcePy/Types.h @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Util.cpp b/py/modules/IcePy/Util.cpp index c73fa60afbc..08d294c660e 100644 --- a/py/modules/IcePy/Util.cpp +++ b/py/modules/IcePy/Util.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/IcePy/Util.h b/py/modules/IcePy/Util.h index 9ffe0ba1510..a0fab491dbf 100644 --- a/py/modules/IcePy/Util.h +++ b/py/modules/IcePy/Util.h @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/modules/Makefile b/py/modules/Makefile index 6a74363710f..0c62606d87e 100644 --- a/py/modules/Makefile +++ b/py/modules/Makefile @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/modules/Makefile.mak b/py/modules/Makefile.mak index 58f52befacb..e0ba93ec69f 100644 --- a/py/modules/Makefile.mak +++ b/py/modules/Makefile.mak @@ -1,6 +1,6 @@ # **********************************************************************
#
-# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+# Copyright (c) 2003-2009 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.
diff --git a/py/python/Ice.py b/py/python/Ice.py index 1682b85b302..864315974f1 100644 --- a/py/python/Ice.py +++ b/py/python/Ice.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -13,20 +13,6 @@ Ice module import sys, exceptions, string, imp, os, threading, warnings, datetime -try: - import dl - # - # This is necessary for proper operation of Ice plug-ins. - # Without it, RTTI problems can occur. - # - sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL) -except ImportError: - # If the dl module is not available and we're running on a linux - # platform, use the hard coded value of RTLD_NOW|RTLD_GLOBAL. - if sys.platform.startswith("linux"): - sys.setdlopenflags(258) - pass - # # Import the Python extension. # @@ -302,7 +288,11 @@ class CommunicatorI(Communicator): return self._impl.getDefaultContext() def getImplicitContext(self): - return ImplicitContextI(self._impl.getImplicitContext()) + context = self._impl.getImplicitContext() + if context == None: + return None; + else: + return ImplicitContextI(context) def getProperties(self): properties = self._impl.getProperties() diff --git a/py/python/Makefile b/py/python/Makefile index 8f25055b161..3ed5c933f99 100644 --- a/py/python/Makefile +++ b/py/python/Makefile @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/python/Makefile.mak b/py/python/Makefile.mak index c940fa12fea..997549c0cc0 100644 --- a/py/python/Makefile.mak +++ b/py/python/Makefile.mak @@ -1,6 +1,6 @@ # **********************************************************************
#
-# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+# Copyright (c) 2003-2009 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.
diff --git a/py/test/Ice/adapterDeactivation/AllTests.py b/py/test/Ice/adapterDeactivation/AllTests.py index af5446614c2..1ce76ebc10f 100644 --- a/py/test/Ice/adapterDeactivation/AllTests.py +++ b/py/test/Ice/adapterDeactivation/AllTests.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/adapterDeactivation/Client.py b/py/test/Ice/adapterDeactivation/Client.py index 1abcd543953..330d8b9da35 100755 --- a/py/test/Ice/adapterDeactivation/Client.py +++ b/py/test/Ice/adapterDeactivation/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/adapterDeactivation/Collocated.py b/py/test/Ice/adapterDeactivation/Collocated.py index fa8e650c8c2..398be7dce3a 100755 --- a/py/test/Ice/adapterDeactivation/Collocated.py +++ b/py/test/Ice/adapterDeactivation/Collocated.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/adapterDeactivation/Server.py b/py/test/Ice/adapterDeactivation/Server.py index 563c4bfd2eb..ed1d17c1ae2 100755 --- a/py/test/Ice/adapterDeactivation/Server.py +++ b/py/test/Ice/adapterDeactivation/Server.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/adapterDeactivation/Test.ice b/py/test/Ice/adapterDeactivation/Test.ice index f2d31eb2a9f..d8ad4c7f1f2 100644 --- a/py/test/Ice/adapterDeactivation/Test.ice +++ b/py/test/Ice/adapterDeactivation/Test.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/adapterDeactivation/TestI.py b/py/test/Ice/adapterDeactivation/TestI.py index 11979d0661b..2dbcc64c55d 100644 --- a/py/test/Ice/adapterDeactivation/TestI.py +++ b/py/test/Ice/adapterDeactivation/TestI.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/adapterDeactivation/run.py b/py/test/Ice/adapterDeactivation/run.py index a094c546746..545214a74c7 100755 --- a/py/test/Ice/adapterDeactivation/run.py +++ b/py/test/Ice/adapterDeactivation/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -10,19 +10,15 @@ import os, sys -for toplevel in [".", "..", "../..", "../../..", "../../../..", "../../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +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 "can't find toplevel directory!" +sys.path.append(os.path.join(path[0])) +from scripts import * -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "adapterDeactivation") - -TestUtil.clientServerTest(name) -TestUtil.collocatedTest(name) -sys.exit(0) +TestUtil.clientServerTest() +TestUtil.collocatedTest() diff --git a/py/test/Ice/application/Client.py b/py/test/Ice/application/Client.py index 6dcef0664bc..f932bf7bdb9 100755 --- a/py/test/Ice/application/Client.py +++ b/py/test/Ice/application/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/binding/AllTests.py b/py/test/Ice/binding/AllTests.py index fb55a3127c9..f206fa7b9ed 100644 --- a/py/test/Ice/binding/AllTests.py +++ b/py/test/Ice/binding/AllTests.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/binding/Client.py b/py/test/Ice/binding/Client.py index 3ddbb1cf5d1..b806752c0ea 100755 --- a/py/test/Ice/binding/Client.py +++ b/py/test/Ice/binding/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/binding/Server.py b/py/test/Ice/binding/Server.py index 412d5c18eb8..58ccfe49715 100755 --- a/py/test/Ice/binding/Server.py +++ b/py/test/Ice/binding/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/binding/Test.ice b/py/test/Ice/binding/Test.ice index 5baef2fb7d4..40783e4535c 100644 --- a/py/test/Ice/binding/Test.ice +++ b/py/test/Ice/binding/Test.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/binding/TestI.py b/py/test/Ice/binding/TestI.py index e08afd40714..a67b8f9e911 100644 --- a/py/test/Ice/binding/TestI.py +++ b/py/test/Ice/binding/TestI.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/binding/run.py b/py/test/Ice/binding/run.py index a0304394366..bb34e7d35b7 100755 --- a/py/test/Ice/binding/run.py +++ b/py/test/Ice/binding/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -10,23 +10,14 @@ import os, sys -for toplevel in [".", "..", "../..", "../../..", "../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +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 "can't find toplevel directory!" +sys.path.append(os.path.join(path[0])) +from scripts import * -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "binding") - -# -# Need to use mixedClientServerTest instead of clientServerTest, because the -# server makes an invocation on a local object and therefore requires the -# client-side SSL configuration. -# -TestUtil.mixedClientServerTest(name) -sys.exit(0) +TestUtil.clientServerTest() diff --git a/py/test/Ice/blobject/Client.py b/py/test/Ice/blobject/Client.py index 33fd79c3f94..306b510102b 100755 --- a/py/test/Ice/blobject/Client.py +++ b/py/test/Ice/blobject/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/blobject/RouterI.py b/py/test/Ice/blobject/RouterI.py index 018dfd4b1c3..38ed8fb1f3f 100644 --- a/py/test/Ice/blobject/RouterI.py +++ b/py/test/Ice/blobject/RouterI.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/blobject/Server.py b/py/test/Ice/blobject/Server.py index 2db1fb2ea7b..e6f7c58bbe2 100755 --- a/py/test/Ice/blobject/Server.py +++ b/py/test/Ice/blobject/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/blobject/Test.ice b/py/test/Ice/blobject/Test.ice index 84f1ade5e32..dfec8b71a63 100644 --- a/py/test/Ice/blobject/Test.ice +++ b/py/test/Ice/blobject/Test.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/blobject/run.py b/py/test/Ice/blobject/run.py index aac96096db2..03898f6ba88 100755 --- a/py/test/Ice/blobject/run.py +++ b/py/test/Ice/blobject/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -15,18 +15,14 @@ if sys.version_info[1] == 3 and sys.platform != 'darwin': print "Test skipped due to python 2.3" sys.exit(0) -for toplevel in [".", "..", "../..", "../../..", "../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +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 "can't find toplevel directory!" +sys.path.append(os.path.join(path[0])) +from scripts import * -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "blobject") - -TestUtil.clientServerTest(name) -sys.exit(0) +TestUtil.clientServerTest() diff --git a/py/test/Ice/checksum/AllTests.py b/py/test/Ice/checksum/AllTests.py index 72de71616e9..08ca0071bec 100644 --- a/py/test/Ice/checksum/AllTests.py +++ b/py/test/Ice/checksum/AllTests.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/checksum/CTypes.ice b/py/test/Ice/checksum/CTypes.ice index ea5e644a755..f9f05a43e4c 100644 --- a/py/test/Ice/checksum/CTypes.ice +++ b/py/test/Ice/checksum/CTypes.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/checksum/Client.py b/py/test/Ice/checksum/Client.py index 11b4d7f38cb..42fbb2d4d5a 100755 --- a/py/test/Ice/checksum/Client.py +++ b/py/test/Ice/checksum/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/checksum/STypes.ice b/py/test/Ice/checksum/STypes.ice index 84e581c360d..241bb1659c6 100644 --- a/py/test/Ice/checksum/STypes.ice +++ b/py/test/Ice/checksum/STypes.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/checksum/Server.py b/py/test/Ice/checksum/Server.py index 36f1f490d45..91bb564f59a 100755 --- a/py/test/Ice/checksum/Server.py +++ b/py/test/Ice/checksum/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/checksum/Test.ice b/py/test/Ice/checksum/Test.ice index 24e8f7c957b..cf9b2a4d554 100644 --- a/py/test/Ice/checksum/Test.ice +++ b/py/test/Ice/checksum/Test.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/checksum/run.py b/py/test/Ice/checksum/run.py index 65fc9c9621b..bb34e7d35b7 100755 --- a/py/test/Ice/checksum/run.py +++ b/py/test/Ice/checksum/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -10,18 +10,14 @@ import os, sys -for toplevel in [".", "..", "../..", "../../..", "../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +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 "can't find toplevel directory!" +sys.path.append(os.path.join(path[0])) +from scripts import * -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "checksum") - -TestUtil.clientServerTest(name) -sys.exit(0) +TestUtil.clientServerTest() diff --git a/py/test/Ice/custom/AllTests.py b/py/test/Ice/custom/AllTests.py index 6cf5eba9184..57b4d6369ed 100644 --- a/py/test/Ice/custom/AllTests.py +++ b/py/test/Ice/custom/AllTests.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/custom/Client.py b/py/test/Ice/custom/Client.py index 34f5c7f822c..9a2c5accadf 100755 --- a/py/test/Ice/custom/Client.py +++ b/py/test/Ice/custom/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/custom/Server.py b/py/test/Ice/custom/Server.py index 7c74dcf52a6..718cb7df415 100755 --- a/py/test/Ice/custom/Server.py +++ b/py/test/Ice/custom/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/custom/Test.ice b/py/test/Ice/custom/Test.ice index 7960dcb3fc1..6c259d0ee69 100644 --- a/py/test/Ice/custom/Test.ice +++ b/py/test/Ice/custom/Test.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/custom/run.py b/py/test/Ice/custom/run.py index c22501a2c9b..bb34e7d35b7 100755 --- a/py/test/Ice/custom/run.py +++ b/py/test/Ice/custom/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -10,18 +10,14 @@ import os, sys -for toplevel in [".", "..", "../..", "../../..", "../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +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 "can't find toplevel directory!" +sys.path.append(os.path.join(path[0])) +from scripts import * -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "custom") - -TestUtil.clientServerTest(name) -sys.exit(0) +TestUtil.clientServerTest() diff --git a/py/test/Ice/exceptions/AllTests.py b/py/test/Ice/exceptions/AllTests.py index 535771b3481..5e241a2761a 100644 --- a/py/test/Ice/exceptions/AllTests.py +++ b/py/test/Ice/exceptions/AllTests.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/exceptions/Client.py b/py/test/Ice/exceptions/Client.py index 775d7a06658..5c009466e11 100755 --- a/py/test/Ice/exceptions/Client.py +++ b/py/test/Ice/exceptions/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/exceptions/Collocated.py b/py/test/Ice/exceptions/Collocated.py index 773e9e57927..5b873dd9ce8 100755 --- a/py/test/Ice/exceptions/Collocated.py +++ b/py/test/Ice/exceptions/Collocated.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/exceptions/Server.py b/py/test/Ice/exceptions/Server.py index 32892b87638..b1d5c499bc0 100755 --- a/py/test/Ice/exceptions/Server.py +++ b/py/test/Ice/exceptions/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/exceptions/ServerAMD.py b/py/test/Ice/exceptions/ServerAMD.py index ef7d3f42bef..3eaa1dfa327 100755 --- a/py/test/Ice/exceptions/ServerAMD.py +++ b/py/test/Ice/exceptions/ServerAMD.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/exceptions/Test.ice b/py/test/Ice/exceptions/Test.ice index 6dabee04667..37f9b6fb8ae 100644 --- a/py/test/Ice/exceptions/Test.ice +++ b/py/test/Ice/exceptions/Test.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/exceptions/TestAMD.ice b/py/test/Ice/exceptions/TestAMD.ice index fdf46b0ae5e..c5520cdf66a 100644 --- a/py/test/Ice/exceptions/TestAMD.ice +++ b/py/test/Ice/exceptions/TestAMD.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/exceptions/TestI.py b/py/test/Ice/exceptions/TestI.py index bd064a9222a..08953a39bd5 100644 --- a/py/test/Ice/exceptions/TestI.py +++ b/py/test/Ice/exceptions/TestI.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/exceptions/run.py b/py/test/Ice/exceptions/run.py index f5153ac8666..cbcf10f321e 100755 --- a/py/test/Ice/exceptions/run.py +++ b/py/test/Ice/exceptions/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -10,23 +10,19 @@ import os, sys -for toplevel in [".", "..", "../..", "../../..", "../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +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 "can't find toplevel directory!" - -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "exceptions") +sys.path.append(os.path.join(path[0])) +from scripts import * print "tests with regular server." -TestUtil.clientServerTest(name) +TestUtil.clientServerTest() print "tests with AMD server." -TestUtil.clientServerTestWithOptionsAndNames(name, "", "", "ServerAMD.py", "Client.py") +TestUtil.clientServerTest(server="ServerAMD.py") print "tests with collocated server." -TestUtil.collocatedTest(name) -sys.exit(0) +TestUtil.collocatedTest() diff --git a/py/test/Ice/facets/AllTests.py b/py/test/Ice/facets/AllTests.py index 7de4af6358d..78a665e2687 100644 --- a/py/test/Ice/facets/AllTests.py +++ b/py/test/Ice/facets/AllTests.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/facets/Client.py b/py/test/Ice/facets/Client.py index 5245c80d072..f018f00295a 100755 --- a/py/test/Ice/facets/Client.py +++ b/py/test/Ice/facets/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/facets/Collocated.py b/py/test/Ice/facets/Collocated.py index d91bf2acebc..1bcb1fb959f 100755 --- a/py/test/Ice/facets/Collocated.py +++ b/py/test/Ice/facets/Collocated.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/facets/Server.py b/py/test/Ice/facets/Server.py index 2d7c49b7c2c..f2aa1777029 100755 --- a/py/test/Ice/facets/Server.py +++ b/py/test/Ice/facets/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/facets/Test.ice b/py/test/Ice/facets/Test.ice index d02ab6c8503..8d3739dac91 100644 --- a/py/test/Ice/facets/Test.ice +++ b/py/test/Ice/facets/Test.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/facets/TestI.py b/py/test/Ice/facets/TestI.py index 8f3db9e2a1e..d787e9a6a3c 100644 --- a/py/test/Ice/facets/TestI.py +++ b/py/test/Ice/facets/TestI.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/facets/run.py b/py/test/Ice/facets/run.py index b3afa6aeb5f..545214a74c7 100755 --- a/py/test/Ice/facets/run.py +++ b/py/test/Ice/facets/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -10,19 +10,15 @@ import os, sys -for toplevel in [".", "..", "../..", "../../..", "../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +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 "can't find toplevel directory!" +sys.path.append(os.path.join(path[0])) +from scripts import * -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "facets") - -TestUtil.clientServerTest(name) -TestUtil.collocatedTest(name) -sys.exit(0) +TestUtil.clientServerTest() +TestUtil.collocatedTest() diff --git a/py/test/Ice/faultTolerance/AllTests.py b/py/test/Ice/faultTolerance/AllTests.py index 57defa3e6c2..1c8d7dfc021 100644 --- a/py/test/Ice/faultTolerance/AllTests.py +++ b/py/test/Ice/faultTolerance/AllTests.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/faultTolerance/Client.py b/py/test/Ice/faultTolerance/Client.py index 1e71c934eea..29dbc5cd025 100755 --- a/py/test/Ice/faultTolerance/Client.py +++ b/py/test/Ice/faultTolerance/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/faultTolerance/Server.py b/py/test/Ice/faultTolerance/Server.py index 5d6b01c5ae0..d9c22820ef5 100755 --- a/py/test/Ice/faultTolerance/Server.py +++ b/py/test/Ice/faultTolerance/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/faultTolerance/Test.ice b/py/test/Ice/faultTolerance/Test.ice index 2b22a369bb5..fc1881aaf43 100644 --- a/py/test/Ice/faultTolerance/Test.ice +++ b/py/test/Ice/faultTolerance/Test.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/faultTolerance/run.py b/py/test/Ice/faultTolerance/run.py index 5191ac0b503..a7d9403143f 100755 --- a/py/test/Ice/faultTolerance/run.py +++ b/py/test/Ice/faultTolerance/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -10,50 +10,36 @@ import os, sys -for toplevel in [".", "..", "../..", "../../..", "../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +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 "can't find toplevel directory!" +sys.path.append(os.path.join(path[0])) +from scripts import * -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "faultTolerance") -testdir = os.path.join(toplevel, "py", "test", name) - -cwd = os.getcwd() -os.chdir(testdir) - -server = "Server.py" -client = "Client.py" +server = os.path.join(os.getcwd(), "Server.py") +client = os.path.join(os.getcwd(), "Client.py") num = 12 base = 12340 +serverProc = [] for i in range(0, num): print "starting server #%d..." % (i + 1), sys.stdout.flush() - serverPipe = TestUtil.startServer(server, "%d" % (base + i)) - TestUtil.getServerPid(serverPipe) - TestUtil.getAdapterReady(serverPipe) + serverProc.append(TestUtil.startServer(server, "%d" % (base + i))) print "ok" ports = "" for i in range(0, num): ports = "%s %d" % (ports, base + i) print "starting client...", -clientPipe = TestUtil.startClient(client, ports) +clientProc = TestUtil.startClient(client, ports) print "ok" -TestUtil.printOutputFromPipe(clientPipe) -clientStatus = TestUtil.closePipe(clientPipe) -if clientStatus: - TestUtil.killServers() - -if clientStatus or TestUtil.serverStatus(): - sys.exit(1) - -sys.exit(0) +clientProc.waitTestSuccess() +for p in serverProc: + p.waitTestSuccess() diff --git a/py/test/Ice/inheritance/AllTests.py b/py/test/Ice/inheritance/AllTests.py index 0f31d177869..ccf6f35e645 100644 --- a/py/test/Ice/inheritance/AllTests.py +++ b/py/test/Ice/inheritance/AllTests.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/inheritance/Client.py b/py/test/Ice/inheritance/Client.py index 2ea77ac8141..289b2e7339b 100755 --- a/py/test/Ice/inheritance/Client.py +++ b/py/test/Ice/inheritance/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/inheritance/Collocated.py b/py/test/Ice/inheritance/Collocated.py index 647807b8fb5..2b4a4e5d614 100755 --- a/py/test/Ice/inheritance/Collocated.py +++ b/py/test/Ice/inheritance/Collocated.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/inheritance/Server.py b/py/test/Ice/inheritance/Server.py index b02542b73b5..2c1c4290591 100755 --- a/py/test/Ice/inheritance/Server.py +++ b/py/test/Ice/inheritance/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/inheritance/Test.ice b/py/test/Ice/inheritance/Test.ice index 47289592a2d..116d652defd 100644 --- a/py/test/Ice/inheritance/Test.ice +++ b/py/test/Ice/inheritance/Test.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/inheritance/TestI.py b/py/test/Ice/inheritance/TestI.py index f0472fdc1ed..57987efef8f 100644 --- a/py/test/Ice/inheritance/TestI.py +++ b/py/test/Ice/inheritance/TestI.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/inheritance/run.py b/py/test/Ice/inheritance/run.py index 7ecff0e5ae5..545214a74c7 100755 --- a/py/test/Ice/inheritance/run.py +++ b/py/test/Ice/inheritance/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -10,19 +10,15 @@ import os, sys -for toplevel in [".", "..", "../..", "../../..", "../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +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 "can't find toplevel directory!" +sys.path.append(os.path.join(path[0])) +from scripts import * -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "inheritance") - -TestUtil.clientServerTest(name) -TestUtil.collocatedTest(name) -sys.exit(0) +TestUtil.clientServerTest() +TestUtil.collocatedTest() diff --git a/py/test/Ice/location/AllTests.py b/py/test/Ice/location/AllTests.py index 37de5f96f37..7f7d4ee8724 100644 --- a/py/test/Ice/location/AllTests.py +++ b/py/test/Ice/location/AllTests.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/location/Client.py b/py/test/Ice/location/Client.py index ae305aa3c48..9e12066bed6 100755 --- a/py/test/Ice/location/Client.py +++ b/py/test/Ice/location/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/location/Server.py b/py/test/Ice/location/Server.py index 7b76f74d9f0..ebcbd95df2d 100755 --- a/py/test/Ice/location/Server.py +++ b/py/test/Ice/location/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -19,17 +19,25 @@ if not slice_dir: Ice.loadSlice('-I' + slice_dir + ' Test.ice') import Test -class ServerLocatorRegistry(Ice.LocatorRegistry): +class ServerLocatorRegistry(Test.TestLocatorRegistry): def __init__(self): self._adapters = {} self._objects = {} def setAdapterDirectProxy_async(self, cb, adapter, obj, current=None): - self._adapters[adapter] = obj + if obj: + self._adapters[adapter] = obj + else: + self._adapters.pop(adapter) cb.ice_response() def setReplicatedAdapterDirectProxy_async(self, cb, adapter, replica, obj, current=None): - self._adapters[adapter] = obj + if obj: + self._adapters[adapter] = obj + self._adapters[replica] = obj + else: + self._adapters.pop(adapter) + self._adapters.pop(replica) cb.ice_response() def setServerProcessProxy_async(self, id, proxy, current=None): @@ -48,21 +56,27 @@ class ServerLocatorRegistry(Ice.LocatorRegistry): raise Ice.ObjectNotFoundException() return self._objects[id] -class ServerLocator(Ice.Locator): +class ServerLocator(Test.TestLocator): def __init__(self, registry, registryPrx): self._registry = registry self._registryPrx = registryPrx + self._requestCount = 0 def findObjectById_async(self, response, id, current=None): + self._requestCount += 1 response.ice_response(self._registry.getObject(id)) def findAdapterById_async(self, response, id, current=None): + self._requestCount += 1 response.ice_response(self._registry.getAdapter(id)) def getRegistry(self, current=None): return self._registryPrx + def getRequestCount(self, current=None): + return self._requestCount + class ServerManagerI(Test.ServerManager): def __init__(self, adapter, registry, initData): self._adapter = adapter @@ -71,6 +85,7 @@ class ServerManagerI(Test.ServerManager): self._initData = initData self._initData.properties.setProperty("TestAdapter.Endpoints", "default") self._initData.properties.setProperty("TestAdapter.AdapterId", "TestAdapter") + self._initData.properties.setProperty("TestAdapter.ReplicaGroupId", "ReplicatedAdapter") self._initData.properties.setProperty("TestAdapter2.Endpoints", "default") self._initData.properties.setProperty("TestAdapter2.AdapterId", "TestAdapter2") @@ -97,6 +112,7 @@ class ServerManagerI(Test.ServerManager): object = TestI(adapter, adapter2, self._registry) self._registry.addObject(adapter.add(object, communicator.stringToIdentity("test"))) self._registry.addObject(adapter.add(object, communicator.stringToIdentity("test2"))) + adapter.add(object, communicator.stringToIdentity("test3")) adapter.activate() adapter2.activate() @@ -121,6 +137,9 @@ class TestI(Test.TestIntf): self._adapter1.getCommunicator().shutdown() def getHello(self, current=None): + return Test.HelloPrx.uncheckedCast(self._adapter1.createIndirectProxy(communicator.stringToIdentity("hello"))) + + def getReplicatedHello(self, current=None): return Test.HelloPrx.uncheckedCast(self._adapter1.createProxy(communicator.stringToIdentity("hello"))) def migrateHello(self, current=None): diff --git a/py/test/Ice/location/Test.ice b/py/test/Ice/location/Test.ice index b0203fbe492..ff667e4a8b1 100644 --- a/py/test/Ice/location/Test.ice +++ b/py/test/Ice/location/Test.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. @@ -23,6 +23,14 @@ interface TestLocatorRegistry extends ::Ice::LocatorRegistry void addObject(Object* obj); }; +interface TestLocator extends ::Ice::Locator +{ + // + // Returns the number of request on the locator interface. + // + ["cpp:const"] idempotent int getRequestCount(); +}; + interface ServerManager { void startServer(); @@ -40,6 +48,8 @@ interface TestIntf Hello* getHello(); + Hello* getReplicatedHello(); + void migrateHello(); }; diff --git a/py/test/Ice/location/run.py b/py/test/Ice/location/run.py index 177ebe2fb41..bb34e7d35b7 100755 --- a/py/test/Ice/location/run.py +++ b/py/test/Ice/location/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -10,18 +10,14 @@ import os, sys -for toplevel in [".", "..", "../..", "../../..", "../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +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 "can't find toplevel directory!" +sys.path.append(os.path.join(path[0])) +from scripts import * -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "location") - -TestUtil.mixedClientServerTest(name) -sys.exit(0) +TestUtil.clientServerTest() diff --git a/py/test/Ice/objects/AllTests.py b/py/test/Ice/objects/AllTests.py index ff524c3ea73..0b6812fd949 100644 --- a/py/test/Ice/objects/AllTests.py +++ b/py/test/Ice/objects/AllTests.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/objects/Client.py b/py/test/Ice/objects/Client.py index f5fb5b7b5e9..60ff1b53657 100755 --- a/py/test/Ice/objects/Client.py +++ b/py/test/Ice/objects/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/objects/ClientPrivate.ice b/py/test/Ice/objects/ClientPrivate.ice index 9134abbc82d..6ade678b824 100644 --- a/py/test/Ice/objects/ClientPrivate.ice +++ b/py/test/Ice/objects/ClientPrivate.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/objects/Collocated.py b/py/test/Ice/objects/Collocated.py index 7067f40b2db..0aa2dd2ae8e 100755 --- a/py/test/Ice/objects/Collocated.py +++ b/py/test/Ice/objects/Collocated.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/objects/Server.py b/py/test/Ice/objects/Server.py index 4f7577f9e5f..26a577f1ba7 100755 --- a/py/test/Ice/objects/Server.py +++ b/py/test/Ice/objects/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/objects/ServerPrivate.ice b/py/test/Ice/objects/ServerPrivate.ice index 4ef470132f0..eb866af01e7 100644 --- a/py/test/Ice/objects/ServerPrivate.ice +++ b/py/test/Ice/objects/ServerPrivate.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/objects/Test.ice b/py/test/Ice/objects/Test.ice index 70f3b3ef2f9..2bef5327e31 100644 --- a/py/test/Ice/objects/Test.ice +++ b/py/test/Ice/objects/Test.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/objects/TestI.py b/py/test/Ice/objects/TestI.py index 26e783e1ebb..900268aa7e8 100644 --- a/py/test/Ice/objects/TestI.py +++ b/py/test/Ice/objects/TestI.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/objects/run.py b/py/test/Ice/objects/run.py index 81b178ba4f4..545214a74c7 100755 --- a/py/test/Ice/objects/run.py +++ b/py/test/Ice/objects/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -10,19 +10,15 @@ import os, sys -for toplevel in [".", "..", "../..", "../../..", "../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +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 "can't find toplevel directory!" +sys.path.append(os.path.join(path[0])) +from scripts import * -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "objects") - -TestUtil.clientServerTest(name) -TestUtil.collocatedTest(name) -sys.exit(0) +TestUtil.clientServerTest() +TestUtil.collocatedTest() diff --git a/py/test/Ice/operations/AllTests.py b/py/test/Ice/operations/AllTests.py index 5484f648511..83858d730c1 100644 --- a/py/test/Ice/operations/AllTests.py +++ b/py/test/Ice/operations/AllTests.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/operations/BatchOneways.py b/py/test/Ice/operations/BatchOneways.py index 42465d165ac..684336cd8fb 100644 --- a/py/test/Ice/operations/BatchOneways.py +++ b/py/test/Ice/operations/BatchOneways.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/operations/Client.py b/py/test/Ice/operations/Client.py index e4a3fd608f4..9eb16c8a65a 100755 --- a/py/test/Ice/operations/Client.py +++ b/py/test/Ice/operations/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -9,6 +9,7 @@ # ********************************************************************** import os, sys, traceback +import Ice import Ice slice_dir = Ice.getSliceDir() diff --git a/py/test/Ice/operations/Collocated.py b/py/test/Ice/operations/Collocated.py index 92df3f66ed5..0b23a944a8b 100755 --- a/py/test/Ice/operations/Collocated.py +++ b/py/test/Ice/operations/Collocated.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/operations/Oneways.py b/py/test/Ice/operations/Oneways.py index beadb6f101e..1e93586e11e 100644 --- a/py/test/Ice/operations/Oneways.py +++ b/py/test/Ice/operations/Oneways.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/operations/OnewaysAMI.py b/py/test/Ice/operations/OnewaysAMI.py index a2c84747039..51940dea864 100644 --- a/py/test/Ice/operations/OnewaysAMI.py +++ b/py/test/Ice/operations/OnewaysAMI.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/operations/Server.py b/py/test/Ice/operations/Server.py index a29df353b22..ecee3f2cf27 100755 --- a/py/test/Ice/operations/Server.py +++ b/py/test/Ice/operations/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/operations/ServerAMD.py b/py/test/Ice/operations/ServerAMD.py index b1510246cc3..a7d09dfe07f 100755 --- a/py/test/Ice/operations/ServerAMD.py +++ b/py/test/Ice/operations/ServerAMD.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -30,22 +30,27 @@ class Thread_opVoid(threading.Thread): class MyDerivedClassI(Test.MyDerivedClass): def __init__(self): self.opVoidThread = None + self.opVoidThreadLock = threading.Lock() def shutdown_async(self, cb, current=None): + self.opVoidThreadLock.acquire() if self.opVoidThread: self.opVoidThread.join() self.opVoidThread = None + self.opVoidThreadLock.release() current.adapter.getCommunicator().shutdown() cb.ice_response() def opVoid_async(self, cb, current=None): + self.opVoidThreadLock.acquire() if self.opVoidThread: self.opVoidThread.join() self.opVoidThread = None self.opVoidThread = Thread_opVoid(cb) self.opVoidThread.start() + self.opVoidThreadLock.release() def opByte_async(self, cb, p1, p2, current=None): cb.ice_response(p1, p1 ^ p2) diff --git a/py/test/Ice/operations/Test.ice b/py/test/Ice/operations/Test.ice index 79c2c7bb887..4fc80b45195 100644 --- a/py/test/Ice/operations/Test.ice +++ b/py/test/Ice/operations/Test.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/operations/TestAMD.ice b/py/test/Ice/operations/TestAMD.ice index 90951508f75..fcfd8e27c3b 100644 --- a/py/test/Ice/operations/TestAMD.ice +++ b/py/test/Ice/operations/TestAMD.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/operations/TestI.py b/py/test/Ice/operations/TestI.py index d98c441930b..ee595ba8532 100644 --- a/py/test/Ice/operations/TestI.py +++ b/py/test/Ice/operations/TestI.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/operations/Twoways.py b/py/test/Ice/operations/Twoways.py index eb2d15ac16a..5ae6a98b5f8 100644 --- a/py/test/Ice/operations/Twoways.py +++ b/py/test/Ice/operations/Twoways.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/operations/TwowaysAMI.py b/py/test/Ice/operations/TwowaysAMI.py index 95c323ddc29..e0ceac2fddf 100644 --- a/py/test/Ice/operations/TwowaysAMI.py +++ b/py/test/Ice/operations/TwowaysAMI.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/operations/run.py b/py/test/Ice/operations/run.py index 39ed6740919..8356ffd9740 100755 --- a/py/test/Ice/operations/run.py +++ b/py/test/Ice/operations/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -10,23 +10,19 @@ import os, sys -for toplevel in [".", "..", "../..", "../../..", "../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +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 "can't find toplevel directory!" - -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "operations") +sys.path.append(os.path.join(path[0])) +from scripts import * print "tests with regular server." -TestUtil.clientServerTest(name) +TestUtil.clientServerTest() print "tests with AMD server." -TestUtil.clientServerTestWithOptionsAndNames(name, "", "", "ServerAMD.py", "Client.py") +TestUtil.clientServerTest(server="ServerAMD.py") print "tests with collocated server." -TestUtil.collocatedTestWithOptions(name, " --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0") -sys.exit(0) +TestUtil.collocatedTest(" --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0") diff --git a/py/test/Ice/proxy/AllTests.py b/py/test/Ice/proxy/AllTests.py index 6bbd93beec1..e5b03b4a9e7 100644 --- a/py/test/Ice/proxy/AllTests.py +++ b/py/test/Ice/proxy/AllTests.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -15,6 +15,15 @@ def test(b): def allTests(communicator, collocated): print "testing stringToProxy...", + + # + # Test nil proxies. + # + p = communicator.stringToProxy('') + test(p == None) + p = communicator.propertyToProxy('bogus') + test(p == None) + ref = "test:default -p 12010 -t 10000" base = communicator.stringToProxy(ref) test(base) diff --git a/py/test/Ice/proxy/Client.py b/py/test/Ice/proxy/Client.py index d3493a01eca..916e444decd 100755 --- a/py/test/Ice/proxy/Client.py +++ b/py/test/Ice/proxy/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/proxy/Collocated.py b/py/test/Ice/proxy/Collocated.py index 92df3f66ed5..0b23a944a8b 100755 --- a/py/test/Ice/proxy/Collocated.py +++ b/py/test/Ice/proxy/Collocated.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/proxy/Server.py b/py/test/Ice/proxy/Server.py index d953a8cd44e..170fcd80184 100755 --- a/py/test/Ice/proxy/Server.py +++ b/py/test/Ice/proxy/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/proxy/ServerAMD.py b/py/test/Ice/proxy/ServerAMD.py index 8247a527a06..e50f5c63332 100755 --- a/py/test/Ice/proxy/ServerAMD.py +++ b/py/test/Ice/proxy/ServerAMD.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/proxy/Test.ice b/py/test/Ice/proxy/Test.ice index 61b6b6d06b7..90db7303858 100644 --- a/py/test/Ice/proxy/Test.ice +++ b/py/test/Ice/proxy/Test.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/proxy/TestAMD.ice b/py/test/Ice/proxy/TestAMD.ice index 2b85bd8b961..12b39fc4028 100644 --- a/py/test/Ice/proxy/TestAMD.ice +++ b/py/test/Ice/proxy/TestAMD.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/proxy/TestI.py b/py/test/Ice/proxy/TestI.py index 1aaa2f3f327..043d9d78ab9 100644 --- a/py/test/Ice/proxy/TestI.py +++ b/py/test/Ice/proxy/TestI.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/proxy/run.py b/py/test/Ice/proxy/run.py index 2aa17f08bd3..8356ffd9740 100755 --- a/py/test/Ice/proxy/run.py +++ b/py/test/Ice/proxy/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -10,23 +10,19 @@ import os, sys -for toplevel in [".", "..", "../..", "../../..", "../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +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 "can't find toplevel directory!" - -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "proxy") +sys.path.append(os.path.join(path[0])) +from scripts import * print "tests with regular server." -TestUtil.clientServerTest(name) +TestUtil.clientServerTest() print "tests with AMD server." -TestUtil.clientServerTestWithOptionsAndNames(name, "", "", "ServerAMD.py", "Client.py") +TestUtil.clientServerTest(server="ServerAMD.py") print "tests with collocated server." -TestUtil.collocatedTestWithOptions(name, " --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0") -sys.exit(0) +TestUtil.collocatedTest(" --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0") diff --git a/py/test/Ice/retry/AllTests.py b/py/test/Ice/retry/AllTests.py index 50b53846887..63f329149b5 100644 --- a/py/test/Ice/retry/AllTests.py +++ b/py/test/Ice/retry/AllTests.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/retry/Client.py b/py/test/Ice/retry/Client.py index d55ec75dbe7..082a48c4ce3 100755 --- a/py/test/Ice/retry/Client.py +++ b/py/test/Ice/retry/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/retry/Server.py b/py/test/Ice/retry/Server.py index 4ad4a4a03c1..ad977b666d5 100755 --- a/py/test/Ice/retry/Server.py +++ b/py/test/Ice/retry/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/retry/Test.ice b/py/test/Ice/retry/Test.ice index c82abeb80eb..6a48fa388a3 100644 --- a/py/test/Ice/retry/Test.ice +++ b/py/test/Ice/retry/Test.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/retry/TestI.py b/py/test/Ice/retry/TestI.py index 27ae297b07e..6be18a74f2c 100644 --- a/py/test/Ice/retry/TestI.py +++ b/py/test/Ice/retry/TestI.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/retry/run.py b/py/test/Ice/retry/run.py index f0bc8d57120..bb34e7d35b7 100755 --- a/py/test/Ice/retry/run.py +++ b/py/test/Ice/retry/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -10,18 +10,14 @@ import os, sys -for toplevel in [".", "..", "../..", "../../..", "../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +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 "can't find toplevel directory!" +sys.path.append(os.path.join(path[0])) +from scripts import * -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "retry") - -TestUtil.clientServerTest(name) -sys.exit(0) +TestUtil.clientServerTest() diff --git a/py/test/Ice/servantLocator/AllTests.py b/py/test/Ice/servantLocator/AllTests.py index afbbc65d7c2..212c879f2fe 100644 --- a/py/test/Ice/servantLocator/AllTests.py +++ b/py/test/Ice/servantLocator/AllTests.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/servantLocator/Client.py b/py/test/Ice/servantLocator/Client.py index cf17c8437bd..974a3e01371 100755 --- a/py/test/Ice/servantLocator/Client.py +++ b/py/test/Ice/servantLocator/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/servantLocator/Collocated.py b/py/test/Ice/servantLocator/Collocated.py index 5d4a6455f28..014d8dac39a 100755 --- a/py/test/Ice/servantLocator/Collocated.py +++ b/py/test/Ice/servantLocator/Collocated.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/servantLocator/Server.py b/py/test/Ice/servantLocator/Server.py index 54989423a63..ad1108f64ae 100755 --- a/py/test/Ice/servantLocator/Server.py +++ b/py/test/Ice/servantLocator/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/servantLocator/ServerAMD.py b/py/test/Ice/servantLocator/ServerAMD.py index 5e3ba8c5035..3767c1f9579 100755 --- a/py/test/Ice/servantLocator/ServerAMD.py +++ b/py/test/Ice/servantLocator/ServerAMD.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/servantLocator/Test.ice b/py/test/Ice/servantLocator/Test.ice index f2c4a366c5a..0c9b0d3af51 100644 --- a/py/test/Ice/servantLocator/Test.ice +++ b/py/test/Ice/servantLocator/Test.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/servantLocator/TestAMD.ice b/py/test/Ice/servantLocator/TestAMD.ice index 4f951f07867..809b2fa8f6d 100644 --- a/py/test/Ice/servantLocator/TestAMD.ice +++ b/py/test/Ice/servantLocator/TestAMD.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/servantLocator/TestAMDI.py b/py/test/Ice/servantLocator/TestAMDI.py index bafa9782301..4227bdf0460 100644 --- a/py/test/Ice/servantLocator/TestAMDI.py +++ b/py/test/Ice/servantLocator/TestAMDI.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/servantLocator/TestI.py b/py/test/Ice/servantLocator/TestI.py index 76fc4ad6f7f..eee6e60e8e4 100644 --- a/py/test/Ice/servantLocator/TestI.py +++ b/py/test/Ice/servantLocator/TestI.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/servantLocator/run.py b/py/test/Ice/servantLocator/run.py index d8d4a2e1c73..8356ffd9740 100755 --- a/py/test/Ice/servantLocator/run.py +++ b/py/test/Ice/servantLocator/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -10,23 +10,19 @@ import os, sys -for toplevel in [".", "..", "../..", "../../..", "../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +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 "can't find toplevel directory!" - -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "servantLocator") +sys.path.append(os.path.join(path[0])) +from scripts import * print "tests with regular server." -TestUtil.clientServerTest(name) +TestUtil.clientServerTest() print "tests with AMD server." -TestUtil.clientServerTestWithOptionsAndNames(name, "", "", "ServerAMD.py", "Client.py") +TestUtil.clientServerTest(server="ServerAMD.py") print "tests with collocated server." -TestUtil.collocatedTestWithOptions(name, " --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0") -sys.exit(0) +TestUtil.collocatedTest(" --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0") diff --git a/py/test/Ice/slicing/exceptions/AllTests.py b/py/test/Ice/slicing/exceptions/AllTests.py index 7db32ee1b08..09bd5ab9443 100644 --- a/py/test/Ice/slicing/exceptions/AllTests.py +++ b/py/test/Ice/slicing/exceptions/AllTests.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/slicing/exceptions/Client.py b/py/test/Ice/slicing/exceptions/Client.py index d274b4f4a83..0d53200031f 100755 --- a/py/test/Ice/slicing/exceptions/Client.py +++ b/py/test/Ice/slicing/exceptions/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/slicing/exceptions/Server.py b/py/test/Ice/slicing/exceptions/Server.py index 97623902213..87a7e954c1b 100755 --- a/py/test/Ice/slicing/exceptions/Server.py +++ b/py/test/Ice/slicing/exceptions/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/slicing/exceptions/ServerAMD.py b/py/test/Ice/slicing/exceptions/ServerAMD.py index 5f51a6aa828..e13f9cf4e82 100755 --- a/py/test/Ice/slicing/exceptions/ServerAMD.py +++ b/py/test/Ice/slicing/exceptions/ServerAMD.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/slicing/exceptions/ServerPrivate.ice b/py/test/Ice/slicing/exceptions/ServerPrivate.ice index 489a184d3e5..e2ae8cb3696 100644 --- a/py/test/Ice/slicing/exceptions/ServerPrivate.ice +++ b/py/test/Ice/slicing/exceptions/ServerPrivate.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/slicing/exceptions/ServerPrivateAMD.ice b/py/test/Ice/slicing/exceptions/ServerPrivateAMD.ice index 70594699e96..3eadbad9ede 100644 --- a/py/test/Ice/slicing/exceptions/ServerPrivateAMD.ice +++ b/py/test/Ice/slicing/exceptions/ServerPrivateAMD.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/slicing/exceptions/Test.ice b/py/test/Ice/slicing/exceptions/Test.ice index 599b57fec54..a5918458a6c 100644 --- a/py/test/Ice/slicing/exceptions/Test.ice +++ b/py/test/Ice/slicing/exceptions/Test.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/slicing/exceptions/TestAMD.ice b/py/test/Ice/slicing/exceptions/TestAMD.ice index c241f17a01d..f878338c995 100644 --- a/py/test/Ice/slicing/exceptions/TestAMD.ice +++ b/py/test/Ice/slicing/exceptions/TestAMD.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/slicing/exceptions/run.py b/py/test/Ice/slicing/exceptions/run.py index fd8cccc1533..a837100e45f 100755 --- a/py/test/Ice/slicing/exceptions/run.py +++ b/py/test/Ice/slicing/exceptions/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -10,21 +10,17 @@ import os, sys -for toplevel in [".", "..", "../..", "../../..", "../../../..", "../../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +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 "can't find toplevel directory!" - -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "slicing", "exceptions") +sys.path.append(os.path.join(path[0])) +from scripts import * print "tests with regular server." -TestUtil.clientServerTest(name) +TestUtil.clientServerTest() print "tests with AMD server." -TestUtil.clientServerTestWithOptionsAndNames(name, "", "", "ServerAMD.py", "Client.py") -sys.exit(0) +TestUtil.clientServerTest(server="ServerAMD.py") diff --git a/py/test/Ice/slicing/objects/AllTests.py b/py/test/Ice/slicing/objects/AllTests.py index 5f251538b7f..9780aa77896 100644 --- a/py/test/Ice/slicing/objects/AllTests.py +++ b/py/test/Ice/slicing/objects/AllTests.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/slicing/objects/Client.py b/py/test/Ice/slicing/objects/Client.py index d274b4f4a83..0d53200031f 100755 --- a/py/test/Ice/slicing/objects/Client.py +++ b/py/test/Ice/slicing/objects/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/slicing/objects/ClientPrivate.ice b/py/test/Ice/slicing/objects/ClientPrivate.ice index 1b8b26e1988..aaadf4bb9a2 100644 --- a/py/test/Ice/slicing/objects/ClientPrivate.ice +++ b/py/test/Ice/slicing/objects/ClientPrivate.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/slicing/objects/Forward.ice b/py/test/Ice/slicing/objects/Forward.ice index b589b897152..1c48e3ff480 100644 --- a/py/test/Ice/slicing/objects/Forward.ice +++ b/py/test/Ice/slicing/objects/Forward.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/slicing/objects/Server.py b/py/test/Ice/slicing/objects/Server.py index 5543d0c831e..dd4f56aa1ed 100755 --- a/py/test/Ice/slicing/objects/Server.py +++ b/py/test/Ice/slicing/objects/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/slicing/objects/ServerAMD.py b/py/test/Ice/slicing/objects/ServerAMD.py index 46c2f133a84..8fcba1a0ea0 100755 --- a/py/test/Ice/slicing/objects/ServerAMD.py +++ b/py/test/Ice/slicing/objects/ServerAMD.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/slicing/objects/ServerPrivate.ice b/py/test/Ice/slicing/objects/ServerPrivate.ice index 95ceaa7f750..2f4189919c4 100644 --- a/py/test/Ice/slicing/objects/ServerPrivate.ice +++ b/py/test/Ice/slicing/objects/ServerPrivate.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/slicing/objects/ServerPrivateAMD.ice b/py/test/Ice/slicing/objects/ServerPrivateAMD.ice index 3112495277f..18265cf711c 100644 --- a/py/test/Ice/slicing/objects/ServerPrivateAMD.ice +++ b/py/test/Ice/slicing/objects/ServerPrivateAMD.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/slicing/objects/Test.ice b/py/test/Ice/slicing/objects/Test.ice index 0ce49886fc9..2fa79937f53 100644 --- a/py/test/Ice/slicing/objects/Test.ice +++ b/py/test/Ice/slicing/objects/Test.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/slicing/objects/TestAMD.ice b/py/test/Ice/slicing/objects/TestAMD.ice index 96fa308cc7f..f9d187d345b 100644 --- a/py/test/Ice/slicing/objects/TestAMD.ice +++ b/py/test/Ice/slicing/objects/TestAMD.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/slicing/objects/run.py b/py/test/Ice/slicing/objects/run.py index 65f973cda48..a837100e45f 100755 --- a/py/test/Ice/slicing/objects/run.py +++ b/py/test/Ice/slicing/objects/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -10,21 +10,17 @@ import os, sys -for toplevel in [".", "..", "../..", "../../..", "../../../..", "../../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +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 "can't find toplevel directory!" - -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "slicing", "objects") +sys.path.append(os.path.join(path[0])) +from scripts import * print "tests with regular server." -TestUtil.clientServerTest(name) +TestUtil.clientServerTest() print "tests with AMD server." -TestUtil.clientServerTestWithOptionsAndNames(name, "", "", "ServerAMD.py", "Client.py") -sys.exit(0) +TestUtil.clientServerTest(server="ServerAMD.py") diff --git a/py/test/Ice/timeout/AllTests.py b/py/test/Ice/timeout/AllTests.py index 7dd170bfbb3..6e5601ea007 100644 --- a/py/test/Ice/timeout/AllTests.py +++ b/py/test/Ice/timeout/AllTests.py @@ -1,6 +1,6 @@ # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/timeout/Client.py b/py/test/Ice/timeout/Client.py index 00a29ee9dd4..667b8bc0c8d 100755 --- a/py/test/Ice/timeout/Client.py +++ b/py/test/Ice/timeout/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/timeout/Server.py b/py/test/Ice/timeout/Server.py index 631c6aea27e..5868c284f94 100755 --- a/py/test/Ice/timeout/Server.py +++ b/py/test/Ice/timeout/Server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/timeout/Test.ice b/py/test/Ice/timeout/Test.ice index 82531c5901e..4ba0c07ab71 100644 --- a/py/test/Ice/timeout/Test.ice +++ b/py/test/Ice/timeout/Test.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Ice/timeout/run.py b/py/test/Ice/timeout/run.py index f04e73b903a..bb34e7d35b7 100755 --- a/py/test/Ice/timeout/run.py +++ b/py/test/Ice/timeout/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -10,18 +10,14 @@ import os, sys -for toplevel in [".", "..", "../..", "../../..", "../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +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 "can't find toplevel directory!" +sys.path.append(os.path.join(path[0])) +from scripts import * -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "timeout") - -TestUtil.clientServerTest(name) -sys.exit(0) +TestUtil.clientServerTest() diff --git a/py/test/Slice/keyword/Client.py b/py/test/Slice/keyword/Client.py index aa8bdc11b46..97d9c4cb81d 100755 --- a/py/test/Slice/keyword/Client.py +++ b/py/test/Slice/keyword/Client.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. diff --git a/py/test/Slice/keyword/Key.ice b/py/test/Slice/keyword/Key.ice index 81668d2279d..74b2d51bbfe 100644 --- a/py/test/Slice/keyword/Key.ice +++ b/py/test/Slice/keyword/Key.ice @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 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. diff --git a/py/test/Slice/keyword/run.py b/py/test/Slice/keyword/run.py index 1e8824ce002..f36d746e167 100755 --- a/py/test/Slice/keyword/run.py +++ b/py/test/Slice/keyword/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 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. @@ -10,31 +10,17 @@ import os, sys -for toplevel in [".", "..", "../..", "../../..", "../../../..", "../../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +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 "can't find toplevel directory!" - -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -testdir = os.path.dirname(os.path.abspath(__file__)) - -cwd = os.getcwd() -os.chdir(testdir) +sys.path.append(os.path.join(path[0])) +from scripts import * print "starting client...", -clientPipe = os.popen("python Client.py --Ice.Default.Host=127.0.0.1 2>&1") +clientProc = TestUtil.startClient("Client.py", "--Ice.Default.Host=127.0.0.1") print "ok" - -TestUtil.printOutputFromPipe(clientPipe); - -clientStatus = TestUtil.closePipe(clientPipe) - -if clientStatus: - sys.exit(1) - -sys.exit(0) +clientProc.waitTestSuccess() |