summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ã…dahl <jadahl@gmail.com>2020-11-10 22:02:51 +0100
committerMarge Bot <marge-bot@gnome.org>2020-12-03 21:39:13 +0000
commit2ffa9ff3f2e5cc788780b8dc5aa6b08aff3504f1 (patch)
tree47016f0a2831a2bf6ebd97b69ce028a9ca853132
parent79d4d7a4ff25a83fa036c0aeb22105d9b8c4b3fa (diff)
downloadmutter-2ffa9ff3f2e5cc788780b8dc5aa6b08aff3504f1.tar.gz
tests: Turn anonymous file test into real test
It was a test case in the Wayland test client directory, but it wasn't a Wayland test client but a standalone test linking to libmutter. Since it uses rlimit to implement certain aspects of the test, it can't be made part of the regular unit tests, as that means any test running after being stuck with the rlimit set, thus keep it standalone, but at least run it as part of the test suite. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1557>
-rw-r--r--src/tests/anonymous-file.c (renamed from src/tests/wayland-test-clients/meta-anonymous-file.c)2
-rw-r--r--src/tests/meson.build18
-rw-r--r--src/tests/wayland-test-clients/meson.build16
3 files changed, 18 insertions, 18 deletions
diff --git a/src/tests/wayland-test-clients/meta-anonymous-file.c b/src/tests/anonymous-file.c
index a998cc406..79aa34364 100644
--- a/src/tests/wayland-test-clients/meta-anonymous-file.c
+++ b/src/tests/anonymous-file.c
@@ -25,8 +25,6 @@
#include <core/meta-anonymous-file.h>
-#include "wayland-test-client-utils.h"
-
#if defined(HAVE_MEMFD_CREATE)
#define READONLY_SEALS (F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE)
#endif
diff --git a/src/tests/meson.build b/src/tests/meson.build
index 77ab3b5d6..351d8c245 100644
--- a/src/tests/meson.build
+++ b/src/tests/meson.build
@@ -144,6 +144,17 @@ stage_view_tests = executable('mutter-stage-view-tests',
install_dir: mutter_installed_tests_libexecdir,
)
+anonymous_file_test = executable('anonymous-file-tests',
+ sources: [
+ 'anonymous-file.c',
+ ],
+ include_directories: tests_includepath,
+ c_args: tests_c_args,
+ dependencies: [tests_deps],
+ install: have_installed_tests,
+ install_dir: mutter_installed_tests_libexecdir,
+)
+
stacking_tests = [
'basic-x11',
'basic-wayland',
@@ -202,3 +213,10 @@ test('stage-view', stage_view_tests,
is_parallel: false,
timeout: 60,
)
+
+test('anonymous-file', anonymous_file_test,
+ suite: ['core', 'mutter/unit'],
+ env: test_env,
+ is_parallel: false,
+ timeout: 60,
+)
diff --git a/src/tests/wayland-test-clients/meson.build b/src/tests/wayland-test-clients/meson.build
index 8633dde14..4459a282e 100644
--- a/src/tests/wayland-test-clients/meson.build
+++ b/src/tests/wayland-test-clients/meson.build
@@ -74,19 +74,3 @@ executable('invalid-subsurfaces',
install: have_installed_tests,
install_dir: wayland_test_client_installed_tests_libexecdir,
)
-
-executable('meta-anonymous-file',
- sources: [
- 'meta-anonymous-file.c',
- common_sources,
- ],
- include_directories: tests_includepath,
- c_args: tests_c_args,
- dependencies: [
- glib_dep,
- wayland_client_dep,
- libmutter_dep,
- ],
- install: have_installed_tests,
- install_dir: wayland_test_client_installed_tests_libexecdir,
-)