File: meson.build

package info (click to toggle)
gjs 1.87.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,848 kB
  • sloc: cpp: 38,389; javascript: 31,953; ansic: 15,960; sh: 1,777; python: 791; xml: 137; makefile: 40
file content (52 lines) | stat: -rw-r--r-- 1,917 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# SPDX-License-Identifier: MIT OR LGPL-2.0-or-later
# SPDX-FileCopyrightText: 2019 Philip Chimento <philip.chimento@gmail.com>

### Unit tests #################################################################

mock_js_resources_files = gnome.compile_resources('mock-js-resources',
    'mock-js-resources.gresource.xml', c_name: 'mock_js_resources',
    source_dir: '..')

libgjs_tests_common = static_library('gjs-tests-common',
    sources: [
        'gjs-test-utils.cpp', 'gjs-test-utils.h',
        'gjs-test-common.cpp', 'gjs-test-common.h',
    ],
    cpp_args: libgjs_cpp_args,
    include_directories: top_include, dependencies: libgjs_dependencies,
)

gjs_tests_sources = [
    'gjs-tests.cpp',
    'gjs-test-coverage.cpp',
    'gjs-test-no-introspection-object.cpp', 'gjs-test-no-introspection-object.h',
]

gjs_tests = executable('gjs-tests', gjs_tests_sources, mock_js_resources_files,
    include_directories: top_include, dependencies: libgjs_dep,
    link_whole: [module_resource_lib],
    link_with: [libgjs_tests_common, libgjs_internal])

test('API tests', gjs_tests, args: ['--tap', '--keep-going', '--verbose'],
    depends: gjs_private_typelib, env: tests_environment, protocol: 'tap',
    suite: 'C', timeout: 60, priority: 10)

gjs_tests_internal = executable('gjs-tests-internal',
    sources: [
        'gjs-test-call-args.cpp',
        'gjs-test-jsapi-utils.cpp',
        'gjs-test-misc.cpp',
        'gjs-test-rooting.cpp',
        'gjs-test-toggle-queue.cpp',
        'gjs-tests-internal.cpp',
        module_resource_srcs,
    ],
    include_directories: top_include,
    cpp_args: libgjs_cpp_args,
    dependencies: [libgjs_dependencies, libgjstesttools_dep],
    link_with: [libgjs_tests_common, libgjs_internal])

test('Internal API tests', gjs_tests_internal,
    args: ['--tap', '--keep-going', '--verbose'],
    env: tests_environment, protocol: 'tap',
    suite: 'C', priority: 10)