mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-08 11:40:16 +00:00
Merge branch 'static-lib-for-tests' into 'master'
Static lib for tests See merge request GNOME/gtk!3107
This commit is contained in:
commit
1973019962
@ -1106,15 +1106,22 @@ darwin_versions = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
# Library
|
# Library
|
||||||
libgtk = library('gtk-4',
|
libgtk_static = static_library('gtk',
|
||||||
soversion: gtk_soversion,
|
|
||||||
version: gtk_library_version,
|
|
||||||
sources: [typefuncs, gtk_sources, gtkmarshal_h, gtkprivatetypebuiltins_h],
|
sources: [typefuncs, gtk_sources, gtkmarshal_h, gtkprivatetypebuiltins_h],
|
||||||
c_args: gtk_cargs + common_cflags,
|
c_args: gtk_cargs + common_cflags,
|
||||||
include_directories: [confinc, gdkinc, gskinc, gtkinc],
|
include_directories: [confinc, gdkinc, gskinc, gtkinc],
|
||||||
dependencies: gtk_deps + [libgtk_css_dep, libgdk_dep, libgsk_dep],
|
dependencies: gtk_deps + [libgtk_css_dep, libgdk_dep, libgsk_dep],
|
||||||
link_whole: [libgtk_css, libgdk, libgsk, ],
|
link_with: [libgtk_css, libgdk, libgsk ],
|
||||||
|
)
|
||||||
|
|
||||||
|
libgtk = shared_library('gtk-4',
|
||||||
|
c_args: gtk_cargs + common_cflags,
|
||||||
|
include_directories: [confinc, gdkinc, gskinc, gtkinc],
|
||||||
|
dependencies: gtk_deps + [libgtk_css_dep, libgdk_dep, libgsk_dep],
|
||||||
|
link_whole: [libgtk_static, libgtk_css, libgdk, libgsk ],
|
||||||
link_args: common_ldflags,
|
link_args: common_ldflags,
|
||||||
|
soversion: gtk_soversion,
|
||||||
|
version: gtk_library_version,
|
||||||
darwin_versions: darwin_versions,
|
darwin_versions: darwin_versions,
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
@ -1264,4 +1271,11 @@ libgtk_dep = declare_dependency(sources: gtk_dep_sources,
|
|||||||
link_args: common_ldflags,
|
link_args: common_ldflags,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
libgtk_static_dep = declare_dependency(sources: gtk_dep_sources,
|
||||||
|
include_directories: [confinc, gtkinc],
|
||||||
|
dependencies: gtk_deps + [libgtk_css_dep, libgdk_dep, libgsk_dep],
|
||||||
|
link_with: [libgtk_static, libgtk_css, libgdk, libgsk ],
|
||||||
|
link_args: common_ldflags,
|
||||||
|
)
|
||||||
|
|
||||||
subdir('tools')
|
subdir('tools')
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
|
#include <gtk/gtk.h>
|
||||||
#include "../../gtk/gtkconstrainttypesprivate.h"
|
#include "../../gtk/gtkconstrainttypesprivate.h"
|
||||||
#include "../../gtk/gtkconstraintsolverprivate.h"
|
#include "../../gtk/gtkconstraintsolverprivate.h"
|
||||||
#include "../../gtk/gtkconstraintexpressionprivate.h"
|
#include "../../gtk/gtkconstraintexpressionprivate.h"
|
||||||
|
@ -26,11 +26,6 @@ tests = [
|
|||||||
{ 'name': 'action' },
|
{ 'name': 'action' },
|
||||||
{ 'name': 'adjustment' },
|
{ 'name': 'adjustment' },
|
||||||
{ 'name': 'bitset' },
|
{ 'name': 'bitset' },
|
||||||
{
|
|
||||||
'name': 'bitmask',
|
|
||||||
'sources': ['../../gtk/gtkallocatedbitmask.c'],
|
|
||||||
'c_args': ['-DGTK_COMPILATION', '-UG_ENABLE_DEBUG'],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
'name': 'builder',
|
'name': 'builder',
|
||||||
'link_args': gtk_tests_export_dynamic_ldflag,
|
'link_args': gtk_tests_export_dynamic_ldflag,
|
||||||
@ -38,20 +33,7 @@ tests = [
|
|||||||
{ 'name': 'builderparser' },
|
{ 'name': 'builderparser' },
|
||||||
{ 'name': 'cellarea' },
|
{ 'name': 'cellarea' },
|
||||||
{ 'name': 'check-icon-names' },
|
{ 'name': 'check-icon-names' },
|
||||||
{
|
|
||||||
'name': 'constraint-solver',
|
|
||||||
'sources': [
|
|
||||||
'../../gtk/gtkconstraintsolver.c',
|
|
||||||
'../../gtk/gtkconstraintexpression.c',
|
|
||||||
],
|
|
||||||
'c_args': ['-DGTK_COMPILATION', '-UG_ENABLE_DEBUG'],
|
|
||||||
},
|
|
||||||
{ 'name': 'cssprovider' },
|
{ 'name': 'cssprovider' },
|
||||||
{
|
|
||||||
'name': 'rbtree-crash',
|
|
||||||
'sources': ['../../gtk/gtkrbtree.c'],
|
|
||||||
'c_args': ['-DGTK_COMPILATION', '-UG_ENABLE_DEBUG'],
|
|
||||||
},
|
|
||||||
{ 'name': 'defaultvalue' },
|
{ 'name': 'defaultvalue' },
|
||||||
{ 'name': 'entry' },
|
{ 'name': 'entry' },
|
||||||
{ 'name': 'expression' },
|
{ 'name': 'expression' },
|
||||||
@ -78,16 +60,6 @@ tests = [
|
|||||||
{ 'name': 'objects-finalize' },
|
{ 'name': 'objects-finalize' },
|
||||||
{ 'name': 'papersize' },
|
{ 'name': 'papersize' },
|
||||||
#{ 'name': 'popover' },
|
#{ 'name': 'popover' },
|
||||||
{
|
|
||||||
'name': 'propertylookuplistmodel',
|
|
||||||
'sources': ['../../gtk/gtkpropertylookuplistmodel.c'],
|
|
||||||
'c_args': ['-DGTK_COMPILATION', '-UG_ENABLE_DEBUG'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'name': 'rbtree',
|
|
||||||
'sources': ['../../gtk/gtktreerbtree.c'],
|
|
||||||
'c_args': ['-DGTK_COMPILATION', '-UG_ENABLE_DEBUG'],
|
|
||||||
},
|
|
||||||
{ 'name': 'recentmanager' },
|
{ 'name': 'recentmanager' },
|
||||||
{ 'name': 'regression-tests' },
|
{ 'name': 'regression-tests' },
|
||||||
{ 'name': 'scrolledwindow' },
|
{ 'name': 'scrolledwindow' },
|
||||||
@ -104,10 +76,6 @@ tests = [
|
|||||||
{ 'name': 'textbuffer' },
|
{ 'name': 'textbuffer' },
|
||||||
{ 'name': 'textiter' },
|
{ 'name': 'textiter' },
|
||||||
{ 'name': 'theme-validate' },
|
{ 'name': 'theme-validate' },
|
||||||
{
|
|
||||||
'name': 'timsort',
|
|
||||||
'sources': ['timsort.c', '../../gtk/timsort/gtktimsort.c'],
|
|
||||||
},
|
|
||||||
{ 'name': 'tooltips' },
|
{ 'name': 'tooltips' },
|
||||||
{ 'name': 'treelistmodel' },
|
{ 'name': 'treelistmodel' },
|
||||||
{
|
{
|
||||||
@ -132,6 +100,16 @@ tests = [
|
|||||||
{ 'name': 'widget-refcount' },
|
{ 'name': 'widget-refcount' },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Tests that test private apis and therefore are linked against libgtk-4.a
|
||||||
|
internal_tests = [
|
||||||
|
{ 'name': 'bitmask' },
|
||||||
|
{ 'name': 'constraint-solver' },
|
||||||
|
{ 'name': 'rbtree-crash' },
|
||||||
|
{ 'name': 'propertylookuplistmodel' },
|
||||||
|
{ 'name': 'rbtree' },
|
||||||
|
{ 'name': 'timsort' },
|
||||||
|
]
|
||||||
|
|
||||||
# Tests that are expected to fail
|
# Tests that are expected to fail
|
||||||
xfail = [
|
xfail = [
|
||||||
# we are still missing some accessors
|
# we are still missing some accessors
|
||||||
@ -199,6 +177,39 @@ foreach t : tests
|
|||||||
)
|
)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
foreach t : internal_tests
|
||||||
|
test_name = t.get('name')
|
||||||
|
test_srcs = ['@0@.c'.format(test_name)] + t.get('sources', [])
|
||||||
|
test_extra_cargs = t.get('c_args', [])
|
||||||
|
test_extra_ldflags = t.get('link_args', [])
|
||||||
|
test_extra_suites = t.get('suites', [])
|
||||||
|
test_timeout = 60
|
||||||
|
|
||||||
|
test_exe = executable(test_name,
|
||||||
|
sources: test_srcs,
|
||||||
|
c_args: test_cargs + test_extra_cargs,
|
||||||
|
link_args: test_extra_ldflags,
|
||||||
|
dependencies: libgtk_static_dep,
|
||||||
|
install: get_option('install-tests'),
|
||||||
|
install_dir: testexecdir,
|
||||||
|
)
|
||||||
|
|
||||||
|
expect_fail = xfail.contains(test_name)
|
||||||
|
|
||||||
|
if test_extra_suites.contains('slow')
|
||||||
|
test_timeout = 90
|
||||||
|
endif
|
||||||
|
|
||||||
|
test(test_name, test_exe,
|
||||||
|
args: [ '--tap', '-k' ],
|
||||||
|
protocol: 'tap',
|
||||||
|
timeout: test_timeout,
|
||||||
|
env: test_env,
|
||||||
|
suite: ['gtk'] + test_extra_suites,
|
||||||
|
should_fail: expect_fail,
|
||||||
|
)
|
||||||
|
endforeach
|
||||||
|
|
||||||
# FIXME: if objc autotestkeywords_CPPFLAGS += -DHAVE_OBJC=1 -x objective-c++
|
# FIXME: if objc autotestkeywords_CPPFLAGS += -DHAVE_OBJC=1 -x objective-c++
|
||||||
if add_languages('cpp', required: false, native: false)
|
if add_languages('cpp', required: false, native: false)
|
||||||
test_exe = executable('autotestkeywords',
|
test_exe = executable('autotestkeywords',
|
||||||
|
Loading…
Reference in New Issue
Block a user