tests: Ensure real GIO backends aren't used
authorDan Nicholson <dbn@endlessos.org>
Wed, 5 Apr 2023 22:26:10 +0000 (16:26 -0600)
committerDan Nicholson <dbn@endlessos.org>
Thu, 13 Apr 2023 03:42:33 +0000 (21:42 -0600)
Set a few environment variables during tests to ensure fake GIO backends
are used. This is particularly important with the soup fetcher backend
as it can cause strange test errors in containerized test environments.
Upstream soup has been setting these 3 environment variables for their
tests since 2015.

Makefile-tests.am

index a30b86dd88887a42262c082e7c4e9befada3a0a8..429dafb939582f0373d5d8276a0053e8829f0eed 100644 (file)
@@ -36,6 +36,9 @@ AM_TESTS_ENVIRONMENT += OT_TESTS_DEBUG=1 \
        PATH=$$(cd $(top_builddir)/tests && pwd):$${PATH} \
        OSTREE_FEATURES="$(OSTREE_FEATURES)" \
        PYTHONUNBUFFERED=1 \
+       GSETTINGS_BACKEND=memory \
+       GIO_USE_PROXY_RESOLVER=dummy \
+       GIO_USE_VFS=local \
        $(NULL)
 if BUILDOPT_ASAN
 AM_TESTS_ENVIRONMENT += OT_SKIP_READDIR_RAND=1 G_SLICE=always-malloc