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>
This commit is contained in:
Jonas Ådahl 2020-11-10 22:02:51 +01:00 committed by Marge Bot
parent 79d4d7a4ff
commit 2ffa9ff3f2
3 changed files with 18 additions and 18 deletions

View File

@ -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

View File

@ -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,
)

View File

@ -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,
)