diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2015-09-15 12:59:33 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2015-09-15 12:59:33 -0230 |
commit | a973118e7026ed1ab89caeaf612bc80873b4fe04 (patch) | |
tree | 4702b5b7c7a312b0896ab39246e06880828a72e8 /python/test/Slice | |
parent | Fixed GCC build failure introduced by previous commit (diff) | |
download | ice-a973118e7026ed1ab89caeaf612bc80873b4fe04.tar.bz2 ice-a973118e7026ed1ab89caeaf612bc80873b4fe04.tar.xz ice-a973118e7026ed1ab89caeaf612bc80873b4fe04.zip |
ICE-6792 python tests no longer require make/nmake
Diffstat (limited to 'python/test/Slice')
-rw-r--r-- | python/test/Slice/Makefile | 21 | ||||
-rw-r--r-- | python/test/Slice/Makefile.mak | 19 | ||||
-rw-r--r-- | python/test/Slice/import/Makefile | 32 | ||||
-rw-r--r-- | python/test/Slice/import/Makefile.mak | 29 | ||||
-rwxr-xr-x | python/test/Slice/import/run.py | 26 |
5 files changed, 25 insertions, 102 deletions
diff --git a/python/test/Slice/Makefile b/python/test/Slice/Makefile deleted file mode 100644 index 19f18553195..00000000000 --- a/python/test/Slice/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2015 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. -# -# ********************************************************************** - -top_srcdir = ../.. - -include $(top_srcdir)/config/Make.rules - -SUBDIRS = import - -$(EVERYTHING):: - @for subdir in $(SUBDIRS); \ - do \ - echo "making $@ in $$subdir"; \ - ( cd $$subdir && $(MAKE) $@ ) || exit 1; \ - done diff --git a/python/test/Slice/Makefile.mak b/python/test/Slice/Makefile.mak deleted file mode 100644 index 2646dddc07c..00000000000 --- a/python/test/Slice/Makefile.mak +++ /dev/null @@ -1,19 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2015 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. -# -# ********************************************************************** - -top_srcdir = ..\.. - -!include $(top_srcdir)\config\Make.rules.mak - -SUBDIRS = import - -$(EVERYTHING):: - @for %i in ( $(SUBDIRS) ) do \ - @echo "making $@ in %i" && \ - cmd /c "cd %i && $(MAKE) -nologo -f Makefile.mak $@" || exit 1 diff --git a/python/test/Slice/import/Makefile b/python/test/Slice/import/Makefile deleted file mode 100644 index 5e79abbe450..00000000000 --- a/python/test/Slice/import/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2015 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. -# -# ********************************************************************** - -top_srcdir = ../../.. - -include $(top_srcdir)/config/Make.rules - -# -# Parallel builds are not supported because multiple executions of slice2py could -# attempt to modify the __init__.py file simultaneously. -# -.NOTPARALLEL: - -SRCS = Test1_ice.py \ - Test2_ice.py - -all:: $(SRCS) - -Test1_ice.py: Test1.ice $(SLICEPARSERLIB) - $(SLICE2PY) $(SLICE2PYFLAGS) $< - -Test2_ice.py: Test2.ice $(SLICEPARSERLIB) - $(SLICE2PY) $(SLICE2PYFLAGS) $< - -clean:: - rm -rf $(SRCS) Test diff --git a/python/test/Slice/import/Makefile.mak b/python/test/Slice/import/Makefile.mak deleted file mode 100644 index e3935c60083..00000000000 --- a/python/test/Slice/import/Makefile.mak +++ /dev/null @@ -1,29 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2015 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. -# -# ********************************************************************** - -top_srcdir = ..\..\.. - -!include $(top_srcdir)\config\Make.rules.mak - -SRCS = Test1_ice.py \ - Test2_ice.py - -all:: $(SRCS) - -Test1_ice.py: "Test1.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) "Test1.ice" - -Test2_ice.py: "Test2.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) "Test2.ice" - -clean:: - -rmdir /s /q Test - del /q $(SRCS) - -include .depend.mak diff --git a/python/test/Slice/import/run.py b/python/test/Slice/import/run.py index 2054bdd7692..02a58b177d9 100755 --- a/python/test/Slice/import/run.py +++ b/python/test/Slice/import/run.py @@ -8,7 +8,7 @@ # # ********************************************************************** -import os, sys +import os, sys, shutil, subprocess path = [ ".", "..", "../..", "../../..", "../../../.." ] head = os.path.dirname(sys.argv[0]) @@ -20,6 +20,30 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil +testdir = os.path.dirname(os.path.abspath(__file__)) + +if os.path.exists(os.path.join(testdir, "Test1_ice.py")): + os.remove(os.path.join(testdir, "Test1_ice.py")) +if os.path.exists(os.path.join(testdir, "Test2_ice.py")): + os.remove(os.path.join(testdir, "Test2_ice.py")) +if os.path.exists(os.path.join(testdir, "Test")): + shutil.rmtree(os.path.join(testdir, "Test")) + +if os.environ.get("USE_BIN_DIST", "no") == "yes": + if TestUtil.isDarwin(): + slice2py = "/usr/local/bin/slice2py" + elif TestUtil.isWin32(): + pythonHome = os.path.dirname(sys.executable) + slice2py = os.path.join(pythonHome, "Scripts", "slice2py.exe") + else: + import slice2py + slice2py = os.path.normpath(os.path.join(slice2py.__file__, '..', '..', '..', '..', 'bin', 'slice2py')) +else: + slice2py = os.path.join(path[0], "python", "config", "s2py.py") + +subprocess.call([sys.executable, slice2py, "Test1.ice"]) +subprocess.call([sys.executable, slice2py, "Test2.ice"]) + sys.stdout.write("starting client... ") sys.stdout.flush() clientProc = TestUtil.startClient("Client.py", "--Ice.Default.Host=127.0.0.1", startReader = False) |