Compare commits

...

3 Commits

Author SHA1 Message Date
Chun-wei Fan
c03289e696 testsuite/a11y: Skip building on Visual Studio 2013
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.
2020-12-30 18:19:00 +08:00
Chun-wei Fan
0268baa938 gtkffmediafile.c: Use g_snprintf()
Visual Studio 2013 is just shy of being sufficiently C99-compliant to
build GTK master, as it did not support snprintf() in its CRT
implementation.

Use g_snprintf() to cover for this.
2020-12-30 18:18:46 +08:00
Chun-wei Fan
a4a7d540ca gtk/gtksecurememoryprivate.h: Include glib.h
Some compilers somehow do not have `inline` defined, so include glib.h
to ensure that keyword is defined.`
2020-12-30 18:18:34 +08:00
3 changed files with 32 additions and 29 deletions

View File

@@ -25,6 +25,7 @@
#pragma once
#include <stdlib.h>
#include <glib.h>
/*
* Main functionality

View File

@@ -217,7 +217,7 @@ gtk_ff_media_file_set_ffmpeg_error (GtkFfMediaFile *video,
return;
if (av_strerror (av_errnum, s, sizeof (s) != 0))
snprintf (s, sizeof (s), _("Unspecified error decoding video"));
g_snprintf (s, sizeof (s), _("Unspecified error decoding video"));
gtk_media_stream_error (GTK_MEDIA_STREAM (video),
G_IO_ERROR,

View File

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