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:
@ -21,7 +21,7 @@ check-local: $(TESTSPY)
|
|||||||
fi; \
|
fi; \
|
||||||
for test in $(TESTSPY) ; do \
|
for test in $(TESTSPY) ; do \
|
||||||
echo "-- $$test" ; \
|
echo "-- $$test" ; \
|
||||||
$(PYTHON) $(srcdir)/$$test; \
|
LIBXML_SRC="$(LIBXML_SRC)" $(PYTHON) $(srcdir)/$$test; \
|
||||||
done)
|
done)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import setup_test
|
||||||
import libxml2
|
import libxml2
|
||||||
# Memory debug specific
|
# Memory debug specific
|
||||||
libxml2.debugMemory(1)
|
libxml2.debugMemory(1)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import sys
|
import sys
|
||||||
|
import setup_test
|
||||||
import libxml2
|
import libxml2
|
||||||
# Memory debug specific
|
# Memory debug specific
|
||||||
libxml2.debugMemory(1)
|
libxml2.debugMemory(1)
|
||||||
|
1
python/tests/extelem.py
Normal file → Executable file
1
python/tests/extelem.py
Normal file → Executable file
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import sys
|
import sys
|
||||||
import string
|
import string
|
||||||
|
import setup_test
|
||||||
import libxml2
|
import libxml2
|
||||||
# Memory debug specific
|
# Memory debug specific
|
||||||
libxml2.debugMemory(1)
|
libxml2.debugMemory(1)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import sys
|
import sys
|
||||||
import string
|
import string
|
||||||
|
import setup_test
|
||||||
import libxml2
|
import libxml2
|
||||||
# Memory debug specific
|
# Memory debug specific
|
||||||
libxml2.debugMemory(1)
|
libxml2.debugMemory(1)
|
||||||
|
8
python/tests/setup_test.py
Normal file
8
python/tests/setup_test.py
Normal 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'))
|
Reference in New Issue
Block a user