Commit 7c6b0b84 authored by Philip Withnall's avatar Philip Withnall

Initial commit

Includes a trivial build system skeleton.
Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
parents
This diff is collapsed.
libglib-testing
===============
libglib-testing is a test library providing test harnesses and mock classes
which complement the classes provided by GLib. It is intended to be used by
any project which uses GLib and which wants to write internal unit tests.
libglib-testing is a separate project from GLib itself for two reasons:
• To allow unstable API to be prototyped before being stabilised.
• To keep test harness API out of libglib, since it should only be needed
at test time, not at runtime.
All the library APIs are currently unstable and are likely to change wildly.
Dependencies
============
• gio-2.0 ≥ 2.54
• glib-2.0 ≥ 2.54
• gobject-2.0 ≥ 2.54
Licensing
=========
The libraries in libglib-testing are licensed under the LGPL. See COPYING
for more details.
Bugs
====
Bug reports and patches should be reported by e-mail to one of the authors or
filed in GitLab:
https://gitlab.gnome.org/pwithnall/libglib-testing/issues/new
Contact
=======
Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/pwithnall/libglib-testing
<Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns="http://usefulinc.com/ns/doap#">
<name xml:lang="en">libglib-testing</name>
<shortdesc xml:lang="en">libglib-testing provides test harnesses and mock classes</shortdesc>
<description xml:lang="en">libglib-testing is a test library providing test harnesses and mock classes which complement the classes provided by GLib.</description>
<homepage rdf:resource="https://gitlab.gnome.org/pwithnall/libglib-testing"/>
<license rdf:resource="http://usefulinc.com/doap/licenses/lgpl"/>
<download-page rdf:resource="https://gitlab.gnome.org/pwithnall/libglib-testing"/>
<maintainer>
<foaf:Person>
<foaf:name>Philip Withnall</foaf:name>
<foaf:mbox rdf:resource="mailto:withnall@endlessm.com"/>
</foaf:Person>
</maintainer>
</Project>
project('libglib-testing','c',
version: '0.1.0',
meson_version: '>= 0.43.0',
license: 'LGPLv2.1+',
default_options: [
'c_std=gnu11',
'warning_level=2',
],
)
gnome = import('gnome')
pkgconfig = import('pkgconfig')
prefix = get_option('prefix')
datadir = join_paths(prefix, get_option('datadir'))
libdir = join_paths(prefix, get_option('libdir'))
libexecdir = join_paths(prefix, get_option('libexecdir'))
localedir = join_paths(prefix, get_option('localedir'))
includedir = join_paths(prefix, get_option('includedir'))
config_h = configuration_data()
config_h.set_quoted('GETTEXT_PACKAGE', meson.project_name())
config_h.set_quoted('LOCALEDIR', localedir)
configure_file(
output: 'config.h',
configuration: config_h,
)
root_inc = include_directories('.')
# Enable warning flags
test_c_args = [
'-fno-strict-aliasing',
'-fstack-protector-strong',
'-Waggregate-return',
'-Wall',
'-Wunused',
'-Warray-bounds',
'-Wcast-align',
'-Wclobbered',
'-Wno-declaration-after-statement',
'-Wduplicated-branches',
'-Wduplicated-cond',
'-Wempty-body',
'-Wformat=2',
'-Wformat-nonliteral',
'-Wformat-security',
'-Wformat-signedness',
'-Wignored-qualifiers',
'-Wimplicit-function-declaration',
'-Wincompatible-pointer-types',
'-Wincompatible-pointer-types-discards-qualifiers',
'-Winit-self',
'-Wint-conversion',
'-Wlogical-op',
'-Wmisleading-indentation',
'-Wmissing-declarations',
'-Wmissing-format-attribute',
'-Wmissing-include-dirs',
'-Wmissing-noreturn',
'-Wmissing-parameter-type',
'-Wmissing-prototypes',
'-Wnested-externs',
'-Wno-error=cpp',
'-Wno-discarded-qualifiers',
'-Wno-missing-field-initializers',
'-Wno-suggest-attribute=format',
'-Wno-unused-parameter',
'-Wnull-dereference',
'-Wold-style-definition',
'-Woverflow',
'-Woverride-init',
'-Wparentheses',
'-Wpointer-arith',
'-Wredundant-decls',
'-Wreturn-type',
'-Wshadow',
'-Wsign-compare',
'-Wstrict-aliasing=2',
'-Wstrict-prototypes',
'-Wswitch-default',
'-Wswitch-enum',
'-Wtype-limits',
'-Wundef',
'-Wuninitialized',
'-Wunused-but-set-variable',
'-Wunused-result',
'-Wunused-variable',
'-Wwrite-strings'
]
cc = meson.get_compiler('c')
add_project_arguments(cc.get_supported_arguments(test_c_args), language: 'c')
enable_installed_tests = get_option('installed_tests')
test_template = files('template.test.in')
test_env = [
'G_DEBUG=gc-friendly,fatal-warnings',
'MALLOC_CHECK_=2',
'LC_ALL=C.UTF-8',
]
option(
'installed_tests',
type: 'boolean',
value: false,
description: 'enable installed tests'
)
[Test]
Type=session
Exec=@installed_tests_dir@/@program@
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment