2021-04-26 21:02:50 +00:00
|
|
|
clipboard_client = executable('clipboard-client',
|
2022-12-20 04:11:20 +00:00
|
|
|
sources: ['clipboard-client.c'],
|
|
|
|
include_directories: [confinc],
|
|
|
|
c_args: common_cflags,
|
|
|
|
dependencies: [ libgtk_dep ],
|
|
|
|
install: false,
|
|
|
|
)
|
2017-10-18 01:19:44 +00:00
|
|
|
|
2017-03-22 11:39:27 +00:00
|
|
|
tests = [
|
2021-09-17 15:24:54 +00:00
|
|
|
{ 'name': 'array' },
|
|
|
|
{ 'name': 'cairo' },
|
|
|
|
{ 'name': 'clipboard', 'parallel': false, },
|
|
|
|
{ 'name': 'contentformats' },
|
|
|
|
{ 'name': 'contentserializer' },
|
|
|
|
{ 'name': 'cursor' },
|
|
|
|
{ 'name': 'display' },
|
|
|
|
{ 'name': 'displaymanager' },
|
|
|
|
{ 'name': 'encoding' },
|
2022-02-16 02:46:29 +00:00
|
|
|
{ 'name': 'glcontext' },
|
2021-09-17 15:24:54 +00:00
|
|
|
{ 'name': 'keysyms' },
|
|
|
|
{ 'name': 'memorytexture' },
|
|
|
|
{ 'name': 'rectangle' },
|
|
|
|
{ 'name': 'rgba' },
|
|
|
|
{ 'name': 'seat' },
|
|
|
|
{ 'name': 'texture-threads' },
|
2017-03-22 11:39:27 +00:00
|
|
|
]
|
2016-08-21 16:01:14 +00:00
|
|
|
|
2017-03-22 11:39:27 +00:00
|
|
|
foreach t : tests
|
2021-09-17 15:24:54 +00:00
|
|
|
test_name = t.get('name')
|
|
|
|
test_exe = executable(test_name,
|
|
|
|
sources: '@0@.c'.format(test_name),
|
2020-10-09 17:17:04 +00:00
|
|
|
c_args: common_cflags,
|
|
|
|
dependencies: libgtk_dep,
|
2022-12-20 04:11:20 +00:00
|
|
|
install: false,
|
2020-10-09 17:17:04 +00:00
|
|
|
)
|
2017-10-18 01:19:44 +00:00
|
|
|
|
testsuite: Use separate setups for unstable tests instead of should_fail
There are two possible interpretations of "expected failure": either
the test *must* fail (exactly the inverse of an ordinary test, with
success becoming failure and failure becoming success), or the test
*may* fail (with success intended, but failure possible in some
environments). Autotools had the second interpretation, which seems
more useful in practice, but Meson has the first.
Instead of using should_fail, we can put the tests in one of two new
suites: "flaky" is intended for tests that succeed or fail unpredictably
according to the test environment or chance, while "failing" is for
tests that ought to succeed but currently never do as a result of a
bug or missing functionality. With a sufficiently new version of Meson,
the flaky and failing tests are not run by default, but can be requested
by running a setup that does not exclude them, with a command like:
meson test --setup=x11_unstable --suite=flaky --suite=failing
As a bonus, now that we're setting up setups and their excluded suites
programmatically, the gsk-compare-broadway tests are also excluded by
default when running the test setup for a non-broadway backend.
When running the tests in CI, --suite=gtk overrides the default
exclude_suites, so we have to specify --no-suite=flaky and
--no-suite=failing explicitly.
This arrangement is inspired by GNOME/glib!2987, which was contributed
by Marco Trevisan.
Signed-off-by: Simon McVittie <smcv@debian.org>
2022-11-23 19:13:32 +00:00
|
|
|
suites = ['gdk'] + t.get('suites', [])
|
|
|
|
|
2021-09-17 15:24:54 +00:00
|
|
|
test(test_name, test_exe,
|
2020-10-09 17:17:04 +00:00
|
|
|
args: [ '--tap', '-k' ],
|
|
|
|
protocol: 'tap',
|
2021-09-17 15:24:54 +00:00
|
|
|
is_parallel: t.get('parallel', false),
|
2020-10-09 17:17:04 +00:00
|
|
|
env: [
|
|
|
|
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
|
|
|
|
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
|
2021-04-30 12:10:48 +00:00
|
|
|
'DBUS_SESSION_BUS_ADDRESS=',
|
2020-10-09 17:17:04 +00:00
|
|
|
],
|
testsuite: Use separate setups for unstable tests instead of should_fail
There are two possible interpretations of "expected failure": either
the test *must* fail (exactly the inverse of an ordinary test, with
success becoming failure and failure becoming success), or the test
*may* fail (with success intended, but failure possible in some
environments). Autotools had the second interpretation, which seems
more useful in practice, but Meson has the first.
Instead of using should_fail, we can put the tests in one of two new
suites: "flaky" is intended for tests that succeed or fail unpredictably
according to the test environment or chance, while "failing" is for
tests that ought to succeed but currently never do as a result of a
bug or missing functionality. With a sufficiently new version of Meson,
the flaky and failing tests are not run by default, but can be requested
by running a setup that does not exclude them, with a command like:
meson test --setup=x11_unstable --suite=flaky --suite=failing
As a bonus, now that we're setting up setups and their excluded suites
programmatically, the gsk-compare-broadway tests are also excluded by
default when running the test setup for a non-broadway backend.
When running the tests in CI, --suite=gtk overrides the default
exclude_suites, so we have to specify --no-suite=flaky and
--no-suite=failing explicitly.
This arrangement is inspired by GNOME/glib!2987, which was contributed
by Marco Trevisan.
Signed-off-by: Simon McVittie <smcv@debian.org>
2022-11-23 19:13:32 +00:00
|
|
|
suite: suites,
|
2020-10-09 17:17:04 +00:00
|
|
|
)
|
2021-04-30 11:47:19 +00:00
|
|
|
endforeach
|
2016-08-21 16:01:14 +00:00
|
|
|
|
2021-09-12 00:27:13 +00:00
|
|
|
internal_tests = [
|
2022-05-13 13:31:40 +00:00
|
|
|
'image',
|
|
|
|
'texture',
|
2021-09-12 00:27:13 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
foreach t : internal_tests
|
|
|
|
test_exe = executable(t, '@0@.c'.format(t),
|
|
|
|
c_args: common_cflags,
|
|
|
|
dependencies: libgtk_static_dep,
|
2022-12-20 04:11:20 +00:00
|
|
|
install: false,
|
2021-09-12 00:27:13 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
test(t, test_exe,
|
|
|
|
args: [ '--tap', '-k' ],
|
|
|
|
protocol: 'tap',
|
|
|
|
env: [
|
|
|
|
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
|
|
|
|
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
|
|
|
|
'DBUS_SESSION_BUS_ADDRESS=',
|
|
|
|
],
|
|
|
|
suite: 'gdk',
|
|
|
|
)
|
|
|
|
endforeach
|