summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristian Hergert <chergert@redhat.com>2019-08-05 19:19:08 -0700
committerChristian Hergert <chergert@redhat.com>2019-08-05 19:19:08 -0700
commiteed297fb82c3ae661b427ac5fe5ea6d299baa86a (patch)
treec05519606a62418d8783daece14b473d006b4eab /tests
parent7ad862c039ad5861ab270ac14ee59f664d7e1c32 (diff)
downloadlibpeas-eed297fb82c3ae661b427ac5fe5ea6d299baa86a.tar.gz
build: hide private symbols with -fvisibility=hidden
This continues with the previous commit to hide non-public symbols by default. It is slightly complicated by the fact that we need some symbol access from the unit tests. Normally that would mean we just add a static library and link against that, but we need shared access to globals so that is not an option. We could possibly switch to creating a shared library without -fvisibility=hidden.
Diffstat (limited to 'tests')
-rw-r--r--tests/libpeas-gtk/testing/meson.build2
-rw-r--r--tests/libpeas/engine.c4
-rw-r--r--tests/libpeas/extension-py.c2
-rw-r--r--tests/testing-util/testing-util.c6
4 files changed, 6 insertions, 8 deletions
diff --git a/tests/libpeas-gtk/testing/meson.build b/tests/libpeas-gtk/testing/meson.build
index 62fd54d..ea9dbc5 100644
--- a/tests/libpeas-gtk/testing/meson.build
+++ b/tests/libpeas-gtk/testing/meson.build
@@ -13,7 +13,7 @@ libpeas_gtk_testing_deps = [
glib_dep,
introspection_dep,
libpeas_dep,
- libpeas_gtk_dep,
+ libpeas_gtk_test_dep,
libtesting_util_dep,
]
diff --git a/tests/libpeas/engine.c b/tests/libpeas/engine.c
index 0c975f4..e6ba2cc 100644
--- a/tests/libpeas/engine.c
+++ b/tests/libpeas/engine.c
@@ -449,8 +449,8 @@ test_engine_shutdown_subprocess (PeasEngine *engine)
testing_engine_free (engine);
/* Should be able to shutdown multiple times */
- peas_engine_shutdown ();
- peas_engine_shutdown ();
+ _peas_engine_shutdown ();
+ _peas_engine_shutdown ();
/* Cannot create an engine because libpeas has been shutdown */
engine = peas_engine_new ();
diff --git a/tests/libpeas/extension-py.c b/tests/libpeas/extension-py.c
index 0d9f913..8ec155d 100644
--- a/tests/libpeas/extension-py.c
+++ b/tests/libpeas/extension-py.c
@@ -169,7 +169,7 @@ test_extension_py_already_initialized_subprocess (void)
PyDict_Clear (dict);
testing_engine_free (engine);
- peas_engine_shutdown ();
+ _peas_engine_shutdown ();
/* Should still be initialized */
g_assert (Py_IsInitialized ());
diff --git a/tests/testing-util/testing-util.c b/tests/testing-util/testing-util.c
index 1f167a9..f35c806 100644
--- a/tests/testing-util/testing-util.c
+++ b/tests/testing-util/testing-util.c
@@ -19,9 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include <stdlib.h>
@@ -300,7 +298,7 @@ testing_util_run_tests (void)
g_private_replace (&engine_key, NULL);
g_private_replace (&unhandled_key, NULL);
g_private_replace (&log_hooks_key, NULL);
- peas_engine_shutdown ();
+ _peas_engine_shutdown ();
return retval;
}