diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-12-30 18:15:54 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-12-30 18:19:00 +0800 |
commit | c03289e696b8b717d03471d680915c9e28be62ad (patch) | |
tree | 9299638d93eaec790eaa41d2463e8effd4432153 | |
parent | 0268baa9385d1a95adec664755eaa08fe732ed3d (diff) | |
download | gtk+-master.vs12.tar.gz |
testsuite/a11y: Skip building on Visual Studio 2013master.vs12
Somehow, Visual Studio 2013 did not like the `__value` keyword to be
used in plain C program, so we need to just skip building the A11Y tests
on Visual Studio 2013.
-rw-r--r-- | testsuite/a11y/meson.build | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/testsuite/a11y/meson.build b/testsuite/a11y/meson.build index 54c27fe2e5..cec308c3a1 100644 --- a/testsuite/a11y/meson.build +++ b/testsuite/a11y/meson.build @@ -40,7 +40,6 @@ xfail = [ ] is_debug = get_option('buildtype').startswith('debug') - test_cargs = [] foreach flag: common_cflags @@ -58,34 +57,37 @@ test_env.set('GIO_USE_VFS', 'local') test_env.set('GSETTINGS_BACKEND', 'memory') test_env.set('G_ENABLE_DIAGNOSTIC', '0') -foreach t : 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 +# Visual Studio 2013 could not cope with '__value' for C sources +if cc.get_id() != 'msvc' or cc.version().version_compare('>=19') + foreach t : 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, test_srcs, - c_args: test_cargs + test_extra_cargs, - link_args: test_extra_ldflags, - dependencies: libgtk_dep, - install: get_option('install-tests'), - install_dir: testexecdir, - ) + test_exe = executable(test_name, test_srcs, + c_args: test_cargs + test_extra_cargs, + link_args: test_extra_ldflags, + dependencies: libgtk_dep, + install: get_option('install-tests'), + install_dir: testexecdir, + ) - expect_fail = xfail.contains(test_name) + expect_fail = xfail.contains(test_name) - if test_extra_suites.contains('slow') - test_timeout = 90 - endif + 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: ['a11y'] + test_extra_suites, - should_fail: expect_fail, - ) -endforeach + test(test_name, test_exe, + args: [ '--tap', '-k' ], + protocol: 'tap', + timeout: test_timeout, + env: test_env, + suite: ['a11y'] + test_extra_suites, + should_fail: expect_fail, + ) + endforeach +endif |