Commit Graph

8 Commits

Author SHA1 Message Date
Matthias Clasen
596f59f471 tests: Maybe skip introspection tests
If we don't find the python gi module,
skip the introspection test.
2022-12-19 22:38:38 -05:00
Chun-wei Fan
65a7df47f2 Introspection test: Reverse os.add_dll_directory() order
It looks like os.add_dll_directory() works in a LIFO order, so we call
os.add_dll_directory() from the end of the list of directories in %PATH%
so that the directories are searched in the correct order.
2022-04-26 11:52:31 +08:00
Chun-wei Fan
3471c22f52 testsuite: Fix introspection test on Windows
...when we are using Python 3.8.x or later.  Python 3.8.x or later on Windows
require one to call os.add_dll_directory() on every directory that contains
dependent non-system DLLs of a module that are not bundled/installed with the
module.

Since we are very likely running programs that rely on dependent items in
%PATH%, make things easier for people by calling os.add_dll_directory() on
all the valid paths in %PATH% in api.py, so that the test will run
successfully on Windows with Python 3.8.x or later.
2022-04-26 11:51:26 +08:00
Emmanuele Bassi
a70988ecd5 build: Remove deprecated get_pkgconfig_variable()
Replace it with `get_variable(pkgconfig:...)`.
2021-12-24 15:55:26 +00:00
Maxim Cournoyer
29e6cc5808
testsuite: introspection: Do not override environment variables.
Functional package managers such as GNU Guix rely on environment
variables such as GI_TYPELIB_PATH to discover the system libraries and
resources; extend rather than override them.

* testsuite/introspection/meson.build (env): New variable that extends
rather than override the GI_TYPELIB_PATH and LD_PRELOAD environment
variables.
(api): Use the above as the value of the 'env' keyword argument.
2021-12-20 11:22:41 -05:00
Emmanuele Bassi
c94996e8e8 build: Check for the gi python module
The introspection tests depend on the pygobject module, but we currently
are not checking if it's available at configuration time, which means we
can get build failures like:

> ModuleNotFoundError: No module named 'gi'

when running the test suite.
2021-12-19 16:06:49 +00:00
Marco Trevisan (Treviño)
d5f2b69d0c build: Get typelib dir dynamically using gobject-introspection dependency
We hardcoded the typelib directory for only an arch (and a distro),
while we can just get it from gobject-introspection pkg config if tests
are enabled.
2021-07-08 04:59:10 +02:00
Matthias Clasen
6a24e0c7c3 Add an introspection api test
Every beginning is small... just check one constant for now.
2021-05-05 19:18:32 -04:00