diff options
author | Anthony Neal <aneal@zeroc.com> | 2002-05-17 12:52:08 +0000 |
---|---|---|
committer | Anthony Neal <aneal@zeroc.com> | 2002-05-17 12:52:08 +0000 |
commit | 1d46a0993c30b652539a4a41640c75c8e2c6a998 (patch) | |
tree | e4dbeeccf4b431b7f0964245dead4f457cd58198 /cpp/config/TestUtil.py | |
parent | Fixed a cygwin platform detection problem. (diff) | |
download | ice-1d46a0993c30b652539a4a41640c75c8e2c6a998.tar.bz2 ice-1d46a0993c30b652539a4a41640c75c8e2c6a998.tar.xz ice-1d46a0993c30b652539a4a41640c75c8e2c6a998.zip |
Updated to add isCygwin() and isWin32() functions to TestUtil.py, and use
them in the other scripts.
Diffstat (limited to 'cpp/config/TestUtil.py')
-rw-r--r-- | cpp/config/TestUtil.py | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py index d5975d3a433..bcd3602b603 100644 --- a/cpp/config/TestUtil.py +++ b/cpp/config/TestUtil.py @@ -71,16 +71,32 @@ clientOptions = clientProtocol + defaultHost clientServerOptions = commonServerOptions + clientServerProtocol + defaultHost collocatedOptions = clientServerProtocol +def isCygwin(): + + # The substring on sys.platform is required because some cygwin + # versions return variations like "cygwin_nt-4.01". + if sys.platform[:6] == "cygwin": + return 1 + else: + return 0 + +def isWin32(): + + if sys.platform == "win32": + return 1 + else: + return 0 + serverPids = [] def killServers(): global serverPids for pid in serverPids: - if sys.platform == "cygwin": + if isCygwin(): print "killServers(): not implemented for cygwin python." sys.exit(1) - elif sys.platform == "win32": + elif isWin32(): try: import win32api handle = win32api.OpenProcess(1, 0, pid) |