1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-07-29 15:41:13 +03:00

python: Fix tests on MinGW

Add the directories containing required DLLs with os.add_dll_directory
to make tests work on MinGW.
This commit is contained in:
Nick Wellnhofer
2023-09-05 16:48:45 +02:00
parent 1c54ea99f0
commit 8c2e8031b2
6 changed files with 13 additions and 1 deletions

View File

@ -21,7 +21,7 @@ check-local: $(TESTSPY)
fi; \
for test in $(TESTSPY) ; do \
echo "-- $$test" ; \
$(PYTHON) $(srcdir)/$$test; \
LIBXML_SRC="$(LIBXML_SRC)" $(PYTHON) $(srcdir)/$$test; \
done)
endif

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python
import os
import sys
import setup_test
import libxml2
# Memory debug specific
libxml2.debugMemory(1)

View File

@ -1,5 +1,6 @@
#!/usr/bin/env python
import sys
import setup_test
import libxml2
# Memory debug specific
libxml2.debugMemory(1)

1
python/tests/extelem.py Normal file → Executable file
View File

@ -1,6 +1,7 @@
#!/usr/bin/env python
import sys
import string
import setup_test
import libxml2
# Memory debug specific
libxml2.debugMemory(1)

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python
import sys
import string
import setup_test
import libxml2
# Memory debug specific
libxml2.debugMemory(1)

View File

@ -0,0 +1,8 @@
import os
if hasattr(os, 'add_dll_directory'):
os.add_dll_directory(os.path.join(os.getcwd(), '..', '..', 'libxslt', '.libs'))
os.add_dll_directory(os.path.join(os.getcwd(), '..', '..', 'libexslt', '.libs'))
libxml_src = os.getenv('LIBXML_SRC')
if libxml_src is not None and libxml_src != '':
os.add_dll_directory(os.path.join(libxml_src, '.libs'))