2020-10-09 17:17:04 +00:00
|
|
|
csstest_env = environment()
|
2020-11-07 12:50:11 +00:00
|
|
|
csstest_env.set('GTK_A11Y', 'test')
|
2020-10-09 17:17:04 +00:00
|
|
|
csstest_env.set('GSK_RENDERER', 'cairo')
|
|
|
|
csstest_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
|
|
|
csstest_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
|
|
|
csstest_env.set('GIO_USE_VFS', 'local')
|
|
|
|
csstest_env.set('GSETTINGS_BACKEND', 'memory')
|
|
|
|
csstest_env.set('G_ENABLE_DIAGNOSTIC', '0')
|
|
|
|
|
2016-08-21 16:01:14 +00:00
|
|
|
subdir('parser')
|
|
|
|
subdir('nodes')
|
|
|
|
subdir('style')
|
2020-01-17 01:04:00 +00:00
|
|
|
subdir('change')
|
2016-08-21 16:01:14 +00:00
|
|
|
|
2017-10-18 00:48:16 +00:00
|
|
|
testexecdir = join_paths(installed_test_bindir, 'css')
|
|
|
|
testdatadir = join_paths(installed_test_datadir, 'css')
|
|
|
|
|
2017-10-10 03:35:19 +00:00
|
|
|
test_api = executable('api', 'api.c',
|
2020-12-15 12:31:38 +00:00
|
|
|
c_args: common_cflags,
|
|
|
|
dependencies: libgtk_dep,
|
|
|
|
install: get_option('install-tests'),
|
|
|
|
install_dir: testexecdir,
|
|
|
|
)
|
|
|
|
|
2017-10-18 00:48:16 +00:00
|
|
|
test('api', test_api,
|
2020-12-15 12:31:38 +00:00
|
|
|
args: ['--tap', '-k' ],
|
|
|
|
protocol: 'tap',
|
|
|
|
env: csstest_env,
|
|
|
|
suite: 'css',
|
|
|
|
)
|
2017-10-10 03:35:19 +00:00
|
|
|
|
2019-05-09 01:04:21 +00:00
|
|
|
test_data = executable('data', ['data.c', '../../gtk/css/gtkcssdataurl.c'],
|
2020-12-15 12:31:38 +00:00
|
|
|
c_args: common_cflags,
|
|
|
|
include_directories: [confinc, ],
|
|
|
|
dependencies: gtk_deps,
|
|
|
|
install: get_option('install-tests'),
|
|
|
|
install_dir: testexecdir,
|
|
|
|
)
|
|
|
|
|
2019-05-09 01:04:21 +00:00
|
|
|
test('data', test_data,
|
2020-12-15 12:31:38 +00:00
|
|
|
args: ['--tap', '-k' ],
|
|
|
|
protocol: 'tap',
|
|
|
|
env: csstest_env,
|
|
|
|
suite: 'css',
|
|
|
|
)
|
2019-05-09 01:04:21 +00:00
|
|
|
|
2017-10-10 03:35:19 +00:00
|
|
|
if get_option('install-tests')
|
|
|
|
conf = configuration_data()
|
|
|
|
conf.set('libexecdir', gtk_libexecdir)
|
|
|
|
configure_file(input: 'api.test.in',
|
2020-12-15 12:31:38 +00:00
|
|
|
output: 'api.test',
|
|
|
|
configuration: conf,
|
|
|
|
install_dir: testdatadir,
|
|
|
|
)
|
2017-10-10 03:35:19 +00:00
|
|
|
endif
|
2020-01-22 05:58:13 +00:00
|
|
|
|
2020-03-20 17:47:58 +00:00
|
|
|
if false and get_option ('profiler')
|
2020-01-22 05:58:13 +00:00
|
|
|
|
2020-10-09 17:17:04 +00:00
|
|
|
adwaita_env = csstest_env
|
|
|
|
adwaita_env.set('GTK_THEME', 'Adwaita')
|
2020-01-22 05:58:13 +00:00
|
|
|
test('performance-adwaita', test_performance,
|
2020-12-15 12:31:38 +00:00
|
|
|
args: [
|
|
|
|
'--mark', 'css validation',
|
|
|
|
'--name', 'performance-adwaita',
|
|
|
|
'--output', join_paths(meson.current_build_dir(), 'output'),
|
|
|
|
join_paths(meson.current_build_dir(), '../../demos/widget-factory/gtk4-widget-factory'),
|
|
|
|
],
|
|
|
|
env: adwaita_env,
|
|
|
|
suite: [ 'css' ],
|
|
|
|
)
|
2020-01-22 05:58:13 +00:00
|
|
|
|
2020-10-09 17:17:04 +00:00
|
|
|
empty_env = csstest_env
|
|
|
|
empty_env.set('GTK_THEME', 'Empty')
|
2020-01-22 05:58:13 +00:00
|
|
|
test('performance-empty', test_performance,
|
2020-12-15 12:31:38 +00:00
|
|
|
args: [
|
|
|
|
'--mark', 'css validation',
|
|
|
|
'--name', 'performance-empty',
|
|
|
|
'--output', join_paths(meson.current_build_dir(), 'output'),
|
|
|
|
join_paths(meson.current_build_dir(), '../../demos/widget-factory/gtk4-widget-factory'),
|
|
|
|
],
|
|
|
|
env: empty_env,
|
|
|
|
suite: [ 'css' ],
|
|
|
|
)
|
2020-01-22 05:58:13 +00:00
|
|
|
endif
|