tests: only build when needed
Build the tests lazily, i.e., not before `meson test`. This helps with build-times.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
## Copyright (C) 2021-2024 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||
## Copyright (C) 2021-2025 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
@ -25,54 +25,63 @@
|
||||
test('test-sexp',
|
||||
executable('test-sexp', '../mu-sexp.cc',
|
||||
install: false,
|
||||
build_by_default: false,
|
||||
cpp_args: ['-DBUILD_TESTS'],
|
||||
dependencies: [glib_dep, lib_mu_utils_dep]))
|
||||
|
||||
test('test-regex',
|
||||
executable('test-regex', '../mu-regex.cc',
|
||||
install: false,
|
||||
build_by_default: false,
|
||||
cpp_args: ['-DBUILD_TESTS'],
|
||||
dependencies: [glib_dep, lib_mu_utils_dep]))
|
||||
|
||||
test('test-command-handler',
|
||||
executable('test-command-handler', '../mu-command-handler.cc',
|
||||
install: false,
|
||||
build_by_default: false,
|
||||
cpp_args: ['-DBUILD_TESTS'],
|
||||
dependencies: [glib_dep, lib_mu_utils_dep]))
|
||||
|
||||
test('test-utils-file',
|
||||
executable('test-utils-file', '../mu-utils-file.cc',
|
||||
install: false,
|
||||
build_by_default: false,
|
||||
cpp_args: ['-DBUILD_TESTS'],
|
||||
dependencies: [glib_dep, gio_unix_dep,config_h_dep, lib_mu_utils_dep]))
|
||||
|
||||
test('test-logger',
|
||||
executable('test-logger', '../mu-logger.cc',
|
||||
install: false,
|
||||
build_by_default: false,
|
||||
cpp_args: ['-DBUILD_TESTS'],
|
||||
dependencies: [glib_dep, lib_mu_utils_dep,config_h_dep,thread_dep ]))
|
||||
|
||||
test('test-option',
|
||||
executable('test-option', '../mu-option.cc',
|
||||
install: false,
|
||||
build_by_default: false,
|
||||
cpp_args: ['-DBUILD_TESTS'],
|
||||
dependencies: [glib_dep, lib_mu_utils_dep ]))
|
||||
|
||||
test('test-lang-detector',
|
||||
executable('test-lang-detector', '../mu-lang-detector.cc',
|
||||
install: false,
|
||||
build_by_default: false,
|
||||
cpp_args: ['-DBUILD_TESTS'],
|
||||
dependencies: [ config_h_dep, glib_dep, lib_mu_utils_dep ]))
|
||||
|
||||
test('test-html-to-text',
|
||||
executable('test-html-to-text', '../mu-html-to-text.cc',
|
||||
install: false,
|
||||
build_by_default: false,
|
||||
cpp_args: ['-DBUILD_TESTS'],
|
||||
dependencies: [glib_dep, lib_mu_utils_dep]))
|
||||
|
||||
test('test-error',
|
||||
executable('test-error', '../mu-error.cc',
|
||||
install: false,
|
||||
build_by_default: false,
|
||||
cpp_args: ['-DBUILD_TESTS'],
|
||||
dependencies: [glib_dep, lib_mu_utils_dep]))
|
||||
|
||||
@ -80,4 +89,5 @@ test('test-mu-utils',
|
||||
executable('test-mu-utils',
|
||||
'test-utils.cc',
|
||||
install: false,
|
||||
build_by_default: false,
|
||||
dependencies: [glib_dep, lib_mu_utils_dep]))
|
||||
|
||||
Reference in New Issue
Block a user