diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2020-04-06 20:50:35 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2021-04-14 14:47:20 +0200 |
commit | d715643fee6dd2afd37080f01d0d87d63e87f086 (patch) | |
tree | 8676820bb83edb836dae0aac7d127a49004ef549 | |
parent | b6077b23bb77205c16c8478408cd461f4d6d3351 (diff) | |
download | cython-d715643fee6dd2afd37080f01d0d87d63e87f086.tar.gz |
Make embed test more debuggable by printing the path setup and the build output on failure.
-rw-r--r-- | Demos/embed/Makefile | 17 | ||||
-rwxr-xr-x | runtests.py | 18 |
2 files changed, 30 insertions, 5 deletions
diff --git a/Demos/embed/Makefile b/Demos/embed/Makefile index e8d40b999..e6af8cae8 100644 --- a/Demos/embed/Makefile +++ b/Demos/embed/Makefile @@ -15,6 +15,23 @@ LINKFORSHARED := $(shell $(PYTHON) -c "import distutils.sysconfig; print(distuti LIBS := $(shell $(PYTHON) -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBS'))") SYSLIBS := $(shell $(PYTHON) -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('SYSLIBS'))") +.PHONY: paths all clean test + +paths: + @echo "PYTHON=$(PYTHON)" + @echo "PYVERSION=$(PYVERSION)" + @echo "PYPREFIX=$(PYPREFIX)" + @echo "INCDIR=$(INCDIR)" + @echo "PLATINCDIR=$(PLATINCDIR)" + @echo "LIBDIR1=$(LIBDIR1)" + @echo "LIBDIR2=$(LIBDIR2)" + @echo "PYLIB=$(PYLIB)" + @echo "CC=$(CC)" + @echo "LINKCC=$(LINKCC)" + @echo "LINKFORSHARED=$(LINKFORSHARED)" + @echo "LIBS=$(LIBS)" + @echo "SYSLIBS=$(SYSLIBS)" + embedded: embedded.o $(LINKCC) -o $@ $^ -L$(LIBDIR1) -L$(LIBDIR2) -l$(PYLIB) $(LIBS) $(SYSLIBS) $(LINKFORSHARED) diff --git a/runtests.py b/runtests.py index f1ea8e87d..0294bfef3 100755 --- a/runtests.py +++ b/runtests.py @@ -1797,12 +1797,20 @@ class EmbedTest(unittest.TestCase): if sys.version_info[0] >=3 and CY3_DIR: cython = os.path.join(CY3_DIR, cython) cython = os.path.abspath(os.path.join('..', '..', cython)) - self.assertEqual(0, os.system( - "make PYTHON='%s' CYTHON='%s' LIBDIR1='%s' test > make.output" % (sys.executable, cython, libdir))) + try: - os.remove('make.output') - except OSError: - pass + subprocess.check_output([ + "make", + "PYTHON='%s'" % sys.executable, + "CYTHON='%s'" % cython, + "LIBDIR1='%s'" % libdir, + "paths", "test", + ]) + except subprocess.CalledProcessError as err: + print(err.output.decode()) + raise + self.assertTrue(True) # :) + class MissingDependencyExcluder(object): |